AI Dev Terminal
Use Claude Code, Gemini CLI, and OpenAI Codex directly on your project's source code — all inside the oec.sh platform.
Requires Pro plan or higher. The AI Dev Terminal is available on Pro (199/mo) plans.
What You Get
A dedicated container on your server with:
| Tool | Command | Provider |
|---|---|---|
| Claude Code | claude | Anthropic |
| Gemini CLI | gemini | |
| Codex CLI | codex | OpenAI |
Plus git, python3, node, vim, nano, curl, jq — everything you need for coding.
Your environment's addons directories are mounted at /workspace/<env-name>/, so AI tools can read and edit your actual Odoo modules.
Quick Start
Enable Dev Mode
- Open your Project → click the Settings tab
- Find AI Dev Terminal and toggle it ON
- Wait for provisioning (usually 30–60 seconds on first run, faster after)
- You'll see a progress bar with each step — image setup, container creation, git credential injection
First run is slow. The dev image (~500MB) is built on your server the first time. Subsequent enables use the cached image and take 5–10 seconds.
Open the Terminal
Once provisioning completes (green "Running" badge):
- Click Open Dev Terminal on the project page
- If your project spans multiple servers, pick which server to connect to
- A browser-based terminal opens with a welcome message:
================================================
AI Dev Mode - oec.sh Platform
================================================
Available AI Coding Tools:
claude - Claude Code (Anthropic)
gemini - Gemini CLI (Google)
codex - Codex CLI (OpenAI)
Quick Start:
export ANTHROPIC_API_KEY=sk-...
cd /workspace/<env-name>/<repo>
claude
================================================Set Your API Key
AI tools need your own API key. Set it once — it persists across sessions:
export ANTHROPIC_API_KEY=sk-ant-...
echo 'export ANTHROPIC_API_KEY=sk-ant-...' >> ~/.bashrcYour home directory (/home/devuser) is a persistent volume. Files you create there (including .bashrc with API keys) survive container restarts and refreshes.
Navigate to Your Code
Each environment's addons are mounted under /workspace/:
$ ls /workspace/
Development/ Production/ Staging/
$ cd /workspace/Development/
$ ls
my_custom_module/ website_theme/ account_reports/These are live bind mounts — edits here change the actual files on the server.
Use an AI Tool
cd /workspace/Development/my_custom_module/
claudeClaude Code (or Gemini/Codex) can now read your module, suggest changes, write code, and run commands — all scoped to your project.
Working with Git
If your project has a git connection (GitHub, GitLab, Bitbucket), credentials are automatically injected. You can push and pull without extra setup:
cd /workspace/Development/
git status
git pull origin main
# ... make changes with AI tools ...
git add -A
git commit -m "feat: add invoice report"
git push origin mainGit identity is set to your oec.sh user name and email automatically.
Git credentials are stored in the container. Anyone with terminal access to this project can read them. Only give project.terminal.access permission to trusted developers.
Refreshing the Workspace
When you create or destroy an environment, the container's volume mounts become stale. You'll see a notification:
"Workspace changed — refresh dev mode to see new environments"
Click Refresh Workspace on the project page (or the toast notification). This:
- Stops the current container
- Restarts with updated mounts (new environments appear in
/workspace/) - Your home directory (
/home/devuser) is preserved
Environment Terminal Access
You can also open the dev terminal from any environment's edit page:
- Open an environment → click Terminal
- Choose Dev Terminal (alongside App and PostgreSQL terminals)
- This connects to the same dev container on that environment's server
Multi-Server Projects
If your project has environments on multiple servers, a dev container runs on each:
- When opening the terminal, you'll see a server selector
- Each server shows which environments are mounted
- Pick the server with the environments you want to work on
┌─ Production Server (2 environments) ── 🟢 Running
│ production, staging
│
└─ Backup Server (1 environment) ──────── 🟢 Running
developmentTechnical Details
Container Specs
| Setting | Default | Environment Variable |
|---|---|---|
| Memory | 1 GB | DEV_SIDECAR_MEMORY_LIMIT |
| CPU | 1.0 cores | DEV_SIDECAR_CPU_LIMIT |
| Min disk space | 600 MB | DEV_SIDECAR_MIN_DISK_MB |
Security
The dev container runs with strict Docker security:
- Non-root user (
devuser, UID 1000) - All Linux capabilities dropped (
--cap-drop ALL) - No privilege escalation (
--security-opt no-new-privileges) - Resource-limited (memory + CPU caps)
- Terminal isolation — you cannot escape to the host shell
What's Mounted
| Container Path | Source | Persistent? |
|---|---|---|
/home/devuser/ | Docker volume oecsh_devhome_{project_id} | Yes (survives restart) |
/workspace/{env_name}/ | Host /opt/oecsh/{env_id}/addons | Yes (live bind mount) |
Container Name
{project-slug}_devExample: If your project slug is client-erp, the container is client-erp_dev.
Permissions Required
- Plan: Pro or Agency (
ai_coding_enabledfeature) - Permission:
project.terminal.access
Troubleshooting
"Dev mode is being enabled..." but nothing happens
Check the provisioning logs on the project page (click View Logs). Common issues:
- Insufficient disk space — need 600MB+ free on
/var/lib/docker - Docker pull failed — image is built locally as fallback (takes 2–3 minutes)
- SSH connection failed — server may be unreachable
Terminal connects but immediately disconnects
- Container may have stopped — click Refresh Workspace to restart it
- Check if
docker ps | grep _devshows the container on the server
"AI-assisted coding requires the Pro plan"
Upgrade to Pro (199/mo) in Settings → Billing.
Git push/pull fails with "authentication required"
- Your project may not have a git connection configured
- Go to Settings → Git Connections and add one
- Then disable and re-enable dev mode to re-inject credentials
Changes not visible after creating a new environment
Click Refresh Workspace — this restarts the container with the new environment mounted.