A web-first, self-hosted code editor. Code from anywhere - phone, tablet, or desktop.
c00d is an open-source IDE you install on your server and access via browser. Edit files, run commands, and use AI assistance - all from any device.
- Web-first - Works on mobile, tablet, desktop. No app to install.
- Self-hosted - Your code stays on your server. Full control.
- AI-powered - Built-in AI assistant for code help (optional)
- Zero config - Just PHP. No complex setup.
- Monaco Editor - Same editor as VS Code
- File Browser - Navigate, create, rename, delete files
- Integrated Terminal - Run commands in your browser (with optional PTY for interactive CLI tools)
- AI Assistant - Explain code, fix bugs, generate tests
- Auto-Updates - Check for and install updates from within the IDE
- Mobile Friendly - Full functionality on any device
- Password Protected - Optional authentication
- SQLite Storage - Preferences and history saved locally
# Download
curl -L https://c00d.com/download -o c00d.zip
unzip c00d.zip
# Configure (optional)
cp config.php config.local.php
nano config.local.php # Set password, AI provider, etc.
# Access via browser
# Point your web server to the 'public' folder
# Open https://yourserver.com/c00d/- PHP 8.0+
- SQLite extension (usually included)
- cURL extension (for AI features)
c00d supports multiple AI backends. Choose what works for you:
| Provider | Setup | Cost |
|---|---|---|
| c00d API | Just works | Free: 20/day, Pro: $9/mo unlimited |
| Claude CLI | Install CLI, run claude login |
Uses your Claude subscription |
| Anthropic API | Add API key | Pay Anthropic directly |
| OpenAI API | Add API key | Pay OpenAI directly |
| Ollama | Run Ollama locally | Free, fully private |
If you have a Claude Max or Pro subscription:
# Install Claude CLI on your server
npm install -g @anthropic-ai/claude-code
# Authenticate
claude login
# Configure c00d to use it
# In config.local.php:
'ai' => [
'provider' => 'claude-cli',
]# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a model
ollama pull codellama
# Configure c00d
'ai' => [
'provider' => 'ollama',
'model' => 'codellama',
]Create config.local.php (won't be overwritten on updates):
<?php
return [
// Restrict to a specific directory
'base_path' => '/var/www/myproject',
// Password protection (recommended!)
'password' => 'your-secure-password',
// AI settings
'ai' => [
'provider' => 'c00d', // or: claude-cli, anthropic, openai, ollama
'license_key' => '', // c00d Pro license for unlimited AI
'api_key' => '', // For anthropic/openai providers
],
// Editor
'editor' => [
'theme' => 'vs-dark', // vs-dark, vs-light, hc-black
'font_size' => 14,
'tab_size' => 4,
],
// Security
'security' => [
'allowed_ips' => [], // Restrict access by IP
'require_https' => true,
],
];c00d/
├── config.php # Default config
├── config.local.php # Your settings (gitignored)
├── VERSION # Current version number
├── public/
│ ├── index.php # IDE interface
│ └── api.php # API endpoint
├── src/
│ ├── Database.php # SQLite handler
│ ├── IDE.php # File/terminal operations
│ └── AI.php # AI integration
├── terminal/ # Optional PTY terminal server
│ ├── server.js # WebSocket terminal server
│ └── package.json # Node.js dependencies
└── data/
└── c00d.db # SQLite database (auto-created)
c00d includes a hybrid terminal that automatically uses the best available method:
| Mode | What works | Setup needed |
|---|---|---|
| Full PTY | Everything (claude, vim, htop, etc.) |
Terminal server + connection |
| Basic | Simple commands (ls, git, cat, etc.) |
None |
The terminal server can be started directly from the IDE:
- Open Terminal in c00d
- Click "▶ Start Terminal Server"
- If using direct port method, open port 3456 in your firewall
The IDE tries these in order:
- WebSocket Proxy (
/ws/terminal) - Requires web server config - Direct Port (
:3456) - Just needs firewall port open - Basic Mode - Works everywhere, no interactive programs
Just open the port in your firewall:
# Ubuntu/Debian
sudo ufw allow 3456
# CentOS/RHEL
sudo firewall-cmd --add-port=3456/tcp --permanent
sudo firewall-cmd --reloadThen start the server from the IDE or manually:
cd terminal && npm install && node server.jsNginx:
location /ws/terminal {
proxy_pass http://127.0.0.1:3456;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}Apache (requires mod_proxy_wstunnel):
ProxyPass /ws/terminal ws://127.0.0.1:3456/
ProxyPassReverse /ws/terminal ws://127.0.0.1:3456/Using pm2 (recommended):
npm install -g pm2
pm2 start /path/to/c00d/terminal/server.js --name c00d-terminal
pm2 save
pm2 startupUsing systemd:
[Unit]
Description=c00d Terminal Server
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/path/to/c00d/terminal
ExecStart=/usr/bin/node server.js
Restart=on-failure
Environment=TERMINAL_PORT=3456
[Install]
WantedBy=multi-user.targetIn config.local.php:
'terminal' => [
'server_port' => 3456, // Change if needed
],- Always set a password for production use
- Use HTTPS - set
require_httpsto true - Restrict IPs if possible via
allowed_ips - Protect data folder -
.htaccessincluded, but verify - Don't expose on public internet without authentication
Sessions use a cryptographically secure 256-bit random hash. Sessions persist across IP changes (useful for mobile users switching networks).
c00d is designed to work on mobile devices:
- Responsive layout adapts to screen size
- Touch-friendly file browser
- On-screen keyboard works with terminal
- Monaco editor supports mobile editing
Tip: Add to home screen for app-like experience.
All shortcuts use Alt to avoid conflicting with browser shortcuts (print, zoom, etc.)
| Shortcut | Action |
|---|---|
Alt+S |
Save file |
Alt+P |
Quick open (file search) |
Alt+B |
Toggle sidebar |
Alt+T |
Toggle terminal |
Alt+G |
Toggle Git panel |
Alt+A |
Toggle AI chat |
For unlimited AI access without API keys:
- Go to c00d.com/pro
- Subscribe for $9/month
- Add license key to config:
'ai' => [
'provider' => 'c00d',
'license_key' => 'your-license-key',
]Contributions welcome! Please:
- Fork the repo
- Create a feature branch
- Submit a pull request
MIT License - use it however you want.
The code is open source. The "c00d" name and logo are trademarks.
- Website: c00d.com
- Pro License: c00d.com/pro
- GitHub: github.com/c00d-ide/c00d
- Issues: github.com/c00d-ide/c00d/issues
Made with code by humans (and AI).