CLI Commands¶
Aha Studio provides two CLI tools: aha-studio for AQL queries and aha-mcp-server for MCP integration.
aha-studio Commands¶
The aha-studio CLI provides AQL (Aha Query Language) for querying and exporting Aha.io data.
query¶
Execute an AQL query.
aha-studio query "FROM features LIMIT 10"
aha-studio query "FROM ideas WHERE status = 'Shipped' LIMIT 5"
| Flag | Description |
|---|---|
-o, --output |
Output format: table, json, csv, markdown, yaml, html, xlsx |
-f, --file |
Output file path (required for xlsx format) |
-p, --product |
Product ID or reference prefix |
-v, --verbose |
Enable verbose output |
--stats |
Show query execution statistics |
--offline |
Use local SQLite cache instead of API |
sync¶
Sync data from Aha.io to local SQLite cache.
aha-studio sync --product PROD
aha-studio sync --product PROD --since 2024-01-01
aha-studio sync --product PROD --since last
| Flag | Description |
|---|---|
-p, --product |
Product ID (required) |
--since |
Sync changes since date (YYYY-MM-DD) or "last" |
--entities |
Specific entities to sync (comma-separated) |
shell¶
Start interactive AQL shell.
Excel Export Examples¶
Export features to Excel with various filters:
# Export all features ordered by rank
aha-studio query -o xlsx -f features.xlsx \
"SELECT reference_num, name, position, tag_list, workspace
FROM features ORDER BY position ASC"
# Export features for a specific release
aha-studio query -o xlsx -f release-features.xlsx \
"SELECT reference_num, name, position, tag_list, workspace
FROM features WHERE release_id = 'PROD-R-123' ORDER BY position ASC"
# Export features by release name
aha-studio query -o xlsx -f release-features.xlsx \
"SELECT reference_num, name, position, tag_list, workspace
FROM features WHERE release = 'Q4 2024 Release' ORDER BY position ASC"
# Export features by release date range
aha-studio query -o xlsx -f q4-features.xlsx \
"SELECT reference_num, name, position, release, release_date, tag_list, workspace
FROM features
WHERE release_date >= '2024-10-01' AND release_date <= '2024-12-31'
ORDER BY release_date ASC, position ASC"
# Export with human-readable column headers
aha-studio query -o xlsx -f features.xlsx \
"SELECT reference_num AS 'Feature Reference',
name AS 'Feature Name',
position AS 'Feature Rank',
tag_list AS 'Feature Tags',
workspace AS 'Workspace Name'
FROM features ORDER BY position ASC"
Note: Release, rank, tags, and workspace data require syncing first:
aha-mcp-server Commands¶
The Aha! MCP server can also be used as a command-line tool for testing and scripting.
Global Flags¶
| Flag | Environment Variable | Description |
|---|---|---|
--subdomain |
AHA_DOMAIN |
Aha! subdomain |
--api-key |
AHA_API_TOKEN |
Aha! API key |
--vault |
OMNITOKEN_VAULT_URI |
Vault URI for credentials |
--credentials-name |
OMNITOKEN_CREDENTIALS_NAME |
Name of credentials in vault |
-o, --output |
- | Output format: json (default) or pretty |
Server Commands¶
serve¶
Start the MCP server (default when no command specified).
version¶
Print version information.
Aha! Commands¶
search-documents¶
Search for documents.
aha-mcp-server search-documents "product roadmap"
aha-mcp-server search-documents "auth" --type Page --limit 5
| Flag | Description |
|---|---|
--type |
Document type (e.g., Page) |
--limit |
Maximum results |
get-idea¶
Get an idea by ID.
list-ideas¶
List ideas with filtering.
aha-mcp-server list-ideas
aha-mcp-server list-ideas --query "mobile" --workflow-status "Under consideration"
aha-mcp-server list-ideas --tag "priority" --sort recent --per-page 20
| Flag | Description |
|---|---|
-q, --query |
Search term |
--spam |
Show spam ideas |
--workflow-status |
Filter by status |
--sort |
Sort by: recent, trending, popular |
--created-before |
Created before date (ISO8601) |
--created-since |
Created after date (ISO8601) |
--updated-since |
Updated after date (ISO8601) |
--tag |
Filter by tag |
--user-id |
Filter by creator |
--page |
Page number |
--per-page |
Results per page |
get-feature¶
Get a feature by ID.
get-epic¶
Get an epic by ID.
get-release¶
Get a release by ID.
get-goal¶
Get a goal by ID.
get-initiative¶
Get an initiative by ID.
get-key-result¶
Get a key result by ID.
get-persona¶
Get a persona by ID.
get-requirement¶
Get a requirement by ID.
get-team¶
Get a team by ID.
get-user¶
Get a user by ID.
get-workflow¶
Get a workflow by ID.
get-comment¶
Get a comment by ID.
Examples¶
Scripting with JSON¶
# Get feature and extract name with jq
aha-mcp-server get-feature FEAT-123 | jq '.feature.name'
# List ideas and count them
aha-mcp-server list-ideas --query "mobile" | jq '.ideas | length'
# Search and format results
aha-mcp-server search-documents "roadmap" | jq -r '.results[].title'