awesome cli.
Command reference

Configuration

Config File Location

The CLI stores configuration at:

  • Linux: $XDG_CONFIG_HOME/asana/config.json (usually ~/.config/asana/config.json)
  • macOS: ~/Library/Application Support/asana/config.json
  • Windows: %AppData%\asana\config.json

Override with --config /path/to/config.json or ASANA_CONFIG.

Authentication

Interactive Login

asana login

Prompts for a Personal Access Token, validates it with Asana, and saves it.

Manual Token Setup

Get a Personal Access Token from https://app.asana.com/0/my-apps.

Prefer asana login for local setup. Passing a token as a command argument may leave it in your shell history.

asana config set token YOUR_TOKEN

Or edit the config file directly:

{
  "version": 1,
  "token": "0/abc123...",
  "defaults": {
    "workspace_gid": "",
    "project_gid": ""
  }
}

Environment Variable

Set ASANA_TOKEN to override the config file:

export ASANA_TOKEN="0/abc123..."
asana task list

Default Workspace

Set a default workspace for commands that need one:

# By name
asana config set workspace "My Workspace"

The resolved GID is stored in the config file.

View Current Config

asana config list

Config Options

Key Description
token Asana Personal Access Token
defaults.workspace_gid Default workspace GID
defaults.project_gid Default project GID

asana config set workspace and asana config set project look up the name you give them and store the resolved GID in the matching defaults key. Their key names differ from the file keys, so asana config set takes workspace and project, not defaults.workspace_gid.

Example Config File

{
  "version": 1,
  "token": "0/1234567890abcdef...",
  "defaults": {
    "workspace_gid": "123456789012345",
    "project_gid": "987654321098765"
  }
}

Troubleshooting

"Invalid or expired token" errors

Your token may be expired or invalid. Run asana login again.

"either --workspace or --workspace-gid is required" errors

Set a default workspace:

asana config set workspace "My Workspace"

Or provide it per-command:

asana task list -w "My Workspace"