Five commands, zero to published
# 1. Install (needs node ≥ 20; the installer fetches the binary and
# runs `agit setup` for you — skills, hooks, MCP, all of it)
npx -y create-agit
# 2. Sign in. No password in the terminal: a browser approval opens by default;
# on a browserless box `agit login --device` prints a code to enter on any
# other device. (CI: read a token from stdin — any access token minted by an
# interactive `agit login` works, ~/.agit/credentials.json)
agit login # browser approval
agit login --device # prints a code, enter it on the website
agit login --with-token <<< "$AGIT_TOKEN"
# 3. Wire the integrations once (idempotent — safe to re-run)
agit setup
# 4. Adopt a session that's already running. Import settles the turns
# it has so far and places the session on branch `exp`.
agit import <session-id> -n photo -b exp
# 5. Publish. From now on every turn settles automatically.
agit push photo
After step 3, every user turn ends in a turn commit — you don’t get to forget to save, just like git with code.
The installer covers Linux (x64 and ARM64) and macOS (Intel and Apple
silicon). Upgrades arrive on their own: the hub announces new releases, and
agit upgrade swaps the binary in place.
Which hub you’re talking to
Out of the box the CLI talks to the public hub, https://agent-git.com.
Nothing to configure.
Your password never leaves the machine in plaintext — the hub stores a hash;
~/.agit/credentials.json holds the resulting session tokens locally.
Verify the wiring
agit doctor # local integrity + per-runtime capability table
agit doctor --check-backend
agit status # who am I, which session, sync state
Next: Concepts — the four mappings everything else follows.