CLI Workflows
CLI Workflows
Section titled “CLI Workflows”Practical command-line examples for common Agentic workflows. These can be used directly in your terminal or incorporated into shell scripts.
Setup & Configuration
Section titled “Setup & Configuration”Initialize a New Project
Section titled “Initialize a New Project”# Interactive initializationagentic init
# Non-interactive with defaultsagentic init --non-interactiveVerify Token Configuration
Section titled “Verify Token Configuration”# Check all tokensagentic tokens status
# Validate tokens are workingagentic tokens validate
# Get token for specific repoagentic tokens for-repo my-org/my-repoAgent Operations
Section titled “Agent Operations”Spawn a Single Agent
Section titled “Spawn a Single Agent”# Basic spawnagentic fleet spawn "https://github.com/my-org/my-repo" \ "Fix the failing CI workflow"
# With auto-PR creationagentic fleet spawn "https://github.com/my-org/my-repo" \ "Update dependencies to latest versions" \ --auto-pr
# On specific branch with custom target branchagentic fleet spawn "https://github.com/my-org/my-repo" \ "Implement user authentication" \ --ref develop \ --branch feature/auth \ --auto-prMonitor Agents
Section titled “Monitor Agents”# List all agentsagentic fleet list
# List only running agentsagentic fleet list --running
# Get fleet summaryagentic fleet summary
# Watch agent status (refresh every 30s)watch -n 30 'agentic fleet list --running'Interact with Running Agents
Section titled “Interact with Running Agents”# Send a followup messageagentic fleet followup bc-xxx-xxx "Please focus on the authentication module first"
# Request status updateagentic fleet followup bc-xxx-xxx "What's your current progress?"
# Provide additional contextagentic fleet followup bc-xxx-xxx "The config file is at ./config/settings.json"Triage Operations
Section titled “Triage Operations”Quick Analysis
Section titled “Quick Analysis”# Analyze an error messageagentic triage quick "TypeError: Cannot read property 'map' of undefined"
# Analyze a log snippetagentic triage quick "$(tail -50 /var/log/app/error.log)"Code Review
Section titled “Code Review”# Review current changes vs mainagentic triage review --base main --head HEAD
# Review a specific branchagentic triage review --base main --head feature/user-auth
# Review with specific modelagentic triage review --base main --head HEAD --model claude-opus-4-20250514Analyze Agent Conversations
Section titled “Analyze Agent Conversations”# Generate markdown reportagentic triage analyze bc-xxx-xxx -o ./reports/agent-analysis.md
# Create GitHub issues from findingsagentic triage analyze bc-xxx-xxx --create-issues
# Both report and issuesagentic triage analyze bc-xxx-xxx -o report.md --create-issuesSandbox Operations
Section titled “Sandbox Operations”Single Sandbox Execution
Section titled “Single Sandbox Execution”# Basic analysisagentic sandbox run "Analyze this codebase for security issues" \ --workspace . \ --output ./security-analysis
# With specific runtime and timeoutagentic sandbox run "Refactor the API layer" \ --runtime claude \ --workspace ./src/api \ --output ./api-refactor \ --timeout 600
# With resource limitsagentic sandbox run "Process large dataset" \ --workspace . \ --output ./results \ --memory 4096 \ --timeout 1800Parallel Fleet Execution
Section titled “Parallel Fleet Execution”# Run multiple analyses in parallelagentic sandbox fleet \ "Review authentication system" \ "Analyze database queries for N+1" \ "Check for XSS vulnerabilities" \ --workspace . \ --output ./fleet-analysisCoordination Workflows
Section titled “Coordination Workflows”Coordinate Multiple Agents
Section titled “Coordinate Multiple Agents”# Start coordination loopagentic fleet coordinate \ --pr 123 \ --repo my-org/control-center \ --agents agent-1,agent-2,agent-3Handoff Between Agents
Section titled “Handoff Between Agents”# Initiate handoff from predecessoragentic handoff initiate bc-predecessor-xxx \ --pr 123 \ --branch feature/my-feature \ --repo https://github.com/my-org/my-repo
# Confirm as successoragentic handoff confirm bc-predecessor-xxx
# Take over workagentic handoff takeover bc-predecessor-xxx 123 feature/continuedScripted Workflows
Section titled “Scripted Workflows”Multi-Repo Dependency Update
Section titled “Multi-Repo Dependency Update”#!/bin/bash# update-deps.sh - Update dependencies across multiple repos
REPOS=( "my-org/frontend" "my-org/backend" "my-org/shared-lib" "my-org/mobile")
for repo in "${REPOS[@]}"; do echo "📦 Spawning agent for $repo..." agentic fleet spawn "https://github.com/$repo" \ "Update all dependencies to latest compatible versions. Run tests and fix any breaking changes." \ --auto-pr \ --branch "chore/update-deps-$(date +%Y%m%d)"done
echo "✅ All agents spawned. Monitor with: agentic fleet list --running"Security Audit Script
Section titled “Security Audit Script”#!/bin/bash# security-audit.sh - Run security audit on codebase
OUTPUT_DIR="./security-audit-$(date +%Y%m%d)"mkdir -p "$OUTPUT_DIR"
echo "🔍 Running security audit..."
agentic sandbox run "$(cat <<'EOF'Perform a comprehensive security audit:
1. Check for hardcoded secrets and API keys2. Identify SQL injection vulnerabilities3. Find XSS attack vectors4. Review authentication flows5. Check for insecure dependencies6. Identify OWASP Top 10 issues
Create a detailed report with:- Severity ratings (Critical/High/Medium/Low)- File paths and line numbers- Remediation stepsEOF)" \ --workspace . \ --output "$OUTPUT_DIR" \ --timeout 900 \ --memory 2048
echo "✅ Audit complete. Results in $OUTPUT_DIR"Release Preparation
Section titled “Release Preparation”#!/bin/bash# prepare-release.sh - Prepare a new release
VERSION=$1if [ -z "$VERSION" ]; then echo "Usage: $0 <version>" exit 1fi
echo "🚀 Preparing release v$VERSION"
# Spawn documentation agentDOC_AGENT=$(agentic fleet spawn "https://github.com/my-org/docs" \ "Update documentation for v$VERSION release. Update version numbers, add changelog entries, and ensure all examples work." \ --auto-pr --branch "release/v$VERSION-docs" 2>&1 | grep -o 'bc-[a-z0-9-]*')
# Spawn changelog agentCHANGELOG_AGENT=$(agentic fleet spawn "https://github.com/my-org/app" \ "Generate CHANGELOG entries for v$VERSION. Review all commits since last release and create comprehensive changelog." \ --auto-pr --branch "release/v$VERSION-changelog" 2>&1 | grep -o 'bc-[a-z0-9-]*')
# Spawn test agentTEST_AGENT=$(agentic fleet spawn "https://github.com/my-org/app" \ "Run full test suite and create release readiness report for v$VERSION." \ --auto-pr --branch "release/v$VERSION-tests" 2>&1 | grep -o 'bc-[a-z0-9-]*')
echo "📋 Agents spawned:"echo " Docs: $DOC_AGENT"echo " Changelog: $CHANGELOG_AGENT"echo " Tests: $TEST_AGENT"
# Broadcast coordination messageagentic fleet broadcast "$DOC_AGENT,$CHANGELOG_AGENT,$TEST_AGENT" \ "COORDINATION: Working on v$VERSION release. Report any blockers to the release PR."CI Integration
Section titled “CI Integration”#!/bin/bash# ci-triage.sh - Analyze CI failures
# Get the last failed runFAILED_RUN=$(gh run list --status failure --limit 1 --json databaseId -q '.[0].databaseId')
if [ -z "$FAILED_RUN" ]; then echo "✅ No failed runs found" exit 0fi
# Get logsLOGS=$(gh run view "$FAILED_RUN" --log 2>&1 | tail -200)
# Analyze with AIagentic triage quick "CI run $FAILED_RUN failed with these logs:
$LOGS
What's the likely cause and how should we fix it?"Crew CLI (Python)
Section titled “Crew CLI (Python)”List Available Runners
Section titled “List Available Runners”agentic-crew list-runnersRun a Crew
Section titled “Run a Crew”# Run with auto-detected frameworkagentic-crew run my-package analyzer --input "Analyze ./src"
# Force specific frameworkagentic-crew run my-package analyzer --framework crewai --input "..."Single-Agent Runners
Section titled “Single-Agent Runners”# Quick fix with Aideragentic-crew run --runner aider --input "Fix the typo in README.md"
# Free local execution with Ollamaagentic-crew run --runner ollama --input "Add docstrings" --model deepseek-coder
# Complex task with Claude Codeagentic-crew run --runner claude-code --input "Refactor auth module"Tips & Tricks
Section titled “Tips & Tricks”Use Environment Variables
Section titled “Use Environment Variables”# Set defaultsexport AGENTIC_REPOSITORY="my-org/my-repo"export AGENTIC_PROVIDER="anthropic"export AGENTIC_MODEL="claude-sonnet-4-20250514"JSON Output for Scripting
Section titled “JSON Output for Scripting”# Get agent list as JSONagentic fleet list --json | jq '.[] | select(.status == "RUNNING")'
# Get summary as JSONagentic fleet summary --jsonCombine with Standard Tools
Section titled “Combine with Standard Tools”# Find and fix all TODO commentsgrep -rn "TODO:" ./src | agentic triage quick "$(cat -)"
# Analyze git diffgit diff main | agentic triage quick "Review these changes"
# Check recent commitsgit log --oneline -10 | agentic triage quick "Summarize recent work"Next Steps
Section titled “Next Steps”- TypeScript Examples - Programmatic TypeScript examples
- Python Examples - Python crew examples
- API Reference - Complete API documentation