Docs

CLI reference.

Every subcommand, every flag, with a copy-pasteable example. For the daemon internals, the IPC protocol, and the architecture, see the full technical docs.

Core workflow

The commands you use day to day.

gity register

gity register <path> [--prefetch] [--maintain]

Register a repository for acceleration. Starts the daemon if it's not already running, attaches a file watcher to the repo, and writes a fsmonitor hook into the repo's Git config. One-time setup; persists across reboots.

--prefetch
Schedule background prefetch jobs after registration.
--maintain
Schedule background `git maintenance` after registration.

Example

gity register ~/work/monorepo --prefetch --maintain

gity unregister

gity unregister <path>

Stop accelerating a repo. Detaches the watcher, removes the fsmonitor hook from `.git/config`, and cleans up the cache. Safe to run on an unregistered repo (no-op).

Example

gity unregister ~/work/monorepo

gity prefetch

gity prefetch <path>

Trigger an immediate background fetch of all remotes. Useful before going offline; otherwise the scheduler handles this automatically.

Example

gity prefetch ~/work/monorepo

gity maintain

gity maintain <path>

Force maintenance tasks (repack, GC, commit-graph rebuild) immediately. Skip the scheduler — use when you want to prep a repo before a critical operation.

Example

gity maintain ~/work/monorepo

gity fsmonitor-helper

gity fsmonitor-helper <version> <token>

The Git-facing endpoint of the fsmonitor v2 protocol. Wired into your repo's `.git/config` by `gity register`; you should never need to call it manually.

Daemon control

Start, stop, and inspect the background daemon.

gity daemon start

gity daemon start

Start the daemon in the background explicitly. Normally not needed — the daemon auto-launches when you register your first repo.

gity daemon stop

gity daemon stop

Stop the daemon gracefully. Watchers detach, in-flight requests drain, the cache flushes to disk. Run on a system whenever you want a clean exit.

gity daemon oneshot

gity daemon oneshot <repo>

Run the daemon, service one repo for the duration of a single Git command, then exit. Designed for CI runners where a long-lived daemon would be wasted.

Example

gity daemon oneshot . && git status

gity daemon metrics

gity daemon metrics

Print aggregate daemon metrics: CPU, RSS, file descriptors, total cache hits/misses, IPC queue depth.

Introspection

See what gity is doing and why.

gity list

gity list [--stats]

List every registered repo. With `--stats`, also prints CPU, RSS, file descriptors, and cache hit rate per repo.

--stats
Include per-repo resource metrics.

Example

gity list --stats

gity status

gity status <path>

Print a fast clean/dirty summary and the list of changed paths. Bypasses Git's CLI entirely and reads directly from the daemon's cache — useful for scripts that just need to know whether anything changed.

Example

gity status ~/work/monorepo

gity health

gity health <path>

Detailed diagnostics for one repo: watcher tokens issued, scheduler queue depth, current resource budget, last maintenance run, last prefetch run.

Example

gity health ~/work/monorepo

gity events

gity events [--repo <path>]

Subscribe to a live stream of daemon notifications: file-changed, watcher-reset, prefetch-complete, maintenance-complete. Useful for IDE integrations.

gity changed

gity changed <repo> [--since <token>]

Print every file that has changed since a given fsmonitor token. The primitive that IDEs use to keep their gutter decorations fresh.

gity logs

gity logs <repo> [--follow] [--limit N]

Stream structured daemon logs for one repo. `--follow` tails them like `tail -f`; `--limit` caps output. JSON output via `--format json` for ingestion.

UI

Optional graphical surfaces.

gity tray

gity tray

Launch the optional system tray UI. Available when gity is installed with `--features tray`. Shows live daemon state, registered repos, and a one-click pause control.

Need more?

The full docs site has the internals.

Wire-protocol diagrams, scheduler tuning, contributing guide. The CLI reference here is for day-to-day use.