admin bd31701dc1 security: Remove sensitive credentials and add .env.example
- Remove .env file with real API keys and bot token
- Add .env.example with placeholder values
- Verify .env is in .gitignore
- Repository is now safe to share with others

Environment variables:
- ZAI_API_KEY: Z.AI API key
- TELEGRAM_BOT_TOKEN: Telegram bot token
- TELEGRAM_ALLOWED_USERS: Allowed Telegram user IDs
- ZCODE_WEBHOOK_URL: Optional webhook URL
- ZCODE_PORT: Bot port (default: 3001)

Users must create their own .env file from .env.example
bd31701dc1 · 2026-05-05 09:59:28 +00:00
20 Commits
2026-04-01 17:18:04 +02:00

zCode CLI X

Agentic coder with Z.AI + Telegram integration — Claude Code + Hermes in one beast.

🚀 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

cd zcode-cli-x
npm install

⚙️ Configuration

Copy .env.example to .env and configure:

cp .env.example .env

Required Environment Variables

# Z.AI Configuration (Coding Plan)
GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4
ZAI_API_KEY=your_zai_api_key_here

# Telegram Bot Configuration
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_ALLOWED_USERS=your_telegram_id
ZCODE_WEBHOOK_URL=https://your-domain.com/telegram/webhook

🎮 Usage

Run as CLI

node bin/zcode.js

Run as Telegram Bot (24/7)

node bin/zcode.js --bot

Run in Development Mode

node bin/zcode.js --dev

Run Only CLI (No Bot)

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:

    npm install
    
  2. Configure .env with your credentials

  3. Run the bot:

    node bin/zcode.js --bot
    
  4. Open Telegram and start chatting!

📝 License

MIT

🤝 Contributing

Contributions welcome! This is based on:


Built with ❤️ by zCode CLI X

Description
Your Z.ai CLI buddy a hybrid of smart agent and coding all in one.
Readme 50 MiB
Languages
JavaScript 54.6%
TypeScript 42.5%
MDX 2.1%
HTML 0.6%
CSS 0.1%
Other 0.1%