Skip to content

CLI reference

The baum command connects local coding-agent sessions to a baum server. Run baum <command> --help for the help bundled with your installed version.

Log in when necessary and configure the current GitHub repository. On a worktree’s first successful setup, baum requests a server-side sync and uploads locally recorded agent sessions. Later runs only repeat those actions when requested with --sync, --upload, or --previous-path.

With --all, setup finds local checkouts from supported-agent session metadata, matches them to every non-archived repository linked to baum, and shows one plan before proceeding. It does not clone missing repositories. Work is isolated per repository, so later repositories continue after a failure; the final exit status is non-zero if any repository failed.

This is the recommended onboarding command for a collaborator who already has access to connected repositories. It may be run from any directory and signs in once when the machine does not yet have credentials.

Unless --skip-entire is used, setup also installs Entire CLI 0.9.0 when it is missing, enables it for detected coding agents, and takes ownership of Entire’s standard Git hooks and of the coding-agent hook commands in .claude/settings.json, .codex/hooks.json, and .cursor/hooks.json. Existing non-Entire hooks and custom core.hooksPath configurations are not replaced.

Terminal window
baum setup [flags]
Flag Description
--server URL baum API base URL, including /api.
--name NAME Name assigned to this device’s token.
--all Set up every linked repository with a local checkout and sessions.
--previous-path PATH Previous repository location to search. Repeatable.
-y, --yes Skip the upload confirmation prompt.
--skip-entire Do not install or configure Entire.
--sync Request another server-side GitHub repository sync.
--upload Upload locally recorded agent sessions again.

Setup completion is stored separately for each Git worktree. If an initial run finds no sessions or the upload is canceled, setup remains incomplete and the next run retries the initial sync and upload.

--all and --previous-path cannot be used together. The other setup flags apply to every selected repository, and --yes skips the single aggregate confirmation.

Entire setup changes the repository so it can capture coding-agent sessions and associate them with Git commits. It creates or updates these repository files:

File Purpose
.entire/settings.json Enables Entire and stores repository-wide settings.
.entire/.gitignore Excludes Entire’s local metadata, logs, temporary files, local settings, and local redactors.

For each supported coding agent detected on the machine, setup also creates or updates the following agent integration. Existing configuration in a shared settings file is preserved while Entire’s hooks are added.

Detected agent Files created or updated Agent hooks registered
Claude Code .claude/settings.json PostToolUse, PreToolUse, SessionEnd, SessionStart, Stop, UserPromptSubmit
Codex .codex/config.toml, .codex/hooks.json PostToolUse, SessionStart, Stop, UserPromptSubmit
GitHub Copilot CLI .github/hooks/entire.json agentStop, errorOccurred, postToolUse, preToolUse, sessionEnd, sessionStart, subagentStop, userPromptSubmitted
Cursor .cursor/hooks.json beforeSubmitPrompt, preCompact, sessionEnd, sessionStart, stop, subagentStart, subagentStop
Factory AI Droid .factory/settings.json PostToolUse, PreCompact, PreToolUse, SessionEnd, SessionStart, Stop, UserPromptSubmit
Gemini CLI .gemini/settings.json AfterAgent, AfterModel, AfterTool, BeforeAgent, BeforeModel, BeforeTool, BeforeToolSelection, Notification, PreCompress, SessionEnd, SessionStart
OpenCode .opencode/plugins/entire.ts An Entire plugin that handles session, turn, compaction, and message events.
Pi .pi/extensions/entire/index.ts An Entire extension that handles session, prompt, agent, tool, and shutdown events.

Setup installs dispatchers for these five Git hooks in the worktree’s Git hooks directory (normally .git/hooks/):

  • commit-msg
  • post-commit
  • post-rewrite
  • pre-push
  • prepare-commit-msg

Entire may preserve a pre-existing hook as <hook>.pre-entire; the dispatcher runs that executable after Entire. baum only takes ownership of regular hook files marked as Entire-managed, and does not replace unrelated hooks, symlinks, or hooks under a custom core.hooksPath.

Setup also rewrites the hook commands in the agent settings files above so they run through baum hooks agent. Those files are tracked by Git, so setup reports which ones it changed and you commit the result. Hook entries your repository added itself are left untouched.

If Entire itself is missing, setup also installs the entire executable at ~/.local/bin/entire. Use --skip-entire to avoid all Entire installation and configuration.

Run the internal Git-hook integration and delegate to the matching Entire hook. baum setup installs dispatchers for commit-msg, post-commit, post-rewrite, pre-push, and prepare-commit-msg; users normally do not call this command directly.

Terminal window
baum hooks git HOOK [args...]

The dispatchers fall back to entire hooks git when the installed baum binary does not support the hook command. Failures from pre-push stop the push; the informational commit hooks continue after reporting a warning.

Run a coding agent’s hook and delegate to the matching Entire hook. The hook commands committed in .claude/settings.json, .codex/hooks.json, and .cursor/hooks.json call this command; users normally do not call it directly.

Terminal window
baum hooks agent AGENT EVENT

AGENT is claude-code, codex, or cursor, and EVENT is one of that agent’s hook events. The agent’s payload, the reply it reads, and the exit status all pass through untouched. The committed commands fall back to entire hooks AGENT EVENT when the installed baum binary does not support the event, and to the Entire installation notice when neither program is installed.

On session-start this command first runs the bootstrap below, so a clone is ready before the session’s first commit.

Install what the current clone needs to record checkpoints: the pinned entire executable when it is missing, and a Git hook dispatcher for each of the five hooks listed above. Agent session start runs this automatically; run it yourself to repair a clone.

Terminal window
baum hooks bootstrap

The command is idempotent and quick to re-run: a healthy clone exits without touching anything. A hook that is missing is created, an unrelated hook is preserved as <hook>.pre-entire and chained, and symlinked hooks and a custom core.hooksPath are left alone. Problems are reported without failing, so a session is never blocked by them.

Log this device in using the browser-based device authorization flow.

Terminal window
baum login --server https://example.usebaum.com/api
Flag Description
--server URL baum API base URL, including /api.
--name NAME Name assigned to this device’s token.

Credentials are stored in ~/.config/baum/credentials.json, or below $XDG_CONFIG_HOME when that environment variable is set. The file is readable only by the current user.

The stored token belongs to the server it was issued by. Pointing a command at another server with --server does not reuse it: baum setup logs in to the new server, and other commands ask you to run baum login --server URL.

Find sessions associated with a repository, redact detected secrets locally, and upload the prepared archive.

Terminal window
baum upload [directory] [flags]

The directory defaults to the current directory.

Flag Description
--server URL Override the stored baum API base URL.
--previous-path PATH Previous repository location to search. Repeatable.
-y, --yes Skip the confirmation prompt.

Show the GitHub identity associated with the active token.

Terminal window
baum whoami

Use --server URL to override the stored server.

Revoke the current device token and remove the local credentials file.

Terminal window
baum logout

Local credentials are removed even if the server cannot be reached. A warning is printed if server-side revocation fails.

Variable Description
BAUM_SERVER API base URL used when --server is absent. Include /api.
BAUM_TOKEN API token override, intended for CI or managed devices.
XDG_CONFIG_HOME Changes the parent directory used for stored credentials.

Command-line flags take precedence over environment and stored server settings. BAUM_TOKEN takes precedence over the token in the credentials file.