Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

feat: non-interactive CLI support with new commands#45

Closed
jtsternberg wants to merge 16 commits into
timwehrle:mainfrom
jtsternberg:feat/non-interactive-cli-and-plugin
Closed

feat: non-interactive CLI support with new commands#45
jtsternberg wants to merge 16 commits into
timwehrle:mainfrom
jtsternberg:feat/non-interactive-cli-and-plugin

Conversation

@jtsternberg

@jtsternberg jtsternberg commented Mar 11, 2026

Copy link
Copy Markdown

Note

These changes are maintained in a fork: jtsternberg/asana-cli
If you're looking for non-interactive CLI support, --json output, tasks delete, projects sections, or Claude Code plugin integration, check it out.

Summary

  • Add non-interactive flag support to tasks create, tasks update, and tasks view — all commands work without interactive prompts when flags/args are provided
  • Add --json flag to tasks list, tasks search, and tasks view for machine-readable structured output
  • Show task IDs in list and search text output for scripting workflows
  • Add --limit flag to tasks search, consistent with tasks list
  • Remove silent --assignee me default from search that hid results from other assignees
  • Rename --creator-any to --creator for natural flag naming
  • Add tasks delete command
  • Add projects sections command to list sections in a project
  • Add Task.AddFollowers API method (uses /tasks/{id}/addFollowers endpoint)
  • Include a Claude Code plugin with skills, commands, agent, and settings for AI-assisted Asana task management
  • Add Claude Code Plugin section to README
  • Expand search skill documentation with full flags table and list-vs-search guidance

Changes

Task create (tasks create)

New flags: --name/-n, --assignee/-a, --project/-p, --section/-s, --due/-d, --description/-m, --followers/-f, --non-interactive. Auto-detects non-interactive mode when name+assignee+project are all provided. Falls back to interactive prompts without flags.

Task update (tasks update)

Accepts optional task ID as first argument. With ID: uses flags (--name, --description, --due, --assignee, --followers, --complete, --non-interactive). Without ID: falls back to interactive mode.

Task view (tasks view)

Accepts optional task ID argument for direct viewing. Shows permalink URL in output. Supports --json for structured output. Without ID, falls back to interactive selection.

Task list (tasks list)

Now shows task IDs in text output. Supports --json for structured output (array of {id, name, due_on}).

Task search (tasks search)

  • Now shows task IDs in text output
  • New --limit/-l flag for result count
  • Supports --json for structured output
  • Breaking: --assignee no longer defaults to me — omit to search all assignees, pass --assignee me explicitly to filter
  • Renamed: --creator-any--creator for natural flag naming

Task delete (tasks delete)

New command. Takes task ID as argument, confirms task exists, then deletes it.

Projects sections (projects sections)

New command. Lists sections for a named project using paginated API calls.

AddFollowers API

Separate endpoint method since Asana rejects followers in the PUT /tasks/{id} body. Uses POST /tasks/{id}/addFollowers.

Name matching

All name-based flags support case-insensitive exact matching, partial/contains matching, and Asana GID matching.

Claude Code plugin (claude-plugin/)

  • Skill: using-asana-cli — full command reference with search flags table, list-vs-search guidance, and verification steps
  • Skill: troubleshooting-asana — error diagnosis with common error table
  • Agent: asana-task-manager — autonomous agent for end-to-end Asana task management
  • Commands: asana-create-task, asana-update-task, asana-delete-task slash commands
  • Settings: permission allowlist for asana CLI commands
  • Scripts: check-auth.sh utility for verifying CLI authentication

README

  • Document Claude Code Plugin: installation, included skills/commands/agent, prerequisites
  • Full documentation of all new CLI flags and commands

Test plan

  • asana tasks create -n "Test" -a me -p "Project" -d tomorrow creates task without prompts
  • asana tasks update <id> --complete marks task complete
  • asana tasks view <id> displays task details with permalink URL
  • asana tasks view <id> --json outputs structured JSON
  • asana tasks list --json outputs JSON array with task IDs
  • asana tasks search --query "test" --limit 5 --json outputs limited JSON results
  • asana tasks search --query "test" searches all assignees (no default filter)
  • asana tasks search --creator me filters by task creator
  • asana tasks delete <id> removes task
  • asana projects sections "Project Name" lists sections
  • All commands fall back to interactive mode when flags/args omitted
  • Existing interactive workflows remain unchanged
  • Claude Code plugin loads and skill activates on Asana mentions

🤖 Generated with Claude Code

jtsternberg and others added 15 commits March 11, 2026 17:19
…ctive flags

Enable fully non-interactive task creation by adding flags for project,
section, and followers. Non-interactive mode auto-detects when name,
assignee, and project are all provided, or can be set explicitly.
Followers are resolved by name (exact, partial, or ID match).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Task.AddFollowers for the /tasks/{id}/addFollowers endpoint,
since followers cannot be set via the standard update endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Accept task ID as argument with flags: --name, --description, --due,
--assignee, --followers, --complete, --non-interactive. Falls back to
interactive mode when no task ID is given.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete an Asana task by ID: asana tasks delete <task-id>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
List sections in a project by name: asana projects sections "Project Name"
Supports exact and partial name matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add plugin structure for Claude Code integration:
- Skills: using-asana-cli, troubleshooting-asana
- Commands: create-task, update-task, delete-task
- Agent: task-manager (autonomous Asana task management)
- Settings with permission allowlist for asana commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Accepts optional task-id argument for direct task viewing without
interactive prompts. Shows permalink URL in output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update SKILL.md: document view/list/search non-interactive flags,
  condense name matching, replace common patterns with verification step
- Deduplicate agent: reference skill instead of copying command table
- Add check-auth.sh utility script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document create/update flag tables, task view/delete commands,
projects sections command, and name matching behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents name collisions with other plugins that may have
generic task-manager, create-task, etc. names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Show task IDs in list and search text output (ID: 123456)
- Add --json flag to list, search, and view for structured output
- Add --limit flag to search, consistent with list

These changes enable non-interactive scripting workflows where task IDs
from list/search can be piped into view/update/delete commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove silent default of --assignee me that hid tasks assigned to
  others, making search miss results unexpectedly
- Rename --creator-any to --creator for natural flag naming
- Update examples to show creator and unfiltered search patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l docs

- Add Claude Code Plugin section to README with installation, features, and prerequisites
- Expand search flags table in using-asana-cli skill with all supported flags
- Add list vs search guidance to clarify when to use each command
- Add explicit "assigned to me" vs "created by me" examples

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timwehrle

Copy link
Copy Markdown
Owner

Thanks for the pull request. Please fix the failing tasks. As this entire PR was generated by Claude, it will take some time to approve it.

…tests

The test file referenced getOrPromptDueDate which didn't exist as a
standalone function. Extract the inline due-date logic from runCreate
into a proper helper function that the tests can call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jtsternberg

Copy link
Copy Markdown
Author

Fixed! The CI failure was a typecheck lint error — create_test.go referenced a getOrPromptDueDate function that didn't exist as a standalone helper. The due-date logic was inlined in runCreate instead.

The fix extracts that inline logic into a proper getOrPromptDueDate(opts) helper function that both runCreate and the tests can use. Build and tests pass locally now.

@jtsternberg

Copy link
Copy Markdown
Author

BTW, thanks for taking a look at the PR.
No pressure on this PR at all — feel free to close it if these changes don't align with your vision for the project. I'm maintaining my fork for my own workflow needs either way, so nothing lost on my end.

@timwehrle timwehrle closed this Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants