Skip to content
Sia edited this page May 31, 2026 · 2 revisions

vibe-coder-cli (bash MVP)

Single-file bash + curl wrapper around the REST API. Useful for shell automation, CI/CD, and quick one-liners that don't need a full Go/Rust binary.

Source: cli/vibe in the server repo.

Install

# Option 1 — install system-wide
sudo install -m 0755 cli/vibe /usr/local/bin/vibe

# Option 2 — symlink for development
ln -s "$(pwd)/cli/vibe" ~/.local/bin/vibe

# Option 3 — drop in any PATH dir
cp cli/vibe ~/.local/bin/ && chmod +x ~/.local/bin/vibe

Dependencies

Tool Required? Why
bash 4+ The script
curl HTTP transport
jq ⛓ optional Pretty-prints JSON responses (raw passthrough if missing)

First-time setup

$ vibe login
Server URL [http://localhost:17880]: 
Username: admin
Password: ********
TOTP code: 123456                 # only if 2FA enabled
logged in as admin → http://localhost:17880
config saved to /home/wody/.config/vibe-coder/config

Behind the scenes:

  1. POST /api/auth/login.
  2. If 2FA is enabled the server returns 401 totp_required; the script detects the error code, prompts for a 6-digit code, and retries.
  3. The returned token is stored in $XDG_CONFIG_HOME/vibe-coder/config (defaults to ~/.config/vibe-coder/config) with chmod 0600.

Commands

Command What it does
vibe login Interactive login + token persistence
vibe logout Delete the local config file
vibe whoami Show server URL, username, token prefix
vibe projects GET /api/projects (JSON)
vibe status GET /api/server/status (JSON)
vibe console <id> <prompt...> POST /api/projects/<id>/claude/console/prompt
vibe build <id> POST /api/projects/<id>/build/debug
vibe help Built-in help

The console and build commands fire and return immediately — no WebSocket streaming. Use the browser console page to watch live logs.

Examples

CI hook: nightly debug build of every project

for pid in $(vibe projects | jq -r '.[].id'); do
  echo "$pid"
  vibe build "$pid"
done

Send a prompt and wait for the next build

vibe console my-app "Run the unit tests; if they pass, build a debug APK."
sleep 60
vibe projects | jq -r '.[] | select(.id == "my-app") | .lastBuildStatus'

Quick health check from monitoring

vibe status | jq -r '.serverVersion'

Config file format

~/.config/vibe-coder/config is just three KEY='value' lines:

VIBE_SERVER_URL='http://localhost:17880'
VIBE_TOKEN='<sha256-hashed-token>'
VIBE_USERNAME='admin'

chmod 0600 is enforced by the script. Hand-edit if you need to switch servers without re-running vibe login.

Token lifecycle

  • Same device.lastSeenAt idle-timeout as browser sessions (security.sessionIdleTimeoutMinutes, default 30 min). After idle, the next vibe call gets 401 — run vibe login again.
  • vibe logout only removes the local config file. To revoke server-side (kill the token everywhere), use the browser at /devices and revoke the device row named vibe-cli.

What's not in the MVP

  • WebSocket subscribe. No live console log following. Run the browser in another window.
  • Project create / register. Clone-from-git, template scaffolding, keystore generation — all browser-only for now.
  • File upload. Use curl -F directly against the multipart endpoint if you need this from a script.
  • APK download. vibe artifacts <id> is not implemented; the build-id-aware curl is documented in REST API Reference.

A real Go/Rust port that handles all of the above is on the roadmap (separate repo planned).

Troubleshooting

Symptom Likely cause Fix
vibe: not logged in. run 'vibe login' first. No config file Run vibe login
login failed: invalid_credentials Wrong password (or 2FA disabled but you supplied TOTP) Re-check
login failed: totp_required Loop bug in your shell (very rare) Re-run, enter code at the second prompt
curl: (6) Could not resolve host DNS / firewall Try http://<IP>:17880 directly
All API calls return 401 Idle timeout vibe login again
missing dependency: jq Optional, but you asked for jq install apt install jq or brew install jq

License

AGPL-3.0 (same as the server).

Clone this wiki locally