@xortex/xcode
v3.2.9
Published
XCode - AI-powered coding assistant with XMem long-term memory. Supports Claude, Gemini, Kimi, DeepSeek via OpenRouter.
Maintainers
Readme
XCode
AI-powered coding assistant with persistent memory.
XCode is a terminal-based AI coding assistant that leverages XMem — a multi-modal, multi-agentic long-term memory layer — to remember context across sessions, projects, and platforms.
🌟 Features
- 🧠 Persistent Memory: XMem integration remembers your preferences, codebase patterns, and conversation history
- 🤖 Multi-Model Support: Use Claude, Gemini, Kimi K2.5, DeepSeek V3.2, and more via OpenRouter
- 💻 Code-First Design: Built for developers with powerful code search, editing, and analysis tools
- 🔧 Extensible: Plugin system for custom agents, tools, and integrations
- 🚀 Fast & Local: Runs in your terminal with local file system access
📦 Installation
Quick Install (Recommended)
# Using curl
curl -fsSL https://raw.githubusercontent.com/XortexAI/XCode/ishaan/dev/install.sh | bash
# Or using wget
wget -qO- https://raw.githubusercontent.com/XortexAI/XCode/ishaan/dev/install.sh | bashInstall via npm
npm install -g @xortex/xcodeManual Installation
# 1. Clone the repository
git clone https://github.com/XortexAI/XCode.git ~/.xcode
# 2. Install dependencies
cd ~/.xcode
bun install # or: npm install
# 3. Create symlink
ln -s ~/.xcode/bin/xcode ~/.local/bin/xcode🚀 Usage
Start a Session
xcodeUse Specific Models
# Gemini 2.5 Pro (recommended for coding)
xcode --model gemini-2.5-pro
# Kimi K2.5 (256K context window)
xcode --model kimi-k2.5
# DeepSeek V3.2 (strong reasoning)
xcode --model deepseek-v3.2
# Claude models (via Anthropic or OpenRouter)
xcode --model claude-sonnet-4.6
xcode --model claude-opus-4.6OpenRouter Mode
Enable OpenRouter for access to all models:
export CLAUDE_CODE_USE_OPENROUTER=1
export OPENROUTER_API_KEY=your-api-key
xcode🔧 Configuration
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| OPENROUTER_API_KEY | OpenRouter API key | - |
| ANTHROPIC_API_KEY | Anthropic API key (for Claude) | - |
| GEMINI_API_KEY | Google Gemini API key | - |
| XMEM_API_URL | XMem server URL | http://localhost:8000 |
| XMEM_API_KEY | XMem API key | - |
| CLAUDE_CODE_USE_OPENROUTER | Enable OpenRouter | false |
Setup XMem Memory Server
XCode works best with the XMem memory server:
# 1. Clone and start XMem
git clone https://github.com/XortexAI/XMem.git
cd XMem
pip install -e .
cp .env.example .env
# Edit .env with your API keys
uvicorn src.api.app:create_app --factory --host 0.0.0.0 --port 8000
# 2. In another terminal, start XCode
export XMEM_API_URL=http://localhost:8000
xcode🛠️ Commands
Inside XCode, use these commands:
| Command | Description |
|---------|-------------|
| /model <name> | Switch AI model |
| /memory | Open memory file editor |
| /compact | Compact conversation context |
| /clear | Clear conversation history |
| /quit | Exit XCode |
🧪 Development
# Clone the repo
git clone https://github.com/XortexAI/XCode.git
cd XCode
# Install dependencies
bun install
# Run in development mode
bun run start
# Build for distribution
bun run build📚 Architecture
XCode consists of:
- Terminal UI: React + Ink-based interactive interface
- Query Engine: Multi-turn conversation loop with tool execution
- Memory Layer: XMem integration for long-term storage
- Tool System: Extensible tools for code search, editing, bash execution
- Model Router: Unified interface for multiple LLM providers
🤝 Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
📄 License
MIT License - see LICENSE for details.
🔗 Links
- GitHub: https://github.com/XortexAI/XCode
- XMem: https://github.com/XortexAI/XMem
- OpenRouter: https://openrouter.ai
- Documentation: https://github.com/XortexAI/XCode/tree/main/docs
Made with ❤️ by XortexAI
Forget forgetting. Build with XMem.
