DevTeam CLI
Command-line interface for DevTeam.ai - run AI agents locally and integrate with your development workflow.
Installation
via npm
bash
npm install -g @devteam/clivia Homebrew (macOS/Linux)
bash
brew tap devteam-ai/tapbrew install devteamvia Direct Download
Download pre-built binaries from GitHub Releases:
- macOS:
devteam-darwin-arm64ordevteam-darwin-x64 - Linux:
devteam-linux-x64 - Windows:
devteam-windows-x64.exe
Authentication
Interactive Login
bash
devteam auth login
# Opens browser for OAuth authentication# Token is stored securely in your system keychainAPI Key Authentication
bash
export DEVTEAM_API_KEY=your_api_key_here
# Or set in ~/.devteamrcecho "api_key=your_api_key_here" > ~/.devteamrcCheck Authentication Status
bash
devteam auth whoami
# Output:# Authenticated as: user@example.com# Organization: Acme Inc# Plan: Pro (100 tasks/month)Core Commands
devteam review
Run AI code review on changed files
bash
# Review all changed filesdevteam review
# Review specific filesdevteam review --files "src/**/*.ts"
# Review with specific agentdevteam review --agent security-analystdevteam implement
Auto-implement features from issue descriptions
bash
# Implement from GitHub issuedevteam implement --issue 123
# Implement from descriptiondevteam implement --description "Add dark mode toggle to settings"
# Create branch and PR automaticallydevteam implement --issue 123 --create-prdevteam test
Generate tests for your code
bash
# Generate tests for a filedevteam test --file src/utils.ts
# Generate tests for entire directorydevteam test --directory src/components
# Generate with specific frameworkdevteam test --file src/utils.ts --framework vitestdevteam plan
AI-powered sprint planning
bash
# Plan next sprint from backlogdevteam plan --milestone v2.0
# Generate task breakdowndevteam plan --epic "User Authentication"
# Export to Linear/Jiradevteam plan --milestone v2.0 --export linearAdvanced Commands
Agent Management
bash
# List available agent rolesdevteam agents list
# Spawn an agent for a projectdevteam agents spawn --project my-app --role frontend-specialist
# Chat with an agentdevteam agents chat --agent ag_12345
# View agent statusdevteam agents status --project my-appProject Management
bash
# Create a new projectdevteam projects create --name "My App" --description "A cool app"
# List all projectsdevteam projects list
# View project detailsdevteam projects show --id proj_12345
# Archive a projectdevteam projects archive --id proj_12345Knowledge Base
bash
# Search institutional knowledgedevteam knowledge search "react query pagination"
# Store a code patterndevteam knowledge store --type code-pattern \ --title "Optimistic Updates Pattern" \ --file pattern.md
# Export knowledge for sharingdevteam knowledge export --output knowledge.jsonConfiguration
Configure CLI behavior with ~/.devteamrc or project-level .devteamrc:
ini
# API Configurationapi_key=dtk_xxxxxxxxxxxxxapi_endpoint=https://devteam-api.finhub.workers.dev/graphql
# Default Settingsdefault_project=proj_12345default_agent_role=code-reviewer
# Output Preferencesoutput_format=json # json, table, or markdowncolor=trueverbose=false
# Git Integrationauto_commit=trueauto_push=falsebranch_prefix=devteam/
# Review Settingsreview_auto_fix=falsereview_inline_comments=truereview_severity_threshold=mediumCLI Flags Reference
Global Flags
| Flag | Description |
|---|---|
--api-key | Override API key from config |
--project | Specify project ID or name |
--output | Output format (json, table, markdown) |
--verbose, -v | Enable verbose logging |
--quiet, -q | Suppress output |
--help, -h | Show help |
Review Command Flags
| Flag | Description |
|---|---|
--files | Glob pattern for files to review |
--agent | Specific agent role to use |
--auto-fix | Automatically apply suggested fixes |
--severity | Min severity (info, low, medium, high, critical) |
--format | Output format (terminal, github, gitlab) |
Implement Command Flags
| Flag | Description |
|---|---|
--issue | GitHub issue number |
--description | Feature description text |
--branch | Branch name for changes |
--create-pr | Create PR after implementation |
--agent | Specific agent to use |
Integration Examples
Git Hooks
Run review on pre-commit:
bash
# .git/hooks/pre-commit#!/bin/bashdevteam review --files $(git diff --cached --name-only)
if [ $? -ne 0 ]; then echo "Code review failed. Fix issues or use --no-verify to skip." exit 1fiCI/CD Integration
yaml
# GitLab CIcode_review: stage: test script: - npm install -g @devteam/cli - devteam review --output gitlab only: - merge_requests
# CircleCIversion: 2.1jobs: review: docker: - image: cimg/node:18.0 steps: - checkout - run: npm install -g @devteam/cli - run: devteam review --output json > review.json - store_artifacts: path: review.jsonVSCode Integration
Add to .vscode/tasks.json:
json
{ "version": "2.0.0", "tasks": [ { "label": "DevTeam: Review Current File", "type": "shell", "command": "devteam review --files ${file}", "problemMatcher": [] }, { "label": "DevTeam: Generate Tests", "type": "shell", "command": "devteam test --file ${file}", "problemMatcher": [] } ]}Troubleshooting
Command Not Found
bash
# Check installationwhich devteam
# Reinstall if needednpm install -g @devteam/cli --force
# Or add to PATHexport PATH="$PATH:/usr/local/bin"Authentication Errors
bash
# Verify API keydevteam auth whoami
# Re-authenticatedevteam auth logoutdevteam auth login
# Check API key permissionsdevteam auth check-scopesEnable Debug Mode
bash
# Set debug environment variableexport DEVTEAM_DEBUG=true
# Or use verbose flagdevteam review --verbose