Docs / Configuration

Configuration

Hub, runtime, saving, memory, and keystore settings.

Use agit config to inspect or change this machine’s AgentGit settings. These settings are global to the AgentGit home by default. push.auto also supports a local per-repository override with --repo owner/repo.

Inspect and change a setting

agit config --list
agit config hub.url
agit config runtime.default codex
agit config runtime.default --unset

The last command removes the explicit runtime choice. A bare agit config opens the interactive editor when a terminal is available. Use --list or an explicit key in scripts; add --json for structured output showing effective and stored values and their source.

Available settings

Key Values and default Effect
hub.url Default https://agent-git.com Hub used by commands; AGIT_HUB_URL takes precedence
runtime.default For local launches: claude-code, codex, opencode, openclaw, hermes, or workbuddy; unset falls back to Claude Code for new sessions Runtime used when an operation needs a default; see runtime requirements. --as selects a runtime for a particular launch
push.visibility ask (default), private, or public First-publication visibility; noninteractive ask chooses private
push.auto false (default) or true; global default with a per-repository override Automatically publish settled turns from managed sessions
commit.auto true (default) or false Whether supported runtime hooks automatically settle adopted sessions and capture sessions in project folders bound with automatic upload
memory.track session (default) or off Whether runtime memory is collected onto session branches
secrets.keystore os (default) or file Legacy dictionary key reader only; new privacy dictionaries use automatic cloud account keys with local fallback

push.visibility does not change an already published repository’s visibility; use agit repo visibility for that. commit.auto neither installs hooks nor adopts unmanaged conversations by itself, and does not control the RC supervisor’s save and push cycle. Unmanaged sessions are adopted automatically only in a folder enrolled with agit project bind --auto-upload; see Save every session in a project folder. See runtime setup, Remote Control, and memory.

Automatic publishing

agit config push.auto true
agit config push.auto true --repo owner/repo
agit config push.auto --repo owner/repo
agit config push.auto false --repo owner/repo
agit config push.auto --unset --repo owner/repo

The first command changes the global default. A repository override takes precedence, including false when the global default is true. The read command shows the effective value; --unset removes the override so that the repository inherits the global default again. The repository must already exist locally. These preferences apply only on this machine.

agit init project-notes --auto-push=false records the same repository override at initialization; use --auto-push=true to enable it. Attach the value with =. This selects publishing behavior for settled turns; it does not enroll the folder for capture or install runtime hooks.

agit project bind . --repo owner/repo --history none --auto-upload enrolls the folder for capture, installs supported runtime hooks, and sets the local repository’s push.auto override to true. That also enables automatic publishing for other managed sessions in the same repository; no separate config command is needed. commit.auto controls hook settlement, while push.auto controls subsequent automatic publishing. See project capture requirements and history selection.

Select the right Hub and session

agit login --hub https://hub.example.com
agit config hub.url
agit whoami --check

Use your Hub’s actual address. Login remembers that Hub as the default, while credentials remain scoped to each Hub. If an environment override is set, inspect the effective setting before assuming the stored default is active.

Environment variable Meaning
AGIT_HOME AgentGit local data root; defaults to ~/.agit
AGIT_HUB_URL Overrides the default Hub URL
AGIT_SESSION Explicit owner/repo@branch identity inherited by commands and MCP
AGIT_SECRETS_KEYSTORE Selects the key reader for legacy secret dictionaries

User-level settings live in AGIT_HOME/config.json. Use the CLI to validate values instead of editing the file by hand. A runtime launched through AgentGit gets its session identity automatically. For a command in another POSIX shell:

AGIT_SESSION=alice/my-project@first-task agit log @

In PowerShell, set $env:AGIT_SESSION or use the full target directly, such as agit log alice/my-project@first-task. A directory binding does not supply a missing session target. See context selection.

Check installation and updates

agit --version
agit upgrade --check
agit doctor
agit doctor --check-backend

upgrade --check reports availability; agit upgrade installs the announced CLI release. Re-run agit setup to refresh runtime integrations after updating, and reload runtimes as needed. A running RC daemon must be stopped and restarted to use the new binary; stop it only when you are ready to end its sessions.

doctor checks local integrity and runtime support. Add --check-backend for Hub connectivity. A successful local check does not establish that a particular conversation was saved or published; inspect its history and sync status too.