@xagent-ai/cli
v1.2.2
Published
xAgent CLI - AI-powered command-line assistant for autonomous living
Downloads
596
Readme
🤖 xAgent CLI - Your Autonomous Life AI Assistant

Official Website | English | 中文
🚀 The Future of AI Assistants is Here
xAgent CLI is not just another AI coding assistant — it's an intelligent agent for personal PCs and autonomous living that transforms how you interact with your digital life.
✨ Why xAgent CLI?
| 🎯 | Universal AI Companion | |------|------------------------| | 🏠 | Life Automation - From file organization to smart scheduling | | 💻 | Professional Development - Code, debug, and deploy with AI | | 🌐 | Multi-Model Support - Free access to Kimi K2, Qwen3 Coder, DeepSeek v3 | | 🔧 | GUI Automation - Precise mouse/keyboard control for any task | | 🔒 | Flexible Security - 5 execution modes from YOLO to DEFAULT |
⚡ Quick Start
# Install
npm i -g @xagent-ai/cli
# Launch
xagent startThat's it! Start automating your digital life in seconds.
📊 Feature Comparison
| Feature | xAgent CLI | Claude Code | Gemini CLI | |:--------|:----------:|:-----------:|:----------:| | Life Automation | ✅ | ❌ | ❌ | | PC Smart Management | ✅ | ❌ | ❌ | | Todo Planning | ✅ | ✅ | ❌ | | SubAgent System | ✅ | ✅ | ❌ | | Plan Mode | ✅ | ✅ | ❌ | | Task Tools | ✅ | ✅ | ❌ | | Conversation Recovery | ✅ | ✅ | ❌ | | Context Auto-compression | ✅ | ✅ | ✅ | | Web Search | ✅ | ❌ | ⚠️ | | Thinking Mode | ✅ | ✅ | ❌ | | Workflow System | ✅ | ❌ | ❌ |
🎯 What Can xAgent Do?
🏠 Life Assistant
> Organize my desktop, categorize files by type
> Set up daily backup to cloud storage
> Remind me of meetings at 3 PM
> Find largest files eating disk space💼 Productivity Booster
> Batch rename files with date format
> Download all PDFs from a webpage
> Analyze Excel data, generate charts
> Translate documents preserving format👨💻 Developer Companion
> Analyze project architecture
> Find and fix bug root causes
> Create RESTful APIs with auth
> Code review PRs automatically🔄 Automation Expert
> Download stock prices, send email alerts
> Auto-update project dependencies
> Monitor websites, alert on downtime🛠️ Execution Modes
| Mode | Permissions | Best For | |------|-------------|----------| | 🟢 YOLO | Full control | Complete AI autonomy | | 🟡 ACCEPT_EDITS | File only | Safe coding | | 🔵 PLAN | Plan → Execute | Complex tasks | | ⚪ DEFAULT | Approval required | Security-first | | 🟣 SMART | Intelligent | Daily use (recommended) |
🔑 Free to Use
xAgent offers completely free access with multiple authentication options:
| Method | Description | |--------|-------------| | 🔐 xAgent Account | Browser-based login (recommended) | | 🔑 API Key | Server environments | | 🌐 Third-Party APIs | GLM-4, DeepSeek, Qwen, Kimi, and more |
🏗️ Technology Stack
📦 Project Structure
xagent-cli/
├── src/
│ ├── tools/ # 12+ built-in tools
│ ├── agents/ # SubAgent system
│ ├── gui-subagent/ # GUI automation
│ ├── workflow/ # Workflow engine
│ ├── checkpoint/ # State persistence
│ └── mcp/ # MCP integration
├── dist/ # Compiled output
├── docs/ # Documentation
├── test/ # Test suite
└── package.json🧪 Testing & Quality
npm test # Unit tests
npm run lint # ESLint
npm run format # Prettier
npm run typecheck # TypeScript⚙️ Configuration
Customize xAgent by editing ~/.xagent/settings.json:
{
"theme": "Default",
"selectedAuthType": "openai_compatible",
"apiKey": "your-api-key",
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
"modelName": "glm-4.7",
"guiSubagentModel": "doubao-1-5-ui-tars-250428",
"guiSubagentBaseUrl": "https://ark.cn-beijing.volces.com/api/v3",
"guiSubagentApiKey": "your-api-key",
"searchApiKey": "",
"executionMode": "smart",
"approvalMode": "smart",
"checkpointing": {
"enabled": false,
"autoCreate": true,
"maxCheckpoints": 10
},
"thinking": {
"enabled": true,
"mode": "normal",
"displayMode": "compact"
},
"contextCompression": {
"enabled": true,
"maxMessages": 30,
"maxContextSize": 1500000,
"preserveRecentMessages": 0,
"enableSummary": true
},
"contextFileName": "XAGENT.md",
"mcpServers": {},
"language": "en",
"autoUpdate": true,
"telemetryEnabled": true,
"showToolDetails": false,
"showAIDebugInfo": false,
"loggerLevel": "info",
"contextCompress": {
"enabled": false,
"autoTrigger": false,
"messageThreshold": 50,
"tokenThreshold": 100000,
"strategy": "summary",
"preserveRecent": 5
},
"type": "openai_compatible"
}📚 Documentation
- 📖 Architecture
- 🔧 Tool System
- 🔌 SKILL, Worflow and MCP Integration
- 💻 CLI Commands
- 🤝 Contributing
- 🔑 Third-Party Models
🤝 Contributing
We welcome contributions! Here's how to get started:
- 🍴 Fork the repository
- 🌿 Create a feature branch
- ✅ Ensure tests pass
- 📝 Submit a PR
📄 License
MIT License - See LICENSE
🙏 Acknowledgments
Built with ❤️ using Ink • Powered by xAgent Platform
🌟 Star us on GitHub!
Empowering Your Digital Life with AI
