Skip to content

CLI Overview

The cyber-asana CLI exposes the same operations as the MCP server, without needing an agent host. Every command follows the same shape:

Terminal window
cyber-asana <resource> <action> [options]
Terminal window
cyber-asana task list --project <gid>
cyber-asana project create "Launch" --workspace-gid <gid>
cyber-asana comment create "Shipped!" --task <gid>

Run cyber-asana with no arguments to see the authenticated user and version instead of help text. Every resource group’s --help ends with worked examples.

Resource Actions
Tasks list, get, get-many, create, update, delete, search, my-tasks, subtask, project, follower, dependency, dependent
Projects list, get, counts, search, create, update, delete, export
Sections list, get, create, update, delete
Comments list, get, create, update, delete (as story or comment)
Tags list, get, create, update, delete, tasks, task list/add/remove
Goals list, get, create, update, delete
Portfolios list, items, get, create, update, delete
Status updates list, get, create, delete
Attachments list, get, create, delete
Events list (change feed; sync-token cursored, not paginated)
People & places user list/get/me, team list/get, workspace list/get
Custom fields list, get (find the GIDs task writes are keyed by)
Authentication auth status, auth login, auth token, auth logout
Repo config config show/list/path/resolve-project/add/remove/sync
Memberships list, get, create, update, delete
Out of office list, get, create, update, delete
Search objects (typeahead; turn a name into a GID)
Utilities url parse, task scan-todos, setup hook, mcp

These work on every command:

Option Description
--token <token> Asana PAT — overrides the ASANA_ACCESS_TOKEN env var
--json Raw API JSON instead of formatted text
--toon Token-efficient TOON instead of formatted text (recommended for agents)
--full Show full field values instead of truncating large text

Output is human-readable by default. --toon emits TOON, a compact tabular format that drops repeated keys for roughly 40% fewer tokens than pretty JSON.

Commands that take a resource GID accept both a canonical --<resource>-gid flag and a shorter legacy alias:

Terminal window
cyber-asana task list --project-gid <gid>
cyber-asana task list --project <gid> # legacy alias

Workspace-scoped commands read ASANA_WORKSPACE when --workspace-gid is omitted, so setting it once in your shell removes it from every call.

Every list command supports the same pagination options:

Option Description
--limit <number> Results per page, 1–100 (default: 100)
--offset <token> Offset token from a previous paginated response
--opt-fields <fields> Comma-separated Asana fields to include
--all Fetch all pages up to --max-pages
--max-pages <number> Cap pages fetched with --all (default: 10)
Terminal window
cyber-asana task list --project <gid> --limit 50
cyber-asana task list --project <gid> --offset <next_page.offset>
cyber-asana task list --project <gid> --all --max-pages 5

--all and --offset are mutually exclusive. Under --json, paginated responses include data, next_page, and limit; in text mode a Next offset hint prints when another page is available.

Each list command requests a small default field set — task lists ask for only gid,name,completed,due_on — so responses stay cheap. Pass --opt-fields to widen.

  • Definitive empty states — an empty result names what was empty (0 tasks found), never a blank line.
  • Content truncation — large text (task notes, project notes, status update and comment bodies) is truncated with a size hint; pass --full for the complete value.
  • Aggregates & next steps — list commands print a count summary and follow-up command suggestions in text mode, suppressed under --toon/--json.
  • Non-interactive mutations — no prompts, so everything is safe to script.
  • Idempotent deletes — deleting something already gone succeeds and reports already_absent: true instead of failing with a 404.
Code Meaning
0 Success
1 Generic error
2 Usage error (bad flag or subcommand)
3 Auth or config error
4 Forbidden
5 Not found
6 Rate limited

Under --json/--toon, errors are structured objects. An unknown flag reports the flags that command actually accepts, plus a --help pointer, and exits 2.