@xagent-ai/cli
v1.4.1
Published
xAgent CLI - AI-powered command-line assistant for autonomous living
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-Agent Team - Collaborate with specialized AI teammates | | 🌐 | 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 | ✅ | ❌ | ❌ | | Multi-Agent Team | ✅ | ✅ | ❌ | | 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👥 Multi-Agent Team
> Create a team with developer and reviewer to implement user authentication
> Spawn a QA teammate to test the login flow while I work on the dashboard
> Have 3 teammates work in parallel: coding, testing, and documentation🔄 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-5, 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-5",
"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"
}⌨️ Slash Commands
Use slash commands in interactive mode (xagent start) to manage xAgent features:
| Command | Description |
|---------|-------------|
| /help | Show help information |
| /init | Initialize project context |
| /clear | Clear conversation history |
| /exit | Exit program |
| /auth | Configure authentication |
| /mode [mode] | Switch approval mode |
| /agents [list\|online\|install\|remove] | Manage SubAgents |
| /mcp [list\|add\|remove\|refresh] | Manage MCP servers |
| /skill [list\|add\|remove] | Manage skills |
| /model | Configure LLM/VLM models |
| /memory [show\|clear] | Manage project memory |
| /restore | Restore from checkpoint |
| /tools [verbose\|simple] | Manage tool display |
| /stats | Show session statistics |
| /theme | Switch UI theme |
| /about | Show version info |
| /update | Check for updates |
MCP Management
/mcp list # List all MCP servers
/mcp add # Add MCP server (interactive)
/mcp remove <name> # Remove an MCP server
/mcp refresh # Refresh MCP connectionsSkill Management
/skill list # List installed skills
/skill add ./my-skill # Install from local path
/skill add owner/repo # Install from GitHub
/skill remove <name> # Remove a skill💡 Tip: All features are also available via CLI commands. Run
xagent --helpfor details.
📚 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
