Skip to main content
The hivemind CLI manages the background daemon that syncs your coding sessions to HiveMind.

Installation

# Homebrew (macOS / Linux)
brew install wandb/tap/hivemind

# pip / uv
uv tool install wandb-hivemind

Quick start

hivemind login    # Authenticate with GitHub
hivemind start    # Start the daemon
hivemind status   # Check that it's running

Commands

Daemon management

CommandDescription
hivemind startStart the daemon
hivemind stopStop the daemon
hivemind restartStop and restart
hivemind statusShow PID, uptime, session counts
hivemind logsView daemon logs
hivemind doctorFind and fix common problems
hivemind runRun in foreground (used by service managers)

Starting the daemon

hivemind start picks the right service manager for your platform and sets it up for you:
  • macOS: Homebrew services
  • Linux: systemd user service
  • Fallback: plain background process
# Normal start (uses your platform's service manager)
hivemind start

# Run in foreground for debugging
hivemind start --foreground

Checking status

hivemind status
This prints a table with the PID, uptime, tracked sessions, pending events, and log file path. Add --json for machine-readable output.

Viewing logs

# Recent logs
hivemind logs

# Follow in real-time
hivemind logs -f

# Last 50 lines
hivemind logs -n 50
Where the log file lives depends on your setup:
  • macOS (Homebrew): $(brew --prefix)/var/log/hivemind.log
  • macOS (other): ~/Library/Logs/hivemind/hivemind.log
  • Linux: ~/.local/state/hivemind/hivemind.log or syslog

Diagnosing issues

# See what's wrong
hivemind doctor

# Try to fix it automatically
hivemind doctor --fix
This checks for stale lock files, corrupted credentials, and service state mismatches.

Authentication

CommandDescription
hivemind loginLog in with GitHub
hivemind logoutRemove stored credentials
hivemind whoamiShow who you’re logged in as

Sessions

CommandDescription
hivemind searchSearch sessions by keyword
hivemind transcriptView a session transcript
hivemind importBulk import existing sessions
hivemind exportExport session data
hivemind resumeResume a previous session
hivemind insightsView session insights

Searching sessions

# Search by keyword
hivemind search "authentication bug"

# Filter by repo
hivemind search --repo myorg/myapp "refactor"

Importing sessions

If you started using HiveMind after you already had agent sessions on disk, import backfills them:
# Import sessions from the last 90 days (default)
hivemind import

# Import everything, no matter how old
hivemind config set import.max_age_days 0
hivemind import

Configuration

All config lives in ~/.hivemind/config.toml.
CommandDescription
hivemind config showPrint all settings and where they came from
hivemind config get KEYGet a single value
hivemind config set KEY VALUESet a value
hivemind config add KEY VALUEAppend to a list
hivemind config reset KEYReset to default
hivemind config pathPrint the config file path

Config reference

KeyTypeDefaultDescription
server.endpointstringhttps://hivemind.wandb.toolsBackend API URL
dev.debugboolfalseEnable debug logging
web_sessions.enabledbooltrueSync Claude web sessions
web_sessions.poll_intervalint1800Web session poll interval (seconds)
import.max_age_daysint90Max age for bulk import (0 = all)
sessions.privateboolfalseMake sessions private by default
sessions.org_reposlist[]Repos always visible to org
sessions.private_reposlist[]Repos always private

Example config

# ~/.hivemind/config.toml

[server]
endpoint = "https://hivemind.wandb.tools"

[dev]
debug = false

[web_sessions]
enabled = true
poll_interval = 1800

[import]
max_age_days = 90

[sessions]
private = false
org_repos = ["myorg/shared-project"]
private_repos = ["myorg/secret-project"]

API command

You can hit the backend API directly for debugging. The CLI handles auth for you.
# List sessions
hivemind api /sessions

# Get a specific session
hivemind api /sessions/SESSION_ID

# Query with parameters
hivemind api /sessions -q limit=10 -q user_id=abc123

# PUT request
hivemind api -X PUT /sessions/SESSION_ID/summary

# Raw JSON (no pretty-printing)
hivemind api /stats/active-users --raw
FlagDescription
-X, --methodHTTP method (GET, POST, PUT, DELETE, PATCH)
-q, --queryQuery parameter as key=value (repeatable)
-d, --dataRequest body (JSON string)
--rawSkip pretty-printing, output raw JSON
-v, --verboseShow request details

Troubleshooting

ProblemFix
Daemon won’t start (“lock held”)hivemind doctor --fix
Stale lock after a crashrm ~/.hivemind/daemon.lock
”Not authenticated” after loginhivemind doctor --fix && hivemind login
Daemon not respondinghivemind restart
Permission errors on stophivemind doctor && hivemind stop --force
systemd fails to startCheck the logs: journalctl --user -t hivemind -n 50

File locations

FileWhat it’s for
~/.hivemind/config.tomlConfiguration
~/.hivemind/credentials.jsonAuth tokens
~/.hivemind/state.jsonSync state (which sessions have been uploaded)
~/.hivemind/daemon.lockPID lock file