Configuration¶
Gity uses sensible defaults but can be customized via environment variables and local configuration.
Data Directory¶
Gity stores all data in $GITY_HOME:
| Platform | Default Location |
|---|---|
| Linux/macOS | ~/.gity |
| Windows | %APPDATA%\Gity |
Directory Structure¶
~/.gity/
├── config/ # Reserved for future settings
├── data/
│ ├── sled/ # Metadata database
│ └── status_cache/ # Cached status results
└── logs/
└── daemon.log # Daemon logs
Changing the Data Directory¶
Set the GITY_HOME environment variable:
Environment Variables¶
| Variable | Description | Default |
|---|---|---|
GITY_HOME |
Data directory location | ~/.gity (Unix) or %APPDATA%\Gity (Windows) |
GITY_DAEMON_ADDR |
IPC socket address | tcp://127.0.0.1:7557 |
GITY_HOME¶
Controls where Gity stores its database, caches, and logs.
GITY_DAEMON_ADDR¶
Changes the IPC address the daemon listens on.
Warning
If you change this, both the daemon and CLI must use the same address.
Git Configuration¶
When you register a repository, Gity modifies the repo's .git/config:
What These Settings Do¶
| Setting | Purpose |
|---|---|
core.fsmonitor |
Tells Git to use Gity for change detection |
core.untrackedCache |
Caches untracked file lists (complements fsmonitor) |
feature.manyFiles |
Enables optimizations for large repos (index v4, etc.) |
These settings are automatically removed when you unregister.
Manual Git Configuration¶
You can verify the settings:
To manually disable fsmonitor (without unregistering):
Resource Limits¶
The daemon monitors resource usage and applies back-pressure when limits are exceeded.
Default Thresholds¶
| Resource | Threshold | Action |
|---|---|---|
| CPU usage | 50% sustained | Throttle prefetch jobs |
| Memory (RSS) | 500MB | Pause low-priority jobs |
| File descriptors | 80% of limit | Reduce watcher aggressiveness |
| Sled cache | 100MB per repo | Evict old entries |
When resources return to normal, deferred jobs resume automatically.
Viewing Resource Usage¶
Logging¶
Daemon logs are written to $GITY_HOME/logs/daemon.log.
Viewing Logs¶
# View recent logs
cat ~/.gity/logs/daemon.log
# Stream logs for a specific repo
gity logs /path/to/repo --follow
Log Format¶
Logs are structured and include:
- Timestamp
- Event type
- Repository path (when applicable)
- Resource metrics
- Error details
Startup Behavior¶
Auto-start¶
CLI commands automatically start the daemon if not running:
Manual Control¶
gity daemon start # Start in background
gity daemon stop # Stop gracefully
gity daemon run # Start in foreground (for debugging)
System Startup¶
To start Gity automatically at login:
Create ~/.config/systemd/user/gity.service:
[Unit]
Description=Gity Daemon
[Service]
ExecStart=/usr/local/bin/gity daemon run
Restart=on-failure
[Install]
WantedBy=default.target
Enable:
Create ~/Library/LaunchAgents/com.gity.daemon.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.gity.daemon</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/gity</string>
<string>daemon</string>
<string>run</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
Load:
Use Task Scheduler or add to startup folder. The MSI installer can configure this automatically.
Cache Sharing¶
When the same repository is registered in multiple locations (e.g., worktrees), Gity shares cache data via rykv replication:
- Hot keys are mirrored between related registrations
- Cold starts are faster for new worktrees
- No network traffic—sharing is local only