Asana CLI

Install the Asana CLI, configure authentication, and run your first command.

The Asana CLI provides command-line access to the Asana API. Use it to read and update Asana data from a terminal, automate operations in scripts, or let AI agents with terminal access work with Asana.

Installation

Requires Node.js 22 or newer.

npm install --global @asana-api/cli

The installed command is asana-cli. Explore available resources and commands with:

asana-cli --help
asana-cli tasks --help

For shell autocomplete setup, run asana-cli autocomplete and follow the instructions for your shell.

Authentication

The CLI accepts a personal access token, Service Account token, or OAuth access token. Requests use the supplied token’s identity and permissions.

By default, the CLI reads the token from ASANA_ACCESS_TOKEN. Supply it through your shell or secret manager. For example, in bash or zsh:

export ASANA_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"

Keep credentials out of source control, shared configuration, and agent prompts. See authentication for obtaining a token, and the README’s credential guidance for choosing one.

To check the selected environment variable and authenticated identity:

asana-cli auth status

The command does not print the token. OAuth token acquisition and refresh are handled outside the CLI.

Your first command

List tasks in a project you can access:

asana-cli tasks list --project PROJECT_GID --output table

Replace PROJECT_GID with your project’s ID. Commands return JSON by default; --output table displays the results as a table.

Discover the available inputs for a command with:

asana-cli tasks list --project PROJECT_GID --help

Further guidance

The npm package README covers configuration commands, output formats, Asana Gov, and permissions for automation and agents.

❗️

Destructive commands

Commands that change or delete data run without interactive confirmation. Verify target IDs and inputs, and configure any necessary approval in the system running the CLI.


Did this page help you?