# zCode CLI X Agentic coder with **Z.AI + Telegram integration** โ€” Claude Code + Hermes in one beast. > ๐Ÿ’ก **Get 10% OFF Z.AI** โ€” Use code **ROK78RJKNW** at [z.ai/subscribe](https://z.ai/subscribe?ic=ROK78RJKNW) for the Coding Plan ## ๐Ÿš€ Features - **๐Ÿค– AI-Powered Code Generation**: Powered by Z.AI GLM-5.1 (Coding Plan) - **๐Ÿ“ฑ Telegram Bot**: 24/7 live interaction via Telegram - **๐Ÿ› ๏ธ Full Engineering Access**: Bash, FileEdit, WebSearch, Git tools - **๐Ÿง  Agent System**: Code reviewer, architect, DevOps engineer - **๐Ÿ“š Skills System**: Pre-built skills for common tasks - **โšก Real-time Updates**: WebSocket-based live communication ## ๐Ÿ“ฆ Installation ```bash cd zcode-cli-x npm install ``` ## โš™๏ธ Configuration Copy `.env.example` to `.env` and configure: ```bash cp .env.example .env ``` ### Required Environment Variables ```env # Z.AI Configuration (Coding Plan) GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4 ZAI_API_KEY=your_z...here # Telegram Bot Configuration TELEGRAM_BOT_TOKEN=your_b...here TELEGRAM_ALLOWED_USERS=your_telegram_id ZCODE_WEBHOOK_URL=https://your-domain.com/telegram/webhook ``` ## ๐ŸŽฎ Usage ### Run as CLI ```bash node bin/zcode.js ``` ### Run as Telegram Bot (24/7) ```bash node bin/zcode.js --bot ``` ### Run in Development Mode ```bash node bin/zcode.js --dev ``` ### Run Only CLI (No Bot) ```bash node bin/zcode.js --no-bot ``` ## ๐Ÿค– Telegram Bot Once running, you can interact with zCode CLI X via Telegram: 1. Start the bot: `/start` 2. Send your code requests or questions 3. Receive AI-powered responses in real-time ## ๐Ÿ› ๏ธ Tools Available - **Bash**: Execute shell commands - **FileEdit**: Edit files with diff-aware operations - **WebSearch**: Search the web for information - **Git**: Git operations (status, log, branch) ## ๐Ÿง  Agents - **Code Reviewer**: Review code for bugs and improvements - **System Architect**: Design system architecture and patterns - **DevOps Engineer**: Handle deployment, CI/CD, and infrastructure ## ๐Ÿ“š Skills - **code_review**: Review code for bugs, security issues, and improvements - **bug_fix**: Fix identified bugs in code - **refactor**: Refactor code for better quality - **documentation**: Generate and update documentation - **testing**: Write tests for code ## ๐Ÿ—๏ธ Architecture ``` zcode-cli-x/ โ”œโ”€โ”€ bin/ โ”‚ โ””โ”€โ”€ zcode.js # CLI entry point โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ api/ โ”‚ โ”‚ โ””โ”€โ”€ index.js # Z.AI API adapter โ”‚ โ”œโ”€โ”€ bot/ โ”‚ โ”‚ โ””โ”€โ”€ index.js # Telegram bot integration โ”‚ โ”œโ”€โ”€ tools/ โ”‚ โ”‚ โ”œโ”€โ”€ BashTool.js # Shell command executor โ”‚ โ”‚ โ”œโ”€โ”€ FileEditTool.js # File operations โ”‚ โ”‚ โ”œโ”€โ”€ WebSearchTool.js # Web search โ”‚ โ”‚ โ””โ”€โ”€ GitTool.js # Git operations โ”‚ โ”œโ”€โ”€ skills/ โ”‚ โ”‚ โ””โ”€โ”€ index.js # Skills system โ”‚ โ”œโ”€โ”€ agents/ โ”‚ โ”‚ โ””โ”€โ”€ index.js # Agent orchestration โ”‚ โ””โ”€โ”€ utils/ โ”‚ โ”œโ”€โ”€ logger.js # Winston logger โ”‚ โ””โ”€โ”€ env.js # Environment validation โ”œโ”€โ”€ .env # Configuration โ””โ”€โ”€ package.json ``` ## ๐Ÿ”— Integrations - **Z.AI API**: GLM-5.1 model with Coding Plan - **Telegram Bot API**: Webhook + WebSocket - **Express.js**: HTTP server - **Winston**: Logging ## ๐Ÿš€ Getting Started 1. Install dependencies: ```bash npm install ``` 2. Configure `.env` with your credentials 3. Run the bot: ```bash node bin/zcode.js --bot ``` 4. Open Telegram and start chatting! ## ๐Ÿ“ License MIT ## ๐Ÿ“Š Feature Comparison | Feature | zCode CLI X | Hermes Agent | better-clawd | |---|---|---|---| | **Agentic** | | | | | Autonomous execution | โœ… Full autonomous mode | โœ… Full autonomous mode | โš ๏ธ Manual step-by-step | | Sub-agents | โœ… Multi-agent (swarm) | โœ… delegate_task + batch | โŒ Single agent only | | Agent roles | โœ… Code Reviewer, Architect, DevOps | โœ… Agent Registry (10+ roles) | โŒ Fixed single role | | Self-correction loops | โŒ None | โœ… Agent self-correction skill | โŒ None | | **Tooling** | | | | | Bash/Shell | โœ… BashTool | โœ… TerminalTool | โœ… Shell access | | File editing | โœ… FileEditTool (diff-aware) | โœ… Patch + Write + Edit | โš ๏ธ Basic write | | Web search | โœ… WebSearch | โœ… WebSearch + Vane + Exa | โŒ None | | Git integration | โœ… GitTool | โœ… GitTool | โŒ None | | Browser automation | โœ… Computer-use (Anthropic) | โœ… Full browser toolkit | โŒ None | | MCP servers | โœ… Full MCP protocol (client + server management) | โœ… Native MCP + mcporter | โŒ None | | Code execution | โœ… Sandbox adapter | โœ… Sandbox + Jupyter | โŒ None | | **Skills** | | | | | Skill system | โœ… Skill system with skills dir loader | โœ… 500+ skills catalog | โŒ No skill system | | Custom skill authoring | โœ… Skillify (sessionโ†’skill capture) | โœ… skill_manage CLI | โŒ None | | Plugin architecture | โœ… Full marketplace + loader + lifecycle | โœ… Full plugin system | โŒ None | | **Automation** | | | | | Cron scheduling | โœ… CronScheduler (1s interval, jitter, locks) | โœ… Cron jobs with delivery | โŒ None | | Webhook subscriptions | โœ… Hook system (HTTP, agent, prompt hooks) | โœ… Event-driven agent runs | โŒ None | | Scheduled monitoring | โœ… Cron-based recurring monitoring | โœ… Browser + social monitors | โŒ None | | Batch task processing | โœ… Batch skill (5-30 parallel subagents) | โœ… Parallel batch delegation | โŒ None | | **Platform** | | | | | Telegram integration | โœ… Native bot + webhook | โœ… 2-way Telegram bridge | โŒ None | | Discord | โŒ None | โœ… Full Discord integration | โŒ None | | Multi-channel delivery | โŒ Telegram only | โœ… Cronโ†’Telegram/Discord/Email | โŒ None | | Voice I/O | โœ… Voice service (STT + TTS) | โœ… TTS + voice memos | โŒ None | | **Infrastructure** | | | | | Model routing | โœ… Multi-provider (OpenAI, Anthropic, Bedrock, custom) | โœ… Multi-provider routing | โŒ Single model | | Context compression | โœ… Compact pipeline (auto, micro, session memory) | โœ… lean-ctx MCP (90% savings) | โŒ None | | Memory persistence | โœ… Session memory with background extraction | โœ… Cross-session memory | โŒ None | | RTK integration | โœ… RTK active | โœ… RTK integrated | โŒ None | ### Summary - **zCode CLI X** โ€” Lightweight agentic coder focused on Telegram + Z.AI. Ideal for quick coding tasks via Telegram with essential tools and agent roles. - **Hermes Agent** โ€” Full-stack AI assistant platform. Best for complex multi-agent workflows, scheduled automation, and cross-platform deployment. 500+ skills, MCP ecosystem, and the deepest toolset. - **better-clawd** โ€” Minimal Claude Code clone. Useful as a lightweight reference but lacks the agentic, skills, and automation depth of zCode or Hermes. ## ๐Ÿค Contributing Contributions welcome! This is based on: - [better-clawd](https://github.com/x1xhlol/better-clawd.git) - Claude Code clone - [Hermes Agent](https://hermes-agent.nousresearch.com) - Our AI assistant --- Built with โค๏ธ by zCode CLI X