Operator platform for managing AI-driven software projects with lifecycle modules, documentation sync, and autonomous Codex execution.
- This app is DEV-only.
- Do not expose COPM directly to the public internet.
- Run behind local/private network access only.
Codex CLImust be installed and authenticated in root context on the host for stable agent operation.
This tool is designed to run in cooperation with:
- Codex CLI (OpenAI) for autonomous project execution
- DomNexDomain for automated domain provisioning and teardown
https://github.com/AsaTyr2018/DomNexDomain
- Initial registration (
/register): first account becomesADMIN - Project lifecycle engine (
BIRTH,CHANGE,FIX,ITERATE,TEARDOWN,DEPLOYED) - Autonomous agent runs with live status + stream logs
- Project-scoped API key workflow in web UI (
/dashboard/api-keys) - AGENTS export + AI kickstart endpoints
- Admin maintenance flow after deployment (
Add ModuleforCHANGE/FIX) - Documentation as source of truth in COPM (versioned docs)
- Next.js 14 (App Router)
- TypeScript
- PostgreSQL + Prisma
- NextAuth (Credentials/JWT)
- Zod
- Vitest
- Web app: COPM UI + API
- Agent worker: polls projects, starts Codex runs, syncs lifecycle/doc evidence
Default app URL pattern:
http://<host>:<port>(port is environment-controlled; often3300)
- Copy
.env.exampleto.envand set values. - Install deps:
npm install - Start PostgreSQL.
- Run DB setup:
npm run prisma:deploy && npm run prisma:generate - Start app:
npm run dev - Open
/registerand create initial admin. - Generate API keys under
/dashboard/api-keys.
Optional:
- Port check script:
npm run ports:check - Start worker manually:
npm run agent:worker
Before running docker compose up, you must define all required COPM_* variables used by docker-compose.yml.
If any are missing, compose fails fast.
Required:
COPM_DATABASE_URLCOPM_DATABASE_URL_TESTCOPM_NEXTAUTH_SECRETCOPM_NEXTAUTH_URLCOPM_POSTGRES_USERCOPM_POSTGRES_PASSWORDCOPM_POSTGRES_DBCOPM_POSTGRES_TEST_USERCOPM_POSTGRES_TEST_PASSWORDCOPM_POSTGRES_TEST_DB
Example usage:
export COPM_POSTGRES_USER=postgresexport COPM_POSTGRES_PASSWORD='<strong-random>'export COPM_POSTGRES_DB=codex_opsexport COPM_POSTGRES_TEST_USER=postgresexport COPM_POSTGRES_TEST_PASSWORD='<strong-random-test>'export COPM_POSTGRES_TEST_DB=codex_ops_testexport COPM_DATABASE_URL='postgresql://postgres:<strong-random>@postgres:5432/codex_ops'export COPM_DATABASE_URL_TEST='postgresql://postgres:<strong-random-test>@postgres_test:5432/codex_ops_test'export COPM_NEXTAUTH_SECRET='<64+ char random secret>'export COPM_NEXTAUTH_URL='http://<host>:3300'
Use the setup scripts in setup-scripts/:
- Copy and edit:
- Run as root:
sudo ./setup-scripts/install-unattended.sh /path/to/your/setup.env
Installer actions:
- deploys code to
COPM_INSTALL_DIR - generates
.env+.env.agent - runs
npm ci, Prisma deploy/generate, production build - creates/enables systemd services for web + agent
Important installer behavior:
- binds web service to LAN by default (
COPM_WEB_HOST=0.0.0.0) - installer blocks public bind targets; only private/LAN addresses are allowed
- runs agent service as
rootto use root-context Codex CLI/auth
/api/v1(bearer token required)/api/help(machine-readable API catalog)/api/register(only before first account exists)
Key project endpoints:
/api/v1/projects/:id/ai-kickstart/api/v1/projects/:id/agents-md/api/v1/projects/:id/lifecycle/runs
- systemd web service: configurable (example:
codex-notes-system) - systemd agent service: configurable (example:
codex-notes-agent) - workspace root: configurable (example:
/var/lib/copm/workspaces)
Before shipping/cloning to another host, wipe personal data and keep only one generic admin:
./setup-scripts/reset-depersonalized-state.sh .env
This removes:
- all projects, tasks, docs, lifecycle runs, agent runs, API keys
- all users
- adapter credentials (DomNex/GitHub)
Then it creates one depersonalized default admin account (override via env vars):
DEFAULT_ADMIN_USERNAMEDEFAULT_ADMIN_EMAILDEFAULT_ADMIN_PASSWORD
- COPM acts as control plane and source of truth
- Project execution is workspace-bound (
workspaces/PRJ-*) - Project DB isolation is expected (
PRJ-*naming for project runtime DBs) - API auth uses generated bearer keys (project-bound where applicable)
- Unit/integration:
npm test - Type checks:
npm run typecheck - Lint:
npm run lint
- Discord: https://discord.gg/GnAUmXhfeG