Skip to main content

A powerful command line interface for Asana

Project description

asana-cli

A powerful, colorful command line interface for Asana, built on top of the official asana Python SDK and click.

Languate - Python PyPI - License PyPI PyPI - Downloads

Features

  • 🗂 Tasks: list, get, create, update, complete, delete, comment, subtasks
  • 📁 Projects: list, get, create, update, delete, sections
  • 🏢 Workspaces: list workspaces and users
  • 👤 Users: whoami, list assigned tasks
  • 🎨 Beautiful rich terminal output with colors and tables
  • 🔐 Secure token storage in ~/.asana-cli

Installation

pip install python-asana-cli

Configuration

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

asana-cli config set-token <YOUR_TOKEN>

Or set the environment variable:

export ASANA_TOKEN=<YOUR_TOKEN>

Usage

General

asana-cli --help
asana-cli config show
asana-cli config set-token <TOKEN>

Workspaces

# List all workspaces
asana-cli workspace list

# List users in a workspace
asana-cli workspace users <WORKSPACE_GID>

User

# Show current user info
asana-cli user me

# Show tasks assigned to me
asana-cli user tasks --workspace <WORKSPACE_GID>
asana-cli user tasks --workspace <WORKSPACE_GID> --completed  # include done tasks

Projects

# List projects in a workspace
asana-cli project list --workspace <WORKSPACE_GID>

# Get project details
asana-cli project get <PROJECT_GID>

# Create a project
asana-cli project create --workspace <WORKSPACE_GID> --name "My Project" --color light-green

# Update a project
asana-cli project update <PROJECT_GID> --name "New Name"

# Archive a project
asana-cli project update <PROJECT_GID> --archive

# Delete a project
asana-cli project delete <PROJECT_GID>

# List sections
asana-cli project sections <PROJECT_GID>

# Add a section
asana-cli project add-section <PROJECT_GID> --name "In Progress"

Tasks

# List tasks in a project (default 10)
asana-cli task list --project <PROJECT_GID>

# Limit and pagination
asana-cli task list --project <PROJECT_GID> --limit 20
asana-cli task list --project <PROJECT_GID> --limit 5 --offset <OFFSET>

# Filter by section
asana-cli task list --project <PROJECT_GID> --section <SECTION_GID>

# Filter by assignee (use "me" or fuzzy name)
asana-cli task list --project <PROJECT_GID> --assignee me
asana-cli task list --project <PROJECT_GID> --assignee "roby"

# Filter by creator (use "me" for current user)
asana-cli task list --project <PROJECT_GID> --creator me

# Show completed tasks
asana-cli task list --project <PROJECT_GID> --completed

# Get task details
asana-cli task get <TASK_GID>

# Create a task
asana-cli task create --project <PROJECT_GID> --name "Fix bug" --due 2026-04-29 --assignee me

# Create a task with fuzzy assignee search
asana-cli task create --project <PROJECT_GID> --name "Task" --assignee "Kevin"
asana-cli task create --project <PROJECT_GID> --name "Task" --assignee "kevin@xxx.com"

# Create a task with custom fields
asana-cli task create --project <PROJECT_GID> --name "Task" \
    --custom-field "Priority=High" \
    --custom-field "类型=后端" \
    --custom-field "发现日期=2026-04-29"

# Create a task in a specific section
asana-cli task create --project <PROJECT_GID> --name "Review PR" --section <SECTION_GID>

# Update a task
asana-cli task update <TASK_GID> --name "New Name" --due 2025-11-01

# Update a task with custom fields
asana-cli task update <TASK_GID> --custom-field "Priority=Medium"

# Mark task complete
asana-cli task complete <TASK_GID>

# Mark task incomplete
asana-cli task update <TASK_GID> --incomplete

# Delete a task
asana-cli task delete <TASK_GID>

# Add a comment
asana-cli task comment <TASK_GID> "Great progress on this!"

# List subtasks
asana-cli task subtasks <TASK_GID>

# Add a subtask
asana-cli task add-subtask <PARENT_TASK_GID> --name "Write tests"

Tips

  • Find GIDs in the Asana URL: https://app.asana.com/0/<project_gid>/...
  • Use --assignee me to assign to yourself
  • Fuzzy assignee search: --assignee "roby" matches "roby.qian", "Roby Qian", "roby.qian@trueusd.com"
  • Custom fields: supports enum, text, date types (e.g., --custom-field "发现日期=2026-04-29")
  • Due date colors: 🔴 overdue, 🟡 due soon (≤3 days), 🟢 upcoming

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_asana_cli-0.1.1.tar.gz (14.0 kB view details)

Uploaded Source

File details

Details for the file python_asana_cli-0.1.1.tar.gz.

File metadata

  • Download URL: python_asana_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for python_asana_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1ddacf882f787bec6a4e425a4e5e6408bf92b74d9cdad835be6f34c697e007f6
MD5 ed985f9115a53e5f9c186d6d97f8cdbc
BLAKE2b-256 38c558330391a8ede5f6a49136076c2aac0323f6c9424893306808dc3e8b4482

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page