agent-bar usage is the Ubuntu-facing runtime for the Agent Bar project. It combines a Node.js/TypeScript backend, a local service process, and a GNOME Shell extension so Ubuntu users can inspect provider usage and diagnose prerequisites from a Linux-native surface.
This repository is organized for Ubuntu 24.04.4 LTS first. It is not a macOS port. The backend, service, and diagnostics flow are built specifically around Linux conventions such as user systemd, secret-tool, and GNOME integration.
- A backend CLI that can fetch provider usage snapshots.
- A local service mode that exposes snapshot and status calls over a Unix socket.
- A
doctorcommand that reports missing prerequisites and runtime health. - A GNOME Shell extension that prefers the local backend service when available.
- Ubuntu install, verification, troubleshooting, and debugging scripts.
apps/backendcontains the Node.js/TypeScript backend, service runtime, and tests.apps/gnome-extensioncontains the GNOME Shell extension and its view-model logic.packages/shared-contractcontains the schema shared between backend and frontend.scripts/contains Ubuntu install and verification helpers.docs/contains install, troubleshooting, and debugging guides.packaging/contains the systemd user unit used by the Ubuntu install path.
- Ubuntu 24.04.4 LTS or a comparable GNOME-based Linux desktop.
nodeonPATH.pnpmonPATH.systemd --useravailable for your desktop session.secret-toolinstalled if you want the credential-backed provider path to work cleanly.
If you are new to the repo, start here:
- Read this README end to end.
- Run
pnpm installat the repository root. - Build the backend with
pnpm build:backend. - Install the Ubuntu service wrapper with
pnpm install:ubuntu. - Verify the install with
pnpm verify:ubuntu. - Run
agent-bar doctor --jsonif anything looks wrong.
The installation flow is intentionally local and explicit. It does not depend on a package registry or a cloud install step.
pnpm install
pnpm build:backend
pnpm install:ubuntu
agent-bar doctor --json
agent-bar service status --json
agent-bar service snapshot --jsonThe Ubuntu install path is documented in docs/ubuntu-install.md. The short version is:
- Build the backend bundle.
- Install the launcher wrapper to
~/.local/bin/agent-bar. - Install the user systemd unit to
~/.config/systemd/user/agent-bar.service. - Enable and start the user service.
The install script is scripts/install-ubuntu.sh. It also builds the backend before wiring the wrapper and service unit.
Use the verification script after installation:
pnpm verify:ubuntuIt checks:
agent-baris onPATH.agent-bar.serviceis active in the user session.agent-bar doctor --jsonreturns a valid diagnostics report.agent-bar service status --jsonreturns a valid service status payload.agent-bar service snapshot --jsonreturns a valid snapshot envelope.
pnpm build:backendbuilds the backend intoapps/backend/dist.pnpm --filter backend testruns the backend test suite.pnpm --filter gnome-extension testruns the GNOME extension test suite.pnpm install:ubuntuinstalls the Ubuntu service wrapper and systemd unit.pnpm verify:ubuntuvalidates the install and runtime contract.agent-bar usage --jsonfetches a usage snapshot through the backend CLI.agent-bar usage --json --diagnosticsincludes provider diagnostics in the output.agent-bar doctor --jsonchecks prerequisites, config, and runtime health.agent-bar service runstarts the local service in the foreground.agent-bar service status --jsonreports the current service state.agent-bar service snapshot --jsonfetches a snapshot from the service.agent-bar service refresh --jsonforces a fresh snapshot from the service.
The doctor command is the fastest way to debug setup problems. It reports:
- Whether the backend config file exists.
- Whether
secret-toolis onPATH. - Whether
codexis onPATH. - Whether
claudeis onPATH. - Whether a Copilot token source is configured.
- Whether the local backend service is running.
If the GNOME extension encounters a backend issue, it now surfaces a diagnostics summary and suggests agent-bar doctor --json as the next command.
The backend supports both direct CLI usage and a local Unix socket service.
- The socket path is resolved from
XDG_RUNTIME_DIRwhen available. - The service exposes
status,snapshot, andrefreshrequests. - The GNOME extension prefers the service path when
agent-baris installed onPATH. - The CLI still works as a fallback when the service is unavailable.
- Use docs/ubuntu-troubleshooting.md for install and runtime issues.
- Use docs/ubuntu-debugging.md for logs and foreground service debugging.
- Run
systemctl --user status agent-bar.serviceif the service does not start. - Run
journalctl --user -u agent-bar.service -fto follow service logs. - Run
agent-bar doctor --jsonbefore changing anything else.
- Backend code lives in
apps/backend. - GNOME extension code lives in
apps/gnome-extension. - Shared schemas live in
packages/shared-contract. - The backend build output is generated into
apps/backend/dist.
Typical local development flow:
- Edit code.
- Run
pnpm --filter backend test. - Run
pnpm --filter gnome-extension test. - Run
pnpm build:backendif you changed backend runtime code. - Re-run
pnpm verify:ubuntuif you changed install or service behavior.
pnpm --filter backend test
pnpm --filter gnome-extension test
pnpm build:backend
pnpm verify:ubuntuThe backend suite covers the contract, diagnostics, and service runtime. The GNOME suite covers backend invocation resolution, state transitions, and view-model rendering.
- This repository is currently optimized for Ubuntu delivery, not general-purpose packaging.
- The local service is part of the supported path, not an implementation detail.
- The shared contract is what keeps the backend CLI, service mode, and GNOME extension aligned.