Package Exports
- cybercode-cli
- cybercode-cli/bin/cli.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cybercode-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CyberCode CLI — Codex-dark Web UI with a Built-in Self-Evolving Agent
A standalone, self-contained web UI + agent framework styled after the
Codex-dark interface. No external agent dependency — the entire agent
core (LLM client, agent loop, 9 atomic tools, layered memory) ships inside
agent_core.py and runs from a single directory.
Install
npm install -g cybercode-cliThen run:
cybercodeThat's it. On first run it will:
- Find Python 3.11+ on your system
- Install
requestsif missing - Copy the bundled agent + skills to
~/.cybercode/ - Create a
mykey.jsontemplate (edit it with your API key, or log in via the web UI) - Start the web UI and open your browser
Update
CyberCode automatically checks for updates on startup. To manually update:
cybercode updateOr via npm:
npm update -g cybercode-cliDiagnostics
Run cybercode doctor to check your environment:
cybercode doctorChecks Node.js, Python, requests package, working directory, and npm registry version.
Usage
cybercode # start the web UI (default)
cybercode webui --port 8080 # custom port
cybercode webui --host 0.0.0.0 # listen on all interfaces
cybercode webui --no-browser # don't auto-open browser
cybercode webui --dir ~/my-agent # custom working directory
cybercode webui --llm 1 # start on 2nd configured LLM
cybercode update # self-update to latest version
cybercode doctor # run diagnosticsOptions
| Flag | Description |
|---|---|
-p, --port <num> |
Port (default: auto-find free port near 18600) |
--host <addr> |
Bind address (default: 127.0.0.1) |
--dir <path> |
Working directory (default: ~/.cybercode) |
--llm <num> |
LLM index to start with (default: 0) |
--no-browser |
Don't auto-open the browser |
-h, --help |
Show help |
-V, --version |
Show version |
Attribution & License
The agent core architecture in agent_core.py was developed with reference to
GenericAgent by lsdefine
(MIT License, Copyright © 2025 lsdefine). We gratefully acknowledge the
GenericAgent project — its ~100-line agent loop, 9-atomic-tool design, and
layered memory concept directly inspired this implementation.
The bundled HyperFrames skills (skills/) originate from
HyperFrames by HeyGen
(MIT License).
See LICENSE for the full MIT license text, including the GenericAgent
copyright notice as required by its license terms.
What it is
cybercodewebui.py boots a self-contained Agent (from agent_core.py), serves
cybercodewebui.html at /, and exposes a JSON + SSE API the page talks to.
The UI keeps the Codex-dark look — blue radial-gradient desktop, traffic-light
window chrome, dark sidebar with threads + skills, centered Let's build
empty state, pill LLM switcher, rounded composer with Local/Worktree/Cloud
modes — but every control is wired to the built-in agent.
Standalone: no GenericAgent dependency. The agent core (agent_core.py)
is a from-scratch reimplementation that ships in this repo. You do not need
GenericAgent installed. The only runtime dependency is requests (for the LLM
HTTP client); everything else uses the Python stdlib.
Files
cybercode-cli/
├── package.json # npm package config (bin, files, metadata)
├── bin/
│ └── cli.mjs # Node.js launcher (finds Python, bootstraps, opens browser)
├── python/
│ ├── agent_core.py # Self-contained agent core (LLM client + loop + 9 tools + memory)
│ ├── cybercodewebui.py # stdlib HTTP server + SSE + API
│ └── cybercodewebui.html # Codex-dark UI (single file, no build step)
├── skills/ # HyperFrames video skills (12 files, from HeyGen)
├── templates/
│ └── mykey_template.json # API key template (auto-copied on first run)
├── LICENSE # MIT (includes GenericAgent + HyperFrames copyright notices)
└── README.md # This fileManual (without npm)
If you prefer to run the Python server directly:
# 1. Configure your LLM (any OpenAI-compatible endpoint)
cat > mykey.json << 'EOF'
{
"llm1": {
"apikey": "sk-your-key-here",
"apibase": "https://api.openai.com",
"model": "gpt-4o",
"name": "GPT-4o"
}
}
EOF
# 2. Install requests (only dependency)
pip install requests
# 3. Run
python python/cybercodewebui.py # http://127.0.0.1:18600Supported LLM providers
Any OpenAI-compatible chat completions endpoint works:
- OpenAI (GPT-4o, o1, o3, etc.)
- DeepSeek
- Kimi / Moonshot
- MiniMax
- Local models via Ollama, LM Studio, vLLM, etc.
- Anthropic Claude via OpenAI-compatible proxies
- l0veyou backend (built-in login support)
What works
| UI element | Wired to |
|---|---|
| Composer + send | agent.put_task() → SSE stream of deltas + final done |
| Stop button / red send toggle | agent.abort() |
| New thread | /api/new → clears conversation history |
| Thread list (sidebar) | /api/sessions → scans temp/model_responses/ logs |
| Click a thread | /api/continue → restores that session + replays bubbles |
| LLM pill + dropdown | /api/llm → agent.next_llm(idx) |
| Skills panel (sidebar) | /api/skills → lists memory/ SOPs and skill files |
| Suggest tasks | prefills the autonomous-planning prompt |
| Status dot | agent.is_running polled every 4s |
| Tool / file refs | tool chips; [FILE:path] → clickable file chips |
| Turn folding | collapsible turn sections |
| Make video button | Injects HyperFrames skill preamble + /video command |
| Video gallery | /api/videos → scans for rendered .mp4 files |
| Video playback | /api/video/<path> → streams with Range support (seekable) |
| Login overlay | Web UI login (requires l0veyou backend) |
| Image generation | Built-in image generation panel |
| Video generation | Built-in video generation panel |
The 9 Atomic Tools
The agent core exposes exactly 9 tools (same design philosophy as GenericAgent):
| Tool | Function |
|---|---|
code_run |
Execute Python or shell scripts |
file_read |
Read files with line numbers, keyword search |
file_write |
Create / overwrite / append files |
file_patch |
Patch a unique text block in a file |
web_scan |
Fetch and simplify web pages (urllib-based) |
web_execute_js |
Execute JS in a browser (requires TMWebDriver; degrades gracefully) |
ask_user |
Interrupt to ask the user a question |
update_working_checkpoint |
Short-term working memory notepad |
start_long_term_update |
Distill experience into long-term memory |
HyperFrames — Built-in Video Generation
The HyperFrames skill pack (12 files) is bundled in skills/. Click the
Make video button in the sidebar, or type /video <description>. The agent
reads the bundled skills and uses the npx hyperframes CLI to render HTML
compositions into .mp4 files. Rendered videos appear in the sidebar gallery
and can be played inline.
API Reference
| Method | Path | Description |
|---|---|---|
| GET | / |
The web UI |
| GET | /api/status |
Agent status: running, LLM, history |
| GET | /api/sessions |
Recoverable sessions (log files) |
| GET | /api/skills |
Agent memory/SOP files |
| GET | /api/messages?path=... |
Replay messages from a session log |
| GET | /api/hyperframes |
List bundled HyperFrames skills |
| GET | /api/hyperframes/<name> |
Raw skill markdown |
| GET | /api/videos |
Rendered .mp4 files |
| GET | /api/video/<path> |
Stream a video (Range-supported) |
| POST | /api/chat |
SSE stream: delta / done / error |
| POST | /api/llm |
Switch LLM by index |
| POST | /api/stop |
Abort current task |
| POST | /api/new |
Start fresh conversation |
| POST | /api/continue |
Restore session N |
| POST | /api/btw |
Side question (while task runs) |
License
MIT License — see LICENSE for full text.