Skip to content

timwehrle/asana

Asana CLI

A command-line interface to manage your Asana tasks and projects directly from your terminal.

Installation

Pre-built binaries

Download the latest binary for your platform from the releases page.

From Source

go install github.com/timwehrle/asana/cmd/asana@latest

Bash Installation

curl -sSL https://raw.githubusercontent.com/timwehrle/asana/main/scripts/install.sh | bash

Homebrew Installation

brew tap timwehrle/asana
brew install --formula asana

Having troubles with keyrings on WSL2?

If you're running into issues with keyring access on WSL2, there's a simple workaround! You can find a detailed explanation here: XeroAPI/xoauth#25 (comment)

To make development smoother, we've also provided a setup script. It installs the necessary packages and configures the GNOME keyring automatically. You probably have to do this every time you start your WSL2 environment.

chmod +x scripts/setup-wsl-keyring.sh
./scripts/setup-wsl-keyring.sh

After running the script, keyring functionality should be available in your WSL2 environment.

Getting started

Authentication

  1. Get your Personal Access Token from Asana (Settings > Apps > Developer Apps)
  2. Run the login command:
    asana auth login
  3. Follow the prompts to paste your token and select your default workspace.

To check the current status of your authentication and the Asana API:

asana auth status

Configuration

Set or get your default workspace:

asana config set default-workspace
asana config set dw

asana config get default-workspace
asana config get dw

Basic Commands

View your tasks:

asana tasks list # List all your tasks
asana tasks list --sort due-desc # Sort tasks by descending due date
asana tasks view # Interactive task viewer with details
asana tasks update # Interactive task updater

View tasks with filters:

asana tasks search --assignee me,12345678 # Search tasks by assignee and more filters

Log, check and delete time entries on your tasks:

# Create a new time entry
asana time create -m 23 --date 2025-01-06

# Check time entries
asana time status

# Delete a time entry
asana time delete

View the projects in your workspace:

asana projects list # List all the projects
asana projects list -l 25 --sort desc # List with options

View the teams in your workspace:

asana teams list # List all teams

View the users in your workspace:

asana users list # List all the users
asana users list -l 25 --sort desc # List with options

View tags of your workspace:

asana tags list # List all tags
asana tags list --favorite # List tags that you marked as favorite

For more usage:

asana help # Show all available commands

Security

To keep your Asana credentials safe, this CLI uses your system's keyring for secure token storage. This ensures your Personal Access Token is never written to disk in plain text. The keyring integration works across major platforms (macOS, Linux, and Windows), and includes WSL2 support with a setup script provided.

How to improve Token Security

While keyrings are a secure option, here are some additional best practices you can consider:

  • Token Rotation: Regularly rotate your token and avoid long-lived secrets.
  • Environment Isolation: Avoid running this CLI in shared or untrusted environments.
  • Two-Factor Authentication (2FA): Enable 2FA on your Asana account to enhance account-level security.

We are also trying to implement a feature that will remind you to rotate your token every 90 (or so) days.

Contributing

If something feels off, you see an opportunity to improve performance, or think some functionality is missing, we’d love to hear from you! Please review our contributing docs for detailed instructions on how to provide feedback or submit a pull request. Thank you!

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A command-line interface for managing Asana directly from your terminal.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages