Asana CLI lets a coding agent read and change your Asana tasks with shell commands. Any agent that can run commands in your terminal can use it, for example Claude Code or Codex CLI.
The examples use v0.1.2 with made-up names and IDs.
Install and log in
Install the CLI on the machine where the agent runs. On macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/vincentsch/asana-cli/main/install.sh | bash
You can also build it with Go or download a Windows binary. The install section of the product page has both.
Then log in once with a Personal Access Token from Asana’s developer console:
asana login
The token gives the CLI the same access as your Asana user. Don’t paste it into a prompt or commit it to a repository. In a script or a CI job, set ASANA_TOKEN in a private environment variable instead. It overrides the saved login. Asana’s authentication docs explain how these tokens work.
Tell the agent about it
Add a short section to the instruction file your agent reads, like AGENTS.md or CLAUDE.md:
## Asana
Use the asana CLI for Asana. Add --json when you read data.
Run commands that change Asana with --dry-run first and show me the output.
Never use --confirm unless I ask for it.
Read the project first
Start with commands that only read:
asana workspace list
asana project list --workspace "Company"
asana task list --project "Launch Plan" --json
With --json the agent gets data it can read or pass to another command. If two projects have the same name, the CLI lists both and stops. The agent then uses the project’s GID, the ID Asana gives each project:
asana task list --project-gid 1234567890123456 --json
You can also ask the agent in your prompt to show you its plan before it changes anything:
Read the Launch Plan project. Tell me which task you plan to change. Show the task GID and the update command with --dry-run. Wait for me to approve the change.
The prompt is only an instruction. It does not limit what the token can do.
Preview a change
Commands that change Asana take --dry-run:
asana task update 1234567890123456 --name "Review launch checklist" --dry-run
The CLI prints the request it would send and changes nothing. It can still read from Asana to look up names or check your input. Look at the target and the flags, then run the command again without --dry-run.
It works the same way when the agent creates a task:
asana task create "Review launch checklist" --project "Launch Plan" --assignee me --dry-run
Delete and remove commands stop with an error unless they get --confirm. These flags make mistakes less likely, but they don’t stop an agent from calling the Asana API some other way. Your token and the agent’s shell access decide what it can do.
Where to look next
The task reference has every task command with its flags and examples. To read a project, use asana task list. asana task search uses Asana’s premium search API, so it needs a paid Asana plan.