Codekin is distributed as an npm package with a one-liner install script, modelled on Ollama's approach. The goal is that a single command installs everything, sets up a persistent background service, and hands the user a URL with an auth token — no manual process management, no nginx, no Docker required.
curl -fsSL https://raw.githubusercontent.com/Multiplier-Labs/codekin/main/install.sh | bashThe codekin npm package ships with:
dist/— pre-built Vite frontend (React app)server/dist/— pre-compiled TypeScript server (Node.js)bin/codekin.mjs— thecodekinCLI entry point
End users never run npm run build or tsc. The package on npm always contains ready-to-run artifacts, built by CI on every release.
The server's FRONTEND_DIST env var (see server/config.ts) makes this possible — when set, Express serves the frontend directly, eliminating the nginx dependency entirely.
Installed globally via npm, the codekin command manages the local server:
| Command | Description |
|---|---|
codekin start |
Run server in foreground (for testing/debugging) |
codekin setup |
First-time wizard: auth token generation |
codekin service install |
Install + start as a persistent user-level background service |
codekin service uninstall |
Remove the background service |
codekin service status |
Show whether the service is running |
codekin token |
Print the current access URL with auth token |
The background service is installed at the user level — no root or sudo required:
- macOS:
~/Library/LaunchAgents/ai.codekin.plist(launchd user agent)- Starts automatically on login
- Managed with
launchctl load/unload
- Linux:
~/.config/systemd/user/codekin.service- Enabled with
systemctl --user enable --now codekin - Persists across reboots via
loginctl enable-linger
- Enabled with
Both read configuration from:
~/.config/codekin/env— environment variables (PORT,REPOS_ROOT, etc.)~/.config/codekin/token— auth token file
On first run (codekin setup), a random 32-byte hex token is generated and saved to ~/.config/codekin/token. The server reads it via AUTH_TOKEN_FILE (already supported in server/config.ts).
The token is embedded in the access URL: http://localhost:32352?token=<token>
codekin token reprints this URL at any time. codekin setup --regenerate issues a new token.
The curl-pipe-bash script handles bootstrapping on a fresh machine:
- Check Node.js ≥20 — installs via nvm if missing
- Check Claude Code CLI — warns and exits if not installed, since auth must be done interactively
npm install -g codekincodekin setup— generates auth token and writes configcodekin service install— installs and starts the background service- Print access URL —
http://localhost:32352?token=<token>
The script is idempotent: re-running it upgrades codekin and restarts the service.
Releases are automated via GitHub Actions (.github/workflows/publish.yml). The workflow triggers only on version tag pushes (v*) — regular commits do nothing.
Before any release can succeed, two things must be in place:
1. Create an npm account and get a publish token
- Sign up at npmjs.com if you don't have an account
- Go to your npm account → Access Tokens → Generate New Token → choose Granular Access Token (or Classic Automation token)
- Set it to allow publishing the
codekinpackage - Copy the token
2. Add the token as a GitHub Actions secret
- Go to your GitHub repo → Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
NPM_TOKEN - Value: paste the npm token
- Click Add secret
That's it. The workflow reads secrets.NPM_TOKEN automatically.
# 1. Make sure you're on main and everything is committed
git checkout main
git pull
# 2. Bump the version in package.json (pick one)
npm version patch # 0.1.0 → 0.1.1 (bug fixes)
npm version minor # 0.1.0 → 0.2.0 (new features)
npm version major # 0.1.0 → 1.0.0 (breaking changes)
# 3. Push the commit AND the tag
git push --follow-tagsnpm version updates package.json, commits the change, and creates a git tag (e.g. v0.1.1) automatically. The --follow-tags flag pushes both the commit and the tag in one step.
Once the tag hits GitHub, the Actions workflow starts within seconds. You can watch it at:
https://github.com/<your-org>/codekin/actions
The workflow will:
npm run build→ builds frontend intodist/npx tsc -p server/tsconfig.json→ compiles server intoserver/dist/npm publish --provenance→ publishes to npm with built artifacts
Follow semver. The version in package.json is the source of truth.
All configuration is via environment variables. Defaults suit a local install; override in ~/.config/codekin/env for custom setups.
| Variable | Default | Description |
|---|---|---|
PORT |
32352 |
Server port |
AUTH_TOKEN |
— | Auth token (inline). Prefer AUTH_TOKEN_FILE |
AUTH_TOKEN_FILE |
~/.config/codekin/token |
Path to auth token file |
FRONTEND_DIST |
(set by CLI) | Path to built frontend dist/ directory |
REPOS_ROOT |
~/repos |
Root directory scanned for local repositories |
DATA_DIR |
~/.codekin |
Codekin data directory (sessions, uploads, etc.) |
CORS_ORIGIN |
http://localhost:5173 |
Restrict CORS for remote access |
GH_ORG |
— | Comma-separated GitHub orgs for repo listing |
SCREENSHOTS_DIR |
~/.codekin/screenshots |
Directory for uploaded file storage |
For webhook-specific environment variables (GITHUB_WEBHOOK_SECRET, GITHUB_WEBHOOK_ENABLED, etc.), see the webhook setup section in SETUP.md.
~/.config/codekin/
env # environment variables for the service (PORT, REPOS_ROOT, etc.)
token # auth token
~/.codekin/
sessions/ # persisted session data
screenshots/ # file upload storage
$(npm root -g)/codekin/
bin/
codekin.mjs
dist/ # pre-built frontend
server/
dist/ # pre-compiled server JS
For users who prefer manual control (remote servers, custom nginx, etc.):
# Clone and build manually
git clone https://github.com/Multiplier-Labs/codekin
cd codekin
npm install
npm run build
npx tsc -p server/tsconfig.json
# Run with FRONTEND_DIST (no nginx needed)
AUTH_TOKEN=mytoken \
FRONTEND_DIST=./dist \
node server/dist/ws-server.jsFor bare-metal deployments with nginx, see docs/SETUP.md for the full production setup guide.