CLI reference
The pillbox CLI is designed for human operators and setup tasks. The agent interacts with Pillbox via the MCP server, not the CLI.
pillbox status
Section titled “pillbox status”Shows global status: binary path, global and local databases, active bottle, HTTP server, MCP server, and skill.
Serve commands
Section titled “Serve commands”pillbox serve
Section titled “pillbox serve”Shows the service status if installed. If not installed, displays a hint with the install command.
pillbox serve install [--port N]
Section titled “pillbox serve install [--port N]”Registers the HTTP server as a system service and enables autostart on boot. Default port: 4242.
pillbox serve installpillbox serve install --port 8080Also adds pillbox.local to the system hosts file for named access instead of localhost. Requires write permission on the hosts file (sudo on Linux/macOS, Administrator on Windows); if unavailable, the service installs anyway and the UI remains accessible at http://localhost:<port>.
pillbox serve uninstall
Section titled “pillbox serve uninstall”Removes the system service and the pillbox.local entry from the hosts file. On Windows, requires an elevated (Administrator) terminal.
pillbox serve start
Section titled “pillbox serve start”Starts the service. The service must be installed first with pillbox serve install.
pillbox serve stop
Section titled “pillbox serve stop”Stops the service.
pillbox serve status
Section titled “pillbox serve status”Shows whether the server is running and the access URL.
Bottle commands
Section titled “Bottle commands”pillbox bottle init
Section titled “pillbox bottle init”Interactive wizard to initialize a bottle in the current directory.
- Prompts for a display name (default: directory name)
- Prompts for scope:
localorglobal - Creates the database and runs migrations
- If local and in a git repo: offers to add
.pillbox/to.gitignore
pillbox bottle status
Section titled “pillbox bottle status”Status of the bottle in the current directory.
pillbox bottle list [-l N]
Section titled “pillbox bottle list [-l N]”Lists all bottles registered in the global database. Default: 20.
pillbox bottle listpillbox bottle list -l 50pillbox bottle migrate <global|local>
Section titled “pillbox bottle migrate <global|local>”Moves a bottle’s prescriptions and pills between the local and global databases. Requires confirmation and updates the bottle’s scope automatically.
global: moves the current directory’s bottle to the global database, then deletes the local database file (.pillbox/pillbox.db).
local: shows an interactive list of global bottles; moves the selected one to the local database, then removes it from the global database. Fails if the current directory already has a local bottle.
pillbox bottle migrate global # local → global (deletes local DB file)pillbox bottle migrate local # global → local (removes bottle from global DB)pillbox bottle delete <slug>
Section titled “pillbox bottle delete <slug>”Removes a bottle from the global registry. Requires typing the slug to confirm — the operation cannot be undone.
pillbox bottle delete my-projectThe command shows the bottle’s name, slug, and database path before prompting for confirmation.
pillbox bottle repair <slug>
Section titled “pillbox bottle repair <slug>”Updates the database path of an unlinked bottle — one whose .pillbox/pillbox.db file no longer exists at the registered location (for example, after moving a project to a new directory).
pillbox bottle repair my-projectPrompts for the new absolute path to the pillbox.db file. The path must exist and be a file; if it does not, the command exits with an error and makes no changes.
pillbox bottle vinculate [directory]
Section titled “pillbox bottle vinculate [directory]”Registers an existing local bottle database into the calling user’s global registry. Use this when a second OS user needs access to a bottle created by another user on the same machine — for example, when two users share a project directory.
directory is optional and defaults to the current working directory.
pillbox bottle vinculate # links bottle in cwdpillbox bottle vinculate /home/alice/my-project # links bottle at explicit pathThe command reads the bottle from <directory>/.pillbox/pillbox.db and adds it to ~/.pillbox/pillbox.db. The operation is idempotent — running it twice reports “already linked” without error.
Error conditions:
.pillbox/pillbox.dbnot found at the resolved path — exits 1- The resolved path is the global database itself (circular link) — exits 1
- The local database contains no bottle — exits 1
Prescription commands
Section titled “Prescription commands”pillbox prescription open "<title>"
Section titled “pillbox prescription open "<title>"”Opens a new prescription (work session) for the current bottle.
pillbox prescription open "Implement OAuth login"Multiple prescriptions can be open simultaneously in the same bottle.
pillbox prescription list [-l N] [--archived-limit N]
Section titled “pillbox prescription list [-l N] [--archived-limit N]”Lists the most recent prescriptions for the current bottle. Default: 10.
| Flag | Description |
|---|---|
-l, --limit N | Maximum active prescriptions to show (default: 10) |
--archived-limit N | Maximum archived prescriptions to show; 0 hides the section |
pillbox prescription listpillbox prescription list -l 25pillbox prescription list --archived-limit 0pillbox prescription show <id> [-l N] [--archived-limit N]
Section titled “pillbox prescription show <id> [-l N] [--archived-limit N]”Shows the full detail of a prescription and all its pills. Accepts a full UUID or a short prefix (≥ 8 characters). Default: 20 pills shown; use -l to change the limit.
| Flag | Description |
|---|---|
-l, --limit N | Maximum pills to show (default: 20) |
--archived-limit N | Maximum archived pills to show; 0 hides the section |
pillbox prescription show abc123efpillbox prescription show abc123ef -l 50pillbox prescription close
Section titled “pillbox prescription close”Closes the open prescription for the current bottle.
pillbox prescription reopen <id>
Section titled “pillbox prescription reopen <id>”Reopens a closed prescription (clears ended_at). Accepts a full UUID or a short prefix (≥ 8 characters). Idempotent — if the prescription is already open, succeeds without changes.
pillbox prescription reopen abc123efPill commands
Section titled “Pill commands”pillbox pill show <id>
Section titled “pillbox pill show <id>”Shows the full detail of a pill by its UUID. Accepts a full UUID or a short prefix. Works even if the pill is archived.
pillbox pill show abc123efCapsule commands
Section titled “Capsule commands”pillbox capsule list [-l N] [--archived-limit N]
Section titled “pillbox capsule list [-l N] [--archived-limit N]”Lists global capsules — active ones first, archived (soft-deleted) ones in a separate section at the end. Default: 50.
| Flag | Description |
|---|---|
-l, --limit N | Maximum active capsules to show (default: 50) |
--archived-limit N | Maximum archived capsules to show; 0 hides the section |
pillbox capsule listpillbox capsule list -l 100pillbox capsule list --archived-limit 0pillbox capsule show <id>
Section titled “pillbox capsule show <id>”Shows the full detail of a capsule by UUID, including if it is archived. Accepts a full UUID or a short prefix.
pillbox capsule show abc123efMCP commands
Section titled “MCP commands”pillbox mcp install
Section titled “pillbox mcp install”Downloads the MCP server from the latest GitHub release and installs it to ~/.pillbox/mcp/. Requires Node.js ≥ 18. Detects all installed providers (claude, opencode) and registers the MCP entry in each one.
pillbox mcp uninstall [--provider <name>]
Section titled “pillbox mcp uninstall [--provider <name>]”Removes the MCP server directory and its entry from all detected providers. Use --provider to target a specific provider.
| Flag | Description |
|---|---|
--provider <name> | Provider to uninstall from (claude or opencode). If omitted, prompts interactively. |
pillbox mcp status
Section titled “pillbox mcp status”Shows the MCP server installation status and usage help.
Skill commands
Section titled “Skill commands”pillbox skill install
Section titled “pillbox skill install”Downloads the Claude Code skill from the latest GitHub release. Detects all installed providers and installs the skill for each one.
pillbox skill uninstall [--provider <name>]
Section titled “pillbox skill uninstall [--provider <name>]”Removes the skill directory for the target provider. Use --provider to target a specific provider.
| Flag | Description |
|---|---|
--provider <name> | Provider to uninstall from (claude or opencode). If omitted, prompts interactively. |
pillbox skill status
Section titled “pillbox skill status”Shows the skill installation status and usage help.
Language commands
Section titled “Language commands”pillbox lang
Section titled “pillbox lang”Shows the current language and available options.
pillbox lang set <code>
Section titled “pillbox lang set <code>”Sets the CLI language. Persisted to ~/.pillbox/lang.
pillbox lang set enpillbox lang set deSupported codes: es, en, de, it, pt, fr.
Language detection order: ~/.pillbox/lang → PILLBOX_LANG env var → system locale → fallback es.
pillbox update
Section titled “pillbox update”Auto-updates the Pillbox binary from the latest GitHub release. Checks the current version against the latest release, then prompts for confirmation before downloading and replacing the binary in place.
pillbox updatepillbox uninstall
Section titled “pillbox uninstall”Interactive removal of Pillbox components. Prompts before each step: MCP server, skill, global database, binary.
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
PILLBOX_LANG | Override language detection (e.g. PILLBOX_LANG=en) |
PILLBOX_VERSION | Version to install (used by install.sh) |
PILLBOX_INSTALL_DIR | Install directory for the binary |
RUST_LOG | Log level for the server (e.g. RUST_LOG=info pillbox serve start) |