8000 GitHub - inhumanxd/omp-lb · GitHub
[go: up one dir, main page]

Skip to content
inhumanxdPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

omp-lb

A local control panel for omp. It reads your ~/.omp/agent data and lets you view and manage accounts, quota, sessions, models, and usage from a browser. Zero dependencies, zero build step.

  • Accounts — enable/disable/remove credentials, "use only this", copy token, see real per-account quota.
  • Sessions — browse prompt history by session + full-text search.
  • Models — model catalog per provider + your configured roles.
  • Usage — prompt-activity chart, per-account quota windows, model recency.
  • System — theme/accent picker, cache inspector, backups, config viewer.
  • Assistant — chatbot over everything above, as a floating widget (bottom-right) and a full Chat tab with a persisted session list: pick any model from your providers, ask about quota, cost, sessions, or history, and click the buttons it proposes to jump to (or act on) what it found. Conversations live in localStorage. It shells out to the omp CLI per message with a single read-only tool locked to this dashboard's GET API — it cannot touch files or change anything by itself; account actions run only when you click them.

Anthropic quota is fetched live (including disabled accounts) so you can still see remaining windows after you take an account out of rotation. Other providers still use omp's cached usage reports.


Requirements

  • Node ≥ 22.13.0 — that is the release where the built-in node:sqlite stopped needing --experimental-sqlite. Check with node --version. Node 23, 24 and newer are fine too.
  • omp installed (so ~/.omp/agent/agent.db exists), or any agent.db you point OMP_DB at.

No npm install needed — there are no dependencies. Works on macOS, Linux and Windows.


Start

From the project folder:

node server.mjs           # http://127.0.0.1:8787
node server.mjs --open    # also open it in your browser

Or via npm scripts:

npm start                 # node server.mjs
npm run open              # node server.mjs --open

Leave it running; open http://127.0.0.1:8787 in any browser.

Run it in the background

nohup node server.mjs >/tmp/omp-lb.log 2>&1 &

Stop

  • Foreground: press Ctrl+C in the terminal running it.
  • Background / another terminal:
# macOS / Linux — by port (most reliable)
lsof -ti:8787 | xargs kill

# Windows (PowerShell)
Get-NetTCPConnection -LocalPort 8787 | ForEach-Object { Stop-Process -Id $_.OwningProcess }

Options

Flag Description
--open Open the dashboard in your default browser on start
--port N Listen on port N (default 8787)
--no-backup Skip the automatic startup backup
--version Print the version and exit
--help Show usage and exit
Env var Description
OMP_DB Path to agent.db (default ~/.omp/agent/agent.db); the sibling history.db, models.db, config.yml, models.yml are picked up from the same folder
OMP_LB_PORT Default port (overridden by --port)
OMP_LB_BACKUP_DIR Where snapshots are written (default: an omp-lb-backups/ folder beside agent.db)
OMP_LB_OMP_BIN Path to the omp binary the Assistant shells out to (default: omp on PATH)

Examples:

node server.mjs --port 8800 --open
OMP_DB=/path/to/agent.db node server.mjs

Install as a command (optional)

npm install -g .     # from the project folder
omp-lb --open        # run from anywhere

Notes

  • Loopback only. It binds 127.0.0.1 — nothing is exposed to your network. Each person runs their own.
  • Backups. Every write (and startup, unless --no-backup) makes a VACUUM INTO snapshot in omp-lb-backups/, created next to your agent.db (so ~/.omp/agent/omp-lb-backups/ by default) — never inside the install directory, which is read-only under npm install -g. Override with OMP_LB_BACKUP_DIR. The newest 20 are kept. Restore by copying a snapshot back over ~/.omp/agent/agent.db while omp is closed.
  • omp must reload to see changes. A running omp session loads credentials into memory at startup and only re-reads on login/logout/refresh. Enable/disable changes reliably affect new sessions — restart omp or start a new session to apply them mid-flight. The status bar shows whether an omp process is running.
  • Read-only for history/models. history.db and models.db are opened read-only; only agent.db is written.
  • Offline. Fonts (Geist) are self-hosted under public/fonts/, so it works with no internet.

Share it with the team

Copy the whole omp-lb/ folder (it includes public/ and the fonts), or install it globally — both work the same, and neither writes anything into the install directory:

node server.mjs --open     # from the folder
npm install -g . && omp-lb --open

Nothing is machine-specific: paths come from os.homedir() (override with OMP_DB), the port is configurable, and every user gets their own loopback instance reading their own ~/.omp/agent.

Verify an install

npm test

test.mjs builds a synthetic agent.db in a temp folder, starts the server again 59E2 st it on an ephemeral port, exercises every endpoint (including the destructive ones), and cleans up. It never touches your real omp data, and needs no server running beforehand.


Troubleshooting

Problem Fix
port 8787 is in use node server.mjs --port 8788 (it suggests the next port too)
agent.db not found Make sure omp is installed, or set OMP_DB=/path/to/agent.db
needs Node >= 22.13.0 Upgrade Node. On 22.5–22.12 node:sqlite exists but is flagged; omp-lb refuses rather than half-working
History/Models tabs empty history.db / models.db missing in the data dir — other tabs still work
Changes not reflected in omp Restart omp / start a new session (see notes above)

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0