FenCode is a coding agent runtime that runs locally on your computer.
It includes:
- App Server (default
32188) - Web UI (default
25874) - One CLI launcher:
fencode
This package is published as @aiden2209/fencode.
npm i -g @aiden2209/fencodefencode start
fencode statusOpen Web UI at http://localhost:25874.
fencode start [--ap <port>] [--ui <port>]
fencode stop
fencode restart [--ap <port>] [--ui <port>]
fencode status
fencode logs [--tail <lines>]
fencode check
fencode update
fencode autostart --true
fencode autostart --false
fencode version
fencode --version
fencode -v
fencode helpDefaults:
--ap 32188--ui 25874
FenCode supports two authentication modes:
- Uses OAuth tokens from FenCode auth file.
- Intended for OpenAI ChatGPT/Codex account flow.
- Runtime uses OAuth token (
tokens.access_token) and Codex-compatible backend behavior. - Provider base URL is treated as managed/locked by OAuth flow in settings.
- Uses
OPENAI_API_KEY. - Supports custom OpenAI-compatible base URLs.
- Best for custom provider/router setups.
FenCode reads/writes auth in active FenCode home:
- Dev/source runtime:
~/.fencode-dev/auth.json - Installed/npm runtime:
~/.fencode/auth.json - If
FENCODE_HOMEis set, that path is used instead.
You can import existing OAuth data from ~/.codex/auth.json from Settings, but it is optional.
FenCode runtime still uses its own active auth file.
Default home directory:
- Dev/source checkout:
~/.fencode-dev - Installed/npm package:
~/.fencode
Inside home:
config.json(runtime config)auth.json(auth state)data/(DB/state)runtime/(launcher state + logs)
Check updates:
fencode checkUpgrade:
npm i -g @aiden2209/fencode@latestOr use:
fencode updatefencode update will:
- stop running FenCode services
- upgrade global package to latest
- start services again with previous/default ports
- print updated version and runtime URLs
When started from the UI, FenCode starts the update in the background, polls health/version every 5 seconds, tolerates temporary downtime during restart, then reloads the page after the active version matches the latest version.
Enable:
fencode autostart --trueDisable:
fencode autostart --falseThis writes/removes:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\FenCode
fencode startruns a hidden supervisor process.- Supervisor manages app server + web UI child processes.
- Runtime state file:
.../runtime/launcher-state.json
- Logs:
.../runtime/app-server.out.log.../runtime/web-ui.out.log