Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "asana-cli",
"description": "Manage Asana tasks, Asana projects, and Asana workspace users via the asana CLI",
"owner": { "name": "jtsternberg" },
"plugins": [
{
"name": "asana-cli",
"source": "./claude-plugin",
"description": "Non-interactive Asana CLI for task management, project organization, and team collaboration",
"version": "1.0.0"
}
]
}
125 changes: 98 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,61 +93,114 @@ asana config get default-workspace
asana config get dw
```

## Basic Commands
## Task Management

View your tasks:
### Create a task

All commands support both interactive and non-interactive modes. Provide flags to skip prompts:

```shell
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
asana tasks create \
-n "Task name" \
-a "Assignee Name" \
-p "Project Name" \
-s "Section Name" \
-d "2025-04-01" \
-m "Task description" \
-f "Follower One,Follower Two"
```

View tasks with filters:
| Flag | Short | Required | Description |
|------|-------|----------|-------------|
| `--name` | `-n` | Yes* | Task name |
| `--assignee` | `-a` | Yes* | Assignee name, ID, or `me` |
| `--project` | `-p` | Yes* | Project name or ID |
| `--section` | `-s` | No | Section name or ID (defaults to first section) |
| `--due` | `-d` | No | Due date: `YYYY-MM-DD`, `today`, `tomorrow` |
| `--description` | `-m` | No | Task description |
| `--followers` | `-f` | No | Comma-separated follower names or IDs |
| `--non-interactive` | | No | Explicitly prevent prompts; errors on missing fields |

\*Required in non-interactive mode. When all three are provided, non-interactive mode is auto-detected.

Without flags, the command falls back to interactive prompts.

### Update a task

Pass a task ID to use flags, or omit for interactive mode:

```shell
asana tasks search --assignee me,12345678 # Search tasks by assignee and more filters
asana tasks update <task-id> \
-n "New name" \
-d "2025-04-01" \
-a "New Assignee" \
-f "Follower Name" \
--complete
```

Log, check and delete time entries on your tasks:
| Flag | Short | Description |
|------|-------|-------------|
| `--name` | `-n` | New task name |
| `--description` | `-m` | New description |
| `--due` | `-d` | New due date |
| `--assignee` | `-a` | New assignee name or `me` |
| `--followers` | `-f` | Comma-separated follower names to add |
| `--complete` | | Mark task as completed |
| `--non-interactive` | | Explicitly prevent prompts |

### View, list, search, and delete tasks

```shell
# Create a new time entry
asana time create -m 23 --date 2025-01-06
asana tasks view <task-id> # View task details (or omit ID for interactive)
asana tasks list # List all your tasks
asana tasks list --sort due-desc # Sort tasks by descending due date
asana tasks search --assignee me # Search your assigned tasks
asana tasks search --query "deploy" -l 5 # Search with limit
asana tasks search --creator me # Search tasks you created
asana tasks delete <task-id> # Delete a task by ID
```

# Check time entries
asana time status
Task IDs are shown in `list` and `search` output for easy use with other commands.

# Delete a time entry
asana time delete
```
### Structured output (JSON)

View the projects in your workspace:
All task commands (`list`, `search`, `view`) support `--json` for machine-readable output:

```shell
asana projects list # List all the projects
asana projects list -l 25 --sort desc # List with options
asana tasks list --json # JSON array of {id, name, due_on}
asana tasks search --query "bug" --json # Search results as JSON
asana tasks view <task-id> --json # Full task details as JSON
```

View the teams in your workspace:
### Name matching

All name-based flags (assignee, project, section, followers) support case-insensitive exact matching, partial/contains matching, and Asana GID matching. For example, `-a "Chris"` will match "Chris Christoff" if no exact "Chris" exists.

## Time Tracking

```shell
asana teams list # List all teams
asana time create -m 23 --date 2025-01-06 # Log time
asana time status # Check time entries
asana time delete # Delete a time entry
```

View the users in your workspace:
## Projects

```shell
asana users list # List all the users
asana users list -l 25 --sort desc # List with options
asana projects list # List all projects
asana projects list -l 25 --sort desc # List with options
asana projects sections "Project Name" # List sections in a project
asana projects tasks # List tasks in a project
asana projects tasks --sections # Group by section
```

View tags of your workspace:
## Teams, Users, and Tags

```shell
asana tags list # List all tags
asana tags list --favorite # List tags that you marked as favorite
asana teams list # List all teams
asana users list # List all users
asana tags list # List all tags
asana tags list --favorite # List favorite tags
```

For more usage:
Expand All @@ -156,6 +209,24 @@ For more usage:
asana help # Show all available commands
```

# Claude Code Plugin

This repo includes a [Claude Code](https://claude.com/claude-code) plugin for AI-assisted Asana task management.

## Installation

```shell
claude plugins add /path/to/asana-cli
```

## What's included

- **Skills**: `using-asana-cli` (command reference), `troubleshooting-asana` (error diagnosis)
- **Commands**: `/asana-create-task`, `/asana-update-task`, `/asana-delete-task`
- **Agent**: `asana-task-manager` for autonomous task management

The `asana` CLI must be installed and authenticated (`asana auth login`) before using the plugin.

# Security

To keep your Asana credentials safe, this CLI uses your system's keyring for secure token storage.
Expand Down
23 changes: 23 additions & 0 deletions claude-plugin/.claude-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Asana CLI Plugin for Claude Code

Manage Asana tasks, projects, and users directly from Claude Code conversations.

## Installation

Add to your Claude Code plugins:

```bash
claude plugins add /path/to/asana-cli
```

## Features

- Create, update, and delete tasks non-interactively
- List projects, sections, and users
- Add followers/collaborators to tasks
- Search tasks across workspaces

## Prerequisites

- `asana` CLI installed and authenticated (`asana auth login`)
- Run `asana auth status` to verify your setup
11 changes: 11 additions & 0 deletions claude-plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "asana-cli",
"description": "Manage Asana tasks, projects, and users via the asana CLI",
"version": "1.0.0",
"author": { "name": "jtsternberg", "url": "https://github.com/jtsternberg" },
"repository": "https://github.com/jtsternberg/asana",
"license": "MIT",
"keywords": ["asana", "tasks", "projects", "project-management"],
"skills": "./skills/",
"commands": "./commands/"
}
37 changes: 37 additions & 0 deletions claude-plugin/agents/asana-task-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: Autonomous agent for managing Asana tasks end-to-end via the `asana` CLI
allowed_tools:
- Bash
- Read
- Grep
- Glob
---

# Asana Task Manager Agent

You are a specialist agent for managing Asana tasks using the `asana` CLI.

## Capabilities

- Create tasks with full metadata (name, assignee, project, section, due date, followers)
- Update existing tasks (rename, reassign, change due dates, add followers, complete)
- Delete tasks
- List and search tasks
- Discover projects, sections, and users

## Reference

See the `using-asana-cli` skill for full command reference, flag details, and name matching behavior.

## Guidelines

1. Always verify auth first: `asana auth status`
2. Use non-interactive flags for all operations — never rely on interactive prompts
3. When creating tasks, always provide `-n`, `-a`, and `-p` at minimum
4. Verify results after create/update with `asana tasks view <task-id>`

## Error Handling

- If a command fails with "unknown flag", the user may be running the upstream version — rebuild from `~/Code/asana-cli`
- If a command fails with "not found", use list/search commands to discover correct names or IDs
- If authentication fails, prompt the user to run `asana auth login`
38 changes: 38 additions & 0 deletions claude-plugin/commands/asana-create-task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Create Asana Task

Create a new Asana task with full metadata.

## Usage

/asana-cli:asana-create-task [task description]

## Arguments

- `task description` (optional) - Natural language description of the task to create

## Instructions

1. Parse the user's request for: task name, assignee, project, section, due date, description, and followers
2. If project is unknown, list available projects: `asana projects list -l 20`
3. If section is unknown, list sections: `asana projects sections "Project Name"`
4. If assignee is unclear, list users: `asana users list`
5. Create the task with all available flags:

```bash
asana tasks create \
-n "Task name" \
-a "Assignee" \
-p "Project" \
-s "Section" \
-d "YYYY-MM-DD" \
-m "Description" \
-f "Follower1,Follower2"
```

6. Report the created task URL back to the user

## Error Handling

- If creation fails, check `asana auth status` first
- If a name doesn't match, use list commands to discover the correct value
- If section is not found, run `asana projects sections "Project"` and suggest alternatives
22 changes: 22 additions & 0 deletions claude-plugin/commands/asana-delete-task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Delete Asana Task

Permanently delete an Asana task.

## Usage

/asana-cli:asana-delete-task <task-id>

## Arguments

- `task-id` (required) - The Asana task ID

## Instructions

1. Confirm the task ID with the user before deleting
2. Run: `asana tasks delete <task-id>`
3. Report success or failure

## Error Handling

- If task not found, inform the user the ID may be wrong
- This action is permanent and cannot be undone
35 changes: 35 additions & 0 deletions claude-plugin/commands/asana-update-task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Update Asana Task

Update an existing Asana task by its Asana task ID.

## Usage

/asana-cli:asana-update-task <task-id> [updates]

## Arguments

- `task-id` (required) - The Asana task ID or URL
- `updates` (optional) - Natural language description of changes

## Instructions

1. Extract the task ID from the argument (if a URL, parse the ID from it)
2. Parse requested changes: name, due date, assignee, followers, completion, description
3. Run the update:

```bash
asana tasks update <task-id> \
[-n "New name"] \
[-d "YYYY-MM-DD"] \
[-a "Assignee"] \
[-f "Follower1,Follower2"] \
[-m "Description"] \
[--complete]
```

4. Report the result to the user

## Error Handling

- If task not found, ask the user to verify the ID
- If user/assignee not found, run `asana users list` and suggest closest match
3 changes: 3 additions & 0 deletions claude-plugin/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"hooks": []
}
7 changes: 7 additions & 0 deletions claude-plugin/scripts/check-auth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# Verify asana CLI is authenticated and ready
if ! command -v asana &> /dev/null; then
echo "ERROR: asana CLI not found. Build from ~/Code/asana-cli: go build -o /usr/local/bin/asana ./cmd/asana"
exit 1
fi
asana auth status 2>&1
15 changes: 15 additions & 0 deletions claude-plugin/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"permissions": {
"allow": [
"Bash(asana auth *)",
"Bash(asana tasks *)",
"Bash(asana projects *)",
"Bash(asana users *)",
"Bash(asana workspaces *)",
"Bash(asana teams *)",
"Bash(asana tags *)",
"Bash(asana config *)",
"Bash(asana search *)"
]
}
}
Loading
Loading