feat: non-interactive CLI support with new commands#45
Conversation
…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>
|
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>
|
Fixed! The CI failure was a The fix extracts that inline logic into a proper |
|
BTW, thanks for taking a look at the PR. |
Note
These changes are maintained in a fork: jtsternberg/asana-cli
If you're looking for non-interactive CLI support,
--jsonoutput,tasks delete,projects sections, or Claude Code plugin integration, check it out.Summary
tasks create,tasks update, andtasks view— all commands work without interactive prompts when flags/args are provided--jsonflag totasks list,tasks search, andtasks viewfor machine-readable structured outputlistandsearchtext output for scripting workflows--limitflag totasks search, consistent withtasks list--assignee medefault fromsearchthat hid results from other assignees--creator-anyto--creatorfor natural flag namingtasks deletecommandprojects sectionscommand to list sections in a projectTask.AddFollowersAPI method (uses/tasks/{id}/addFollowersendpoint)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
--jsonfor structured output. Without ID, falls back to interactive selection.Task list (
tasks list)Now shows task IDs in text output. Supports
--jsonfor structured output (array of{id, name, due_on}).Task search (
tasks search)--limit/-lflag for result count--jsonfor structured output--assigneeno longer defaults tome— omit to search all assignees, pass--assignee meexplicitly to filter--creator-any→--creatorfor natural flag namingTask 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/)using-asana-cli— full command reference with search flags table, list-vs-search guidance, and verification stepstroubleshooting-asana— error diagnosis with common error tableasana-task-manager— autonomous agent for end-to-end Asana task managementasana-create-task,asana-update-task,asana-delete-taskslash commandsasanaCLI commandscheck-auth.shutility for verifying CLI authenticationREADME
Test plan
asana tasks create -n "Test" -a me -p "Project" -d tomorrowcreates task without promptsasana tasks update <id> --completemarks task completeasana tasks view <id>displays task details with permalink URLasana tasks view <id> --jsonoutputs structured JSONasana tasks list --jsonoutputs JSON array with task IDsasana tasks search --query "test" --limit 5 --jsonoutputs limited JSON resultsasana tasks search --query "test"searches all assignees (no default filter)asana tasks search --creator mefilters by task creatorasana tasks delete <id>removes taskasana projects sections "Project Name"lists sections🤖 Generated with Claude Code