CLI Reference¶
Complete command-line reference for Gity.
Synopsis¶
Global Options¶
| Option | Description |
|---|---|
--version |
Print version information |
--help |
Print help information |
Commands¶
register¶
Register a repository for acceleration.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the Git repository |
Example:
Effects:
- Starts file watcher for the repository
- Configures Git fsmonitor settings
- Performs initial cache population
- Schedules background maintenance
unregister¶
Stop accelerating a repository.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Example:
Effects:
- Stops file watcher
- Removes Git fsmonitor configuration
- Cleans up cached metadata
list¶
List all registered repositories.
Options:
| Option | Description |
|---|---|
--stats |
Include resource usage statistics |
Example:
Output:
With --stats:
Registered repositories:
/home/user/projects/frontend
CPU: 0.1% RSS: 12MB Cache: 5MB Jobs: 0
/home/user/projects/backend
CPU: 0.2% RSS: 15MB Cache: 8MB Jobs: 1
status¶
Get fast status summary.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Example:
Output:
Returns clean/dirty state and list of changed paths.
health¶
Run diagnostic checks.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Example:
Output includes:
- Watcher status
- Generation token
- Dirty path count
- Scheduled jobs
- Resource throttling status
changed¶
List files changed since a token.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Options:
| Option | Description |
|---|---|
--since <TOKEN> |
Watcher token (default: last status token) |
Example:
prefetch¶
Trigger background fetch.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
now |
Optional: jump to front of queue |
Example:
maintain¶
Force maintenance tasks.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Example:
Tasks run:
- Commit-graph refresh
- Garbage collection
- Other maintenance operations
logs¶
Stream daemon logs.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the registered repository |
Options:
| Option | Description |
|---|---|
--follow |
Tail live output |
--limit <N> |
Number of entries (default: 50) |
Example:
gity logs /home/user/projects/myrepo
gity logs /home/user/projects/myrepo --follow
gity logs /home/user/projects/myrepo --limit 100
events¶
Stream file watcher events.
Subscribes to the daemon's PUB socket and streams notifications.
Example:
daemon run¶
Start daemon in foreground.
Options:
| Option | Description |
|---|---|
--config <PATH> |
Path to configuration file |
Example:
Press Ctrl+C to exit.
daemon start¶
Start daemon in background.
Example:
daemon stop¶
Stop the daemon gracefully.
Example:
daemon oneshot¶
Start daemon, service a repo, then exit.
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the repository |
Example:
Useful for CI/CD pipelines.
daemon metrics¶
Print current resource metrics.
Example:
Output includes:
- CPU usage
- Memory (RSS)
- File descriptors
- Cache usage
- Job queue depths
tray¶
Launch system tray UI.
Example:
The tray provides:
- Repository status overview
- Health information
- Exit option (stops daemon)
fsmonitor-helper¶
Git fsmonitor protocol implementation.
Arguments:
| Argument | Description |
|---|---|
VERSION |
Protocol version (must be 2) |
TOKEN |
Opaque token from previous response |
Note
This command is invoked by Git, not directly by users.
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | Repository not found |
| 4 | Daemon not running |
| 5 | Permission denied |
Shell Completion¶
Generate shell completion scripts: