Skip to main content

AnyTask CLI Usage Guide

The anyt CLI is an AI-native task management tool built for Linear-style workflows. It supports both human users and AI agents as first-class citizens.

Table of Contents


Installation

# Recommended: Install script
curl -fsSL https://anyt.dev/install.sh | sh

# Verify installation
anyt --version
For detailed installation options and methods, see the Installation Guide.

Quick Start

1. Set Up Authentication

Set the ANYT_API_KEY environment variable:
export ANYT_API_KEY=anyt_agent_xxxxxxxxxxxxx

2. Initialize Workspace

anyt init --workspace-id 123 --identifier DEV
This creates a .anyt/ directory with workspace configuration.

3. Verify Connection

anyt health check

4. Create and Manage Tasks

# Create a task
anyt task add "Implement user authentication" --status todo --priority 1

# View board
anyt board

# Pick a task to work on
anyt task pick DEV-1

# Show active task
anyt active

# Mark as done
anyt task done

Authentication & Configuration

Environment Variables

Authentication is handled exclusively via environment variables:
# Required: API key for authentication
export ANYT_API_KEY=anyt_agent_xxxxxxxxxxxxx

# Optional: Override config directory
export ANYT_CONFIG_DIR=/custom/path

Health Check

Verify backend server connectivity:
anyt health check
Shows:
  • Current API URL
  • Server connectivity status
  • Server version

Workspace Initialization

Initialize AnyTask in your project directory:
anyt init [OPTIONS]
Options:
  • --workspace-id, -w: Workspace ID to link to (required)
  • --workspace-name, -n: Workspace name (optional)
  • --identifier, -i: Workspace identifier (e.g., DEV, PROJ)
  • --dir, -d: Directory to initialize (default: current)
Examples:
# Initialize workspace
anyt init --workspace-id 123 --identifier DEV

# Initialize in specific directory
anyt init --workspace-id 123 --identifier DEV --dir /path/to/project
What it creates: Creates .anyt/anyt.json workspace configuration:
{
  "workspace_id": 123,
  "workspace_name": "Development",
  "workspace_identifier": "DEV",
  "api_url": "https://api.anyt.dev",
  "current_project_id": null,
  "last_sync": "2025-11-06T10:30:00Z"
}

Task Management

Create Tasks

Quick creation:
anyt task add <title> [OPTIONS]
Options:
  • -d, --description: Task description
  • --phase: Phase/milestone identifier (e.g., T3, Phase 1)
  • -p, --priority: Priority (-2 to 2, default: 0)
  • --labels: Comma-separated labels
  • --status: Task status (backlog, todo, in_progress, done, cancelled)
  • --owner: Assign to user or agent ID
  • --estimate: Time estimate in hours
  • --project: Project ID
  • --json: Output in JSON format
Examples:
anyt task add "Implement OAuth" --priority 1
anyt task add "Fix login bug" -p 2 --labels bug,auth
anyt task add "Update docs" -d "Add API documentation" --estimate 3
anyt task add "Phase 3 task" --phase T3 --priority 2
Template-based creation:
anyt task create <title> [OPTIONS]
Options:
  • --template, -t: Template name to use (default: default)
  • --phase: Phase/milestone identifier
  • -p, --priority: Priority (-2 to 2)
  • --project: Project ID
  • --no-edit: Skip opening editor
  • --json: Output in JSON format
Opens template in your editor ($EDITOR) for customization before creating. Examples:
anyt task create "New Feature" --template feature
anyt task create "Bug Fix" -t bugfix --priority 2 --no-edit

List Tasks

anyt task list [OPTIONS]
Options:
  • --status: Filter by status (comma-separated)
  • --mine: Show only tasks assigned to you
  • --assignee, -a: Filter by assignee (user ID or agent ID)
  • --me: Show only my tasks (alias for —mine)
  • --labels: Filter by labels (comma-separated)
  • --phase: Filter by phase/milestone
  • --sort: Sort field (priority, updated_at, created_at, status)
  • --order: Sort order (asc/desc)
  • --limit: Max number of tasks to show
  • --offset: Pagination offset
  • --json: Output in JSON format
Examples:
anyt task list
anyt task list --status todo,in_progress
anyt task list --mine --sort priority
anyt task list --labels bug --limit 10
anyt task list --assignee user-123 --status todo
anyt task list --phase T7 --status in_progress

Show Task Details

anyt task show [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier (e.g., DEV-42, t_1Z for UID). Uses active task if not specified.
Options:
  • --workspace, -w: Workspace identifier or ID
  • --show-metadata: Display workflow execution metadata
  • --json: Output in JSON format
Examples:
anyt task show DEV-42
anyt task show       # Uses active task
anyt task show t_1Z  # By UID
anyt task show DEV-42 --show-metadata

Edit Tasks

anyt task edit [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier (uses active task if not specified)
Options:
  • --title: New title
  • -d, --description: New description
  • --status: New status
  • -p, --priority: New priority (-2 to 2)
  • --labels: Comma-separated labels (replaces all)
  • --owner: New owner ID
  • --estimate: New time estimate in hours
  • --ids: Multiple task IDs (comma-separated, for bulk)
  • --if-match: Expected version for optimistic locking
  • --dry-run: Preview changes without applying
  • --json: Output in JSON format
Examples:
# Edit single task
anyt task edit DEV-42 --status in_progress
anyt task edit DEV-42 --priority 2 --labels bug,urgent

# Bulk edit
anyt task edit --ids DEV-42,DEV-43,DEV-44 --status done

# Preview changes
anyt task edit DEV-42 --priority 2 --dry-run

Bulk Update

anyt task bulk-update <task_ids> [OPTIONS]
Arguments:
  • task_ids: Comma-separated task identifiers (e.g., ‘DEV-1,DEV-2,DEV-3’)
Options:
  • --status, -s: New status for all tasks
  • --priority, -p: New priority for all (-2 to 2)
  • --assignee, -a: Assignee username or ID
  • --project: Project identifier or ID
  • --yes, -y: Skip confirmation prompt
  • --json: Output as JSON
Examples:
anyt task bulk-update DEV-1,DEV-2,DEV-3 --status in_progress
anyt task bulk-update DEV-4,DEV-5 --priority 2
anyt task bulk-update DEV-6,DEV-7,DEV-8 --assignee john --yes

Mark as Done

anyt task done [IDENTIFIERS...] [OPTIONS]
Arguments:
  • IDENTIFIERS: Task identifier(s). Uses active task if not specified.
Options:
  • --note, -n: Add a completion note to the task
  • --json: Output in JSON format
Examples:
anyt task done DEV-42
anyt task done DEV-42 DEV-43 DEV-44
anyt task done DEV-42 --note "All tests passing"
anyt task done  # Marks active task as done

Delete Tasks

anyt task rm [IDENTIFIERS...] [OPTIONS]
Arguments:
  • IDENTIFIERS: Task identifier(s). Uses active task if not specified.
Options:
  • --force, -f: Skip confirmation prompt
  • --json: Output in JSON format
Examples:
anyt task rm DEV-42
anyt task rm DEV-42 DEV-43 --force
anyt task rm  # Deletes active task (with confirmation)
Performs soft delete (sets deleted_at timestamp).

Add Note to Task

anyt task note [IDENTIFIER] [OPTIONS]
DEPRECATED: Use anyt comment add instead for better structure. Arguments:
  • IDENTIFIER: Task identifier (uses active task if not specified)
Options:
  • --message, -m: Note message to append
  • --json: Output in JSON format
Examples:
anyt task note DEV-42 --message "Completed implementation"
anyt task note --message "Fixed edge case"  # Uses active task

Share Task

anyt task share [IDENTIFIER] [OPTIONS]
Generate a shareable link for a task. Arguments:
  • IDENTIFIER: Task identifier (e.g., DEV-42, t_1Z for UID). Uses active task if not specified.
Options:
  • --copy, -c: Copy link to clipboard
  • --json: Output in JSON format
Examples:
anyt task share DEV-42
anyt task share DEV-42 --copy
anyt task share  # Uses active task

Suggest Tasks

anyt task suggest [OPTIONS]
Get intelligent task recommendations based on priority and dependencies. Options:
  • --limit: Number of suggestions to return (default: 3)
  • --status: Filter by status (comma-separated, default: todo,backlog)
  • --include-assigned: Include already-assigned tasks
  • --json: Output in JSON format
Examples:
anyt task suggest
anyt task suggest --limit 5
anyt task suggest --status todo --include-assigned

Comments

Add Comment

anyt comment add [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier. Uses active task if not provided.
Options:
  • --message, -m: Comment content (required)
  • --json: Output as JSON
Examples:
# Add comment to active task
anyt comment add -m "Completed implementation"

# Add comment to specific task
anyt comment add DEV-123 -m "Found edge case"

List Comments

anyt comment list [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier. Uses active task if not provided.
Options:
  • --json: Output as JSON
Examples:
# List comments on active task
anyt comment list

# List comments on specific task
anyt comment list DEV-123

# JSON output
anyt comment list DEV-123 --json

Dependency Management

Add Dependencies

anyt task dep add [IDENTIFIER] --on <DEPENDENCIES>
Arguments:
  • IDENTIFIER: Task identifier (uses active task if not specified)
Options:
  • --on: Task(s) this depends on (comma-separated identifiers, required)
  • --json: Output in JSON format
Examples:
# DEV-43 depends on DEV-42
anyt task dep add DEV-43 --on DEV-42

# DEV-50 depends on multiple tasks
anyt task dep add DEV-50 --on DEV-42,DEV-43,DEV-44

# Use active task
anyt task pick DEV-43
anyt task dep add --on DEV-42

Remove Dependencies

anyt task dep rm [IDENTIFIER] --on <DEPENDENCIES>
Arguments:
  • IDENTIFIER: Task identifier (uses active task if not specified)
Options:
  • --on: Task(s) to remove dependency on (comma-separated, required)
  • --json: Output in JSON format
Examples:
anyt task dep rm DEV-43 --on DEV-42
anyt task dep rm DEV-50 --on DEV-42,DEV-43

List Dependencies

anyt task dep list [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier (uses active task if not specified)
Options:
  • --json: Output in JSON format
Shows:
  • Dependencies (tasks this depends on) with status indicators
  • Blocks (tasks that depend on this) with status indicators
Status Indicators:
  • ✓ done
  • ⬤ in_progress
  • ⬜ backlog/todo
Example:
anyt task dep list DEV-43

Active Task Tracking

Pick Active Task

anyt task pick [IDENTIFIER] [OPTIONS]
Arguments:
  • IDENTIFIER: Task identifier (optional - shows interactive picker if not specified)
Options:
  • --status: Filter by status (comma-separated)
  • --project: Filter by project ID
  • --mine: Show only tasks assigned to you
  • --json: Output in JSON format
Examples:
# Pick a specific task
anyt task pick DEV-42

# Interactive picker
anyt task pick

# Interactive picker with filters
anyt task pick --status todo,backlog
anyt task pick --mine
The picked task is saved to .anyt/active_task.json for use as default in other commands.

Show Active Task

anyt active
Displays detailed information about the currently active task (set via anyt task pick).

Board & Visualization

Kanban Board

anyt board [OPTIONS]
Display tasks in a Kanban board view. Options:
  • --mine: Show only tasks assigned to you
  • --assignee, -a: Filter by assignee (user ID or agent ID)
  • --me: Show only my tasks (alias for —mine)
  • --labels: Filter by labels (comma-separated)
  • --status: Filter by status (comma-separated)
  • --phase: Filter by phase/milestone
  • --group-by: Group by (status, priority, owner, labels)
  • --sort: Sort within groups (priority, updated_at)
  • --compact: Compact display mode
  • --limit: Max tasks per lane
  • --json: Output in JSON format
Examples:
anyt board
anyt board --mine
anyt board --labels bug,auth
anyt board --compact
anyt board --group-by priority --sort updated_at
anyt board --assignee user-123 --status todo,in_progress
anyt board --phase T7 --status in_progress

Dependency Graph

anyt graph [IDENTIFIER] [OPTIONS]
Visualize task dependencies as ASCII art, DOT format, or JSON. Arguments:
  • IDENTIFIER: Task identifier to show dependencies for (shows all if not specified)
Options:
  • --format: Output format (ascii, dot, json)
  • --status: Filter by status (comma-separated)
  • --priority-min: Filter by minimum priority
  • --labels: Filter by labels (comma-separated)
  • --phase: Filter by phase/milestone
  • --mine: Show only tasks assigned to you
  • --depth: Max dependency depth to show
  • --compact: Compact display mode
  • --json: Output in JSON format
Examples:
# Show dependencies for specific task
anyt graph DEV-42

# Show all tasks with dependencies
anyt graph

# Filter by status
anyt graph --status in_progress,backlog

# Export as PNG using Graphviz
anyt graph --format dot | dot -Tpng > graph.png

# Limit depth
anyt graph --depth 2

Timeline View

anyt timeline <identifier> [OPTIONS]
Show chronological timeline of task events, attempts, and artifacts. Arguments:
  • identifier: Task identifier (e.g., DEV-42)
Options:
  • --since: Show events since date (YYYY-MM-DD)
  • --last: Show events from last N hours/days (e.g., 24h, 7d)
  • --compact: Compact format
  • --json: Output in JSON format
Examples:
anyt timeline DEV-42
anyt timeline DEV-42 --last 24h
anyt timeline DEV-42 --since 2025-11-01

Workspace Summary

anyt summary [OPTIONS]
Generate workspace summary with done, active, blocked, and next priorities. Options:
  • --period: Summary period (today, weekly, monthly)
  • --phase: Filter by phase/milestone
  • --format: Output format (text, markdown, json)
  • --json: Output in JSON format
Examples:
anyt summary
anyt summary --period weekly
anyt summary --format markdown > summary.md
anyt summary --phase T7

Worker System

Automated task execution for AI agents.

Start Worker

anyt worker start [OPTIONS]
Options:
  • --workspace, -w: Workspace directory (default: current)
  • --workflow: Specific workflow to run (local_dev, feature_development, general_task)
  • --workflows: Custom workflows directory (default: .anyt/workflows)
  • --poll-interval, -i: Polling interval in seconds
  • --max-backoff: Maximum backoff interval in seconds
  • --agent-id, -a: Agent identifier (required)
  • --project-id, -p: Project ID to scope task suggestions
Built-in workflows:
  • local_dev: Direct implementation on current repository
  • feature_development: Full feature workflow with branch management
  • general_task: General-purpose task execution
Examples:
# Start with all workflows
export ANYT_API_KEY=anyt_agent_xxx
anyt worker start --agent-id agent-xxx

# Start with specific workflow
anyt worker start --workflow local_dev --agent-id agent-xxx

# Custom configuration
anyt worker start --poll-interval 10 --workspace /path/to/project --agent-id agent-xxx

List Workflows

anyt worker list-workflows [OPTIONS]
Options:
  • --workflows: Workflows directory (default: .anyt/workflows)
Example:
anyt worker list-workflows
anyt worker list-workflows --workflows /custom/path

Validate Workflow

anyt worker validate-workflow <workflow_file>
Arguments:
  • workflow_file: Workflow file to validate
Example:
anyt worker validate-workflow .anyt/workflows/my_workflow.yaml

Secret Management

Store secret:
anyt worker secret set <name> [OPTIONS]
Options:
  • --value, -v: Secret value (or will prompt)
Examples:
anyt worker secret set PRODUCTION_API_KEY --value abc123
anyt worker secret set DB_PASSWORD  # Will prompt
Retrieve secret:
anyt worker secret get <name> [OPTIONS]
Options:
  • --show: Show the secret value (default: masked)
Examples:
anyt worker secret get API_KEY
anyt worker secret get API_KEY --show
Delete secret:
anyt worker secret delete <name> [OPTIONS]
Options:
  • --yes, -y: Skip confirmation
Examples:
anyt worker secret delete OLD_API_KEY
anyt worker secret delete OLD_API_KEY --yes
Test secret interpolation:
anyt worker secret test <text>
Example:
anyt worker secret test "API_KEY=\${{ secrets.API_KEY }}"

Workflow Attempts

List attempts:
anyt attempt list <task_id>
Show attempt details:
anyt attempt show <attempt_id>

Artifacts

Download artifact:
anyt artifact download <artifact_id> [OPTIONS]
Options:
  • --output, -o: Output file path
  • --stdout: Print to stdout instead of file
Examples:
anyt artifact download artifact-123 --output result.json
anyt artifact download artifact-123 --stdout

Configuration

Configuration Files

.anyt/anyt.json - Workspace configuration:
{
  "workspace_id": 123,
  "workspace_name": "Development",
  "workspace_identifier": "DEV",
  "api_url": "https://api.anyt.dev",
  "current_project_id": 456,
  "last_sync": "2025-11-06T10:30:00Z"
}
.anyt/active_task.json - Active task:
{
  "identifier": "DEV-42",
  "title": "Implement OAuth callback",
  "picked_at": "2025-11-06T10:30:00Z"
}

Environment Variables

Override configuration with environment variables:
  • ANYT_API_KEY: Agent API key (required)
  • ANYT_CONFIG_DIR: Override config directory (default: ~/.config/anyt)
Example:
# Use different API key per command
ANYT_API_KEY=anyt_agent_xxx anyt task list

JSON Output Mode

Most commands support --json flag for machine-readable output. Success Response:
{
  "success": true,
  "data": { ... }
}
Error Response:
{
  "success": false,
  "error": "ErrorType",
  "message": "Error description"
}

Troubleshooting

Not authenticated

Error: ANYT_API_KEY environment variable not set
Solution: Set the API key
export ANYT_API_KEY=anyt_agent_xxxxxxxxxxxxx

Not in a workspace directory

Error: Not in a workspace directory
Solution: Initialize workspace
anyt init --workspace-id 123 --identifier DEV

Task not found

Error: Task 'DEV-42' not found
Solution: Check task list
anyt task list
anyt task show DEV-42  # Shows suggestions

Connection failed

Error: Connection failed
Solution: Check API URL and connectivity
anyt health check
echo $ANYT_API_URL

Tips & Best Practices

Active Task Workflow

Pick a task to make it the default for subsequent commands:
anyt task pick DEV-42
anyt task show        # Shows DEV-42
anyt task edit --status in_progress
anyt task dep list
anyt task done        # Marks DEV-42 as done

Bulk Operations

Edit multiple tasks at once:
# Mark multiple tasks as done
anyt task done DEV-42 DEV-43 DEV-44

# Bulk update status
anyt task bulk-update DEV-42,DEV-43,DEV-44 --status in_progress --yes

# Delete multiple tasks
anyt task rm DEV-42 DEV-43 --force

Dependency Management

Build complex task graphs:
# Create tasks
anyt task add "Setup database" --priority 2
anyt task add "Create models" --priority 1
anyt task add "Build API" --priority 1

# Link dependencies
anyt task dep add DEV-2 --on DEV-1  # Models depend on database
anyt task dep add DEV-3 --on DEV-2  # API depends on models

# Visualize
anyt graph DEV-3

Board Filters

Focus on what matters:
# My high-priority tasks
anyt board --mine --sort priority

# All in-progress tasks
anyt board --status in_progress

# Compact view for quick overview
anyt board --compact

# Phase-specific tasks
anyt board --phase T7 --status todo,in_progress

Complete Workflow Example

# 1. Setup
export ANYT_API_KEY=anyt_agent_xxxxxxxxxxxxx
anyt init --workspace-id 123 --identifier DEV

# 2. Verify connection
anyt health check

# 3. Create tasks
anyt task add "Design authentication system" --priority 2
anyt task add "Implement JWT tokens" --priority 1
anyt task add "Add login endpoint" --priority 1

# 4. Link dependencies
anyt task dep add DEV-2 --on DEV-1
anyt task dep add DEV-3 --on DEV-2

# 5. Work on tasks
anyt board
anyt task pick DEV-1
anyt task edit --status in_progress
anyt comment add -m "Started implementation"
anyt task done --note "Design completed"

# 6. Continue with next task
anyt task pick DEV-2
anyt task edit --status in_progress
anyt task done

# 7. View progress
anyt summary
anyt graph DEV-3

Version

For the complete auto-generated command reference, see CLI Complete Reference. For bug reports and feature requests, contact: [email protected]