{"_id":"@agent-cli/agent-cli","name":"@agent-cli/agent-cli","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@agent-cli/agent-cli","version":"0.0.1","engines":{"node":">=20.0.0"},"type":"module","workspaces":["packages/*"],"repository":{"type":"git","url":"git+https://github.com/agent-cli/agent-cli.git"},"config":{"sandboxImageUri":"ghcr.io/agent-cli/agent-cli:0.0.1"},"scripts":{"start":"node scripts/start.js","debug":"cross-env DEBUG=1 node --inspect-brk scripts/start.js","auth:npm":"npx google-artifactregistry-auth","auth:docker":"gcloud auth configure-docker us-west1-docker.pkg.dev","auth":"npm run auth:npm && npm run auth:docker","generate":"node scripts/generate-git-commit-info.js","build":"node scripts/build.js","build-and-start":"npm run build && npm run start","build:vscode":"node scripts/build_vscode_companion.js","build:all":"npm run build && npm run build:sandbox && npm run build:vscode","build:packages":"npm run build --workspaces","build:sandbox":"node scripts/build_sandbox.js --skip-npm-install-build","bundle":"npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js","test":"npm run test --workspaces --if-present","test:ci":"npm run test:ci --workspaces --if-present && npm run test:scripts","test:scripts":"vitest run --config ./scripts/tests/vitest.config.ts","test:e2e":"cross-env VERBOSE=true KEEP_OUTPUT=true npm run test:integration:sandbox:none","test:integration:all":"npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman","test:integration:sandbox:none":"GEMINI_SANDBOX=false vitest run --root ./integration-tests","test:integration:sandbox:docker":"GEMINI_SANDBOX=docker npm run build:sandbox && GEMINI_SANDBOX=docker vitest run --root ./integration-tests","test:integration:sandbox:podman":"GEMINI_SANDBOX=podman vitest run --root ./integration-tests","test:terminal-bench":"cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests","test:terminal-bench:oracle":"cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests -t 'oracle'","test:terminal-bench:qwen":"cross-env VERBOSE=true KEEP_OUTPUT=true vitest run --config ./vitest.terminal-bench.config.ts --root ./integration-tests -t 'qwen'","lint":"eslint . --ext .ts,.tsx && eslint integration-tests","lint:fix":"eslint . --fix && eslint integration-tests --fix","lint:ci":"eslint . --ext .ts,.tsx --max-warnings 0 && eslint integration-tests --max-warnings 0","format":"prettier --experimental-cli --write .","typecheck":"npm run typecheck --workspaces --if-present","preflight":"npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci","prepare":"npm run bundle","prepare:package":"node scripts/prepare-package.js","release:version":"node scripts/version.js","telemetry":"node scripts/telemetry.js","clean":"node scripts/clean.js"},"bin":{"qwen":"bundle/agent.js"},"devDependencies":{"@types/marked":"^5.0.2","@types/mime-types":"^3.0.1","@types/minimatch":"^5.1.2","@types/mock-fs":"^4.13.4","@types/qrcode-terminal":"^0.12.2","@types/shell-quote":"^1.7.5","@types/uuid":"^10.0.0","@vitest/coverage-v8":"^3.1.1","@vitest/eslint-plugin":"^1.3.4","concurrently":"^9.2.0","cross-env":"^7.0.3","esbuild":"^0.25.0","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","eslint-plugin-import":"^2.31.0","eslint-plugin-license-header":"^0.8.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","glob":"^10.4.5","globals":"^16.0.0","json":"^11.0.0","lodash":"^4.17.21","memfs":"^4.17.2","mnemonist":"^0.40.3","mock-fs":"^5.5.0","msw":"^2.10.4","prettier":"^3.5.3","react-devtools-core":"^4.28.5","tsx":"^4.20.3","typescript-eslint":"^8.30.1","vitest":"^3.2.4","yargs":"^17.7.2"},"dependencies":{"@lvce-editor/ripgrep":"^1.6.0","simple-git":"^3.28.0","strip-ansi":"^7.1.0"},"optionalDependencies":{"@lydell/node-pty":"1.1.0","@lydell/node-pty-darwin-arm64":"1.1.0","@lydell/node-pty-darwin-x64":"1.1.0","@lydell/node-pty-linux-x64":"1.1.0","@lydell/node-pty-win32-arm64":"1.1.0","@lydell/node-pty-win32-x64":"1.1.0","node-pty":"^1.0.0"},"_id":"@agent-cli/agent-cli@0.0.1","gitHead":"cdf6965b110a3a677c8d40cf1b10256af573fc83","description":"<div align=\"center\">","bugs":{"url":"https://github.com/agent-cli/agent-cli/issues"},"homepage":"https://github.com/agent-cli/agent-cli#readme","_nodeVersion":"22.19.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-Sk17L/Xb0SBqm7YQWiNI6X66rbOTzHFJucWwlzPTEOnYp8kig7ErnTUn3hL+yXs4f0eN63bP5mJO0BbiDnSBow==","shasum":"72c793974305ca4288c0ed1e2e0d0288763d655b","tarball":"https://registry.npmjs.org/@agent-cli/agent-cli/-/agent-cli-0.0.1.tgz","fileCount":10,"unpackedSize":13450183,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF4CZWydLbf9CA3ahMvavvPdPdLwxJs+RM4JEIszTmVXAiEAi6eTWyiwq9MktEVlLWyyDuM9fFLHYsrsYIPwTqKisGw="}]},"_npmUser":{"name":"dev-agent","email":"Dloring1988@gmail.com"},"directories":{},"maintainers":[{"name":"dev-agent","email":"Dloring1988@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli_0.0.1_1758826932997_0.9834327653157615"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-25T19:02:12.937Z","0.0.1":"2025-09-25T19:02:13.227Z","modified":"2025-09-25T19:02:13.555Z"},"maintainers":[{"name":"dev-agent","email":"Dloring1988@gmail.com"}],"description":"<div align=\"center\">","homepage":"https://github.com/agent-cli/agent-cli#readme","repository":{"type":"git","url":"git+https://github.com/agent-cli/agent-cli.git"},"bugs":{"url":"https://github.com/agent-cli/agent-cli/issues"},"readme":"# Agent CLI\n\n<div align=\"center\">\n\n![Agent CLI Screenshot](./docs/assets/agent-screenshot.png)\n\n[![npm version](https://img.shields.io/npm/v/@agent-cli/agent-cli.svg)](https://www.npmjs.com/package/@agent-cli/agent-cli)\n[![License](https://img.shields.io/github/license/agent-cli/agent-cli.svg)](./LICENSE)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)\n[![Downloads](https://img.shields.io/npm/dm/@agent-cli/agent-cli.svg)](https://www.npmjs.com/package/@agent-cli/agent-cli)\n\n**AI-powered command-line workflow tool for developers**\n\n[Installation](#installation) • [Quick Start](#quick-start) • [Features](#key-features) • [Documentation](./docs/) • [Contributing](./CONTRIBUTING.md)\n\n</div>\n\nAgent CLI is a powerful command-line AI workflow tool optimized for use with many differnt models. It enhances your development workflow with advanced code understanding, automated tasks, and intelligent assistance.\n\n## 💡 Free Options Available\n\nGet started with Agent CLI at no cost using any of these free options:\n\n### 🔥 Qwen OAuth (Recommended)\n\n- **2,000 requests per day** with no token limits\n- **60 requests per minute** rate limit\n- Simply run `agent` and authenticate with your qwen.ai account\n- Automatic credential management and refresh\n- Use `/auth` command to switch to Qwen OAuth if you have initialized with OpenAI compatible mode\n\n### 🌟 Google OAuth & VertexAI\n\n- **60 requests/min and 1,000 requests/day** with personal Google account\n- **Access to powerful Gemini 2.5 Pro** with 1M token context window\n- **Built-in tools**: Google Search grounding, file operations, shell commands, web fetching\n- **Enterprise features**: Advanced security and compliance with Vertex AI\n- **Scalable**: Higher rate limits with billing account through Vertex AI\n\n### 🌏 Regional Free Tiers\n\n- **International**: OpenRouter provides **up to 1,000 free API calls per day** worldwide\n\nFor detailed setup instructions, see [Authorization](#authorization).\n\n> [!WARNING]\n> **Token Usage Notice**: Agent CLI may issue multiple API calls per cycle, resulting in higher token usage (similar to Claude Code). We're actively optimizing API efficiency.\n\n## Key Features\n\n- **Code Understanding & Editing** - Query and edit large codebases beyond traditional context window limits\n- **Workflow Automation** - Automate operational tasks like handling pull requests and complex rebases\n- **Enhanced Parser** - Adapted parser specifically optimized for Qwen-Coder models\n- **Vision Model Support** - Automatically detect images in your input and seamlessly switch to vision-capable models for multimodal analysis\n\n## Installation\n\n### Prerequisites\n\nEnsure you have [Node.js version 20](https://nodejs.org/en/download) or higher installed.\n\n```bash\ncurl -qL https://www.npmjs.com/install.sh | sh\n```\n\n### Install from npm\n\n```bash\nnpm install -g @agent-cli/agent-cli@latest\nagent --version\n```\n\n### Install from source\n\n```bash\ngit clone https://github.com/agent-cli/agent-cli.git\ncd agent-cli\nnpm install\nnpm install -g .\n```\n\n### Install globally with Homebrew (macOS/Linux)\n\n```bash\nbrew install agent-cli\n```\n\n## Quick Start\n\n```bash\n# Start Agent CLI\nagent\n\n# Example commands\n> Explain this codebase structure\n> Help me refactor this function\n> Generate unit tests for this module\n```\n\n### Session Management\n\nControl your token usage with configurable session limits to optimize costs and performance.\n\n#### Configure Session Token Limit\n\nCreate or edit `.agent/settings.json` in your home directory:\n\n```json\n{\n  \"sessionTokenLimit\": 32000\n}\n```\n\n#### Session Commands\n\n- **`/compress`** - Compress conversation history to continue within token limits\n- **`/clear`** - Clear all conversation history and start fresh\n- **`/stats`** - Check current token usage and limits\n\n> 📝 **Note**: Session token limit applies to a single conversation, not cumulative API calls.\n\n### Vision Model Configuration\n\nAgent CLI includes intelligent vision model auto-switching that detects images in your input and can automatically switch to vision-capable models for multimodal analysis. **This feature is enabled by default** - when you include images in your queries, you'll see a dialog asking how you'd like to handle the vision model switch.\n\n#### Skip the Switch Dialog (Optional)\n\nIf you don't want to see the interactive dialog each time, configure the default behavior in your `.agent/settings.json`:\n\n```json\n{\n  \"experimental\": {\n    \"vlmSwitchMode\": \"once\"\n  }\n}\n```\n\n**Available modes:**\n\n- **`\"once\"`** - Switch to vision model for this query only, then revert\n- **`\"session\"`** - Switch to vision model for the entire session\n- **`\"persist\"`** - Continue with current model (no switching)\n- **Not set** - Show interactive dialog each time (default)\n\n#### Command Line Override\n\nYou can also set the behavior via command line:\n\n```bash\n# Switch once per query\nagent --vlm-switch-mode once\n\n# Switch for entire session\nagent --vlm-switch-mode session\n\n# Never switch automatically\nagent --vlm-switch-mode persist\n```\n\n#### Disable Vision Models (Optional)\n\nTo completely disable vision model support, add to your `.agent/settings.json`:\n\n```json\n{\n  \"experimental\": {\n    \"visionModelPreview\": false\n  }\n}\n```\n\n> 💡 **Tip**: In YOLO mode (`--yolo`), vision switching happens automatically without prompts when images are detected.\n\n### Authorization\n\nChoose your preferred authentication method based on your needs:\n\n#### 1. Qwen OAuth (🚀 Recommended - Start in 30 seconds)\n\nThe easiest way to get started - completely free with generous quotas:\n\n```bash\n# Just run this command and follow the browser authentication\nagent\n```\n\n**What happens:**\n\n1. **Instant Setup**: CLI opens your browser automatically\n2. **One-Click Login**: Authenticate with your qwen.ai account\n3. **Automatic Management**: Credentials cached locally for future use\n4. **No Configuration**: Zero setup required - just start coding!\n\n**Free Tier Benefits:**\n\n- ✅ **2,000 requests/day** (no token counting needed)\n- ✅ **60 requests/minute** rate limit\n- ✅ **Automatic credential refresh**\n- ✅ **Zero cost** for individual users\n- ℹ️ **Note**: Model fallback may occur to maintain service quality\n\n### 2. Login with Google (OAuth)\n\nAlternative authentication option with Google services:\n\n**Benefits:**\n\n- **Free tier** with 60 requests/min and 1,000 requests/day\n- **Access to Gemini 2.5 Pro and Flash** with 1M token context window\n- **No API key management** - just sign in with your Google account\n- **Automatic updates** to latest models\n\n#### 3. Vertex AI\n\nBest for enterprise teams and production workloads:\n\n**Benefits:**\n\n- **Enterprise features**: Advanced security and compliance\n- **Scalable**: Higher rate limits with billing account\n- **Integration**: Works with existing Google Cloud infrastructure\n\n#### 4. OpenAI-Compatible API\n\nUse API keys for OpenAI or other compatible providers:\n\n**Configuration Methods:**\n\n1. **Environment Variables**\n\n   ```bash\n   export OPENAI_API_KEY=\"your_api_key_here\"\n   export OPENAI_BASE_URL=\"your_api_endpoint\"\n   export OPENAI_MODEL=\"your_model_choice\"\n   ```\n\n2. **Project `.env` File**\n   Create a `.env` file in your project root:\n   ```env\n   OPENAI_API_KEY=your_api_key_here\n   OPENAI_BASE_URL=your_api_endpoint\n   OPENAI_MODEL=your_model_choice\n   ```\n\n**API Provider Options**\n\n> ⚠️ **Regional Notice:**\n>\n> - **Mainland China**: Use Alibaba Cloud Bailian or ModelScope\n> - **International**: Use Alibaba Cloud ModelStudio or OpenRouter\n\n<details>\n<summary><b>🇨🇳 For Users in Mainland China</b></summary>\n\n**Option 1: Alibaba Cloud Bailian** ([Apply for API Key](https://bailian.console.aliyun.com/))\n\n```bash\nexport OPENAI_API_KEY=\"your_api_key_here\"\nexport OPENAI_BASE_URL=\"https://dashscope.aliyuncs.com/compatible-mode/v1\"\nexport OPENAI_MODEL=\"qwen3-coder-plus\"\n```\n\n**Option 2: ModelScope (Free Tier)** ([Apply for API Key](https://modelscope.cn/docs/model-service/API-Inference/intro))\n\n- ✅ **2,000 free API calls per day**\n- ⚠️ Connect your Aliyun account to avoid authentication errors\n\n```bash\nexport OPENAI_API_KEY=\"your_api_key_here\"\nexport OPENAI_BASE_URL=\"https://api-inference.modelscope.cn/v1\"\nexport OPENAI_MODEL=\"Qwen/Qwen3-Coder-480B-A35B-Instruct\"\n```\n\n</details>\n\n<details>\n<summary><b>🌍 For International Users</b></summary>\n\n**Option 1: Alibaba Cloud ModelStudio** ([Apply for API Key](https://modelstudio.console.alibabacloud.com/))\n\n```bash\nexport OPENAI_API_KEY=\"your_api_key_here\"\nexport OPENAI_BASE_URL=\"https://dashscope-intl.aliyuncs.com/compatible-mode/v1\"\nexport OPENAI_MODEL=\"qwen3-coder-plus\"\n```\n\n**Option 2: OpenRouter (Free Tier Available)** ([Apply for API Key](https://openrouter.ai/))\n\n```bash\nexport OPENAI_API_KEY=\"your_api_key_here\"\nexport OPENAI_BASE_URL=\"https://openrouter.ai/api/v1\"\nexport OPENAI_MODEL=\"qwen/qwen3-coder:free\"\n```\n\n</details>\n\n## Commands & Shortcuts\n\n### Session Commands\n\n- `/help` - Display available commands\n- `/clear` - Clear conversation history\n- `/compress` - Compress history to save tokens\n- `/stats` - Show current session information\n- `/exit` or `/quit` - Exit Agent CLI\n\n### Keyboard Shortcuts\n\n- `Ctrl+C` - Cancel current operation\n- `Ctrl+D` - Exit (on empty line)\n- `Up/Down` - Navigate command history\n\n\n## Development & Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to contribute to the project.\n\nFor detailed authentication setup, see the [authentication guide](./docs/cli/authentication.md).\n\n## Troubleshooting\n\nIf you encounter issues, check the [troubleshooting guide](docs/troubleshooting.md).\n\n## Acknowledgments\n\nThis project is adapted from [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) and [Qwen Code](https://github.com/agent-cli-robot/qwen-code). We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.\n\n## License\n\n[LICENSE](./LICENSE)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=agent-cli/agent-cli&type=Date)](https://www.star-history.com/#agent-cli/agent-cli&Date)\n","readmeFilename":"README.md","_rev":"1-eb3b5c580454c8b7b4628214e11bd506"}