grite
The command-line interface for Grite — git-backed issue tracking that works offline, syncs with git push, and coordinates AI agents without conflicts.
grite is the primary user-facing binary of the Grite ecosystem. It provides a fast, ergonomic CLI for creating, querying, and managing issues stored as an append-only event log inside your repository's git refs. Every operation works offline. Sync happens through the git remote you already use. Multi-agent coordination is handled automatically by CRDT semantics.
What Makes the Grite CLI Different?
Most issue trackers force you to leave your terminal, open a browser, and context-switch to a web application. Grite brings issue tracking to where you already are — the command line, inside your repository, on your branch.
Zero-Config, Zero-Setup
Run grite init in any git repository and you have a fully functional issue tracker. No database setup. No server to run. No account to create. No API tokens to manage. Your issues live in refs/grite/wal, travel with your code, and sync when you git push.
Agent-Native Design
The CLI was designed for both humans and machines:
- Human-friendly — Pretty-printed tables, colored output, sensible defaults, and intuitive commands.
- Machine-friendly — Every command supports
--jsonfor structured output. JSON is stable, documented, and tested. Build scripts, CI pipelines, and AI agents can parse it reliably. - Agent-discoverable —
grite initgeneratesAGENTS.md, a convention that AI coding agents read automatically. Agents discover grite without any manual configuration.
Performance by Default
The CLI auto-detects and auto-spawns a background daemon on first use. This eliminates per-command startup overhead (database open, WAL replay, view rebuild) and enables concurrent access. The daemon shuts down automatically after idle timeout. You never think about it, but you always benefit from it.
Conflict-Free Collaboration
Two agents edit the same issue at the same time? Both changes are preserved. Grite uses CRDT (Conflict-free Replicated Data Type) semantics to merge events deterministically, with no manual intervention and no data loss. This is not eventual consistency with conflicts — it is mathematically guaranteed convergence.
Installation
# Quick install (all platforms)
|
# macOS / Linux via Homebrew
# Rust via Cargo
# Node.js via npm
# Python via pip
# Ruby via RubyGems
Prerequisites: Git 2.38+.
Commands
Issue Lifecycle
Manage the full lifecycle of issues and tasks directly from your terminal:
# Create a new issue
# List open issues (fast — queries the materialized view)
|
# Show full issue details
# Update issue properties
# Close an issue
# Reopen a closed issue
# Add a comment (great for agent checkpoints)
Actor Management
Each installation of grite gets an actor ID. Multiple actors (agents, developers, CI systems) can work on the same repository and merge their changes later.
# Initialize a new actor for this machine/agent
# List all known actors
# Show actor details
# Set the default actor for this repository
Sync and Recovery
Synchronize state between actors and rebuild the materialized view:
# Pull remote WAL and merge
# Push local WAL to remote
# Pull, merge, and push in one command
# Create a snapshot for fast rebuilds
# Rebuild the materialized view from WAL
# Fast rebuild from latest snapshot
Distributed Locks
Coordinate exclusive access to resources across agents:
# Acquire a lock on a file or module
# Check if a resource is locked
# Release a lock early
# List all active locks
Daemon Control
The background daemon is optional but recommended for performance:
# Start the daemon manually
# Check daemon status
# Stop the daemon
# Run a command without using the daemon
Health and Diagnostics
# Run comprehensive health checks
# Auto-repair detected issues
# Export issues to Markdown
# Export to JSON for programmatic processing
Context Extraction
Extract code context using tree-sitter for richer issues:
# Extract symbols from the current codebase
# Query symbol references
Quick Examples
Daily Developer Workflow
# Morning standup — see what is open
# Pick a task, add an in-progress label
# Claim the lock on the file you are editing
# Work, work, work...
# Add a checkpoint comment
# Close when done
# Push everything
Agent Workflow
# Agent startup routine (from AGENTS.md)
# Agent claims a task
# Agent stores a memory
# Agent pushes state
Architecture
The grite binary is a thin CLI frontend that delegates to the libgrite-cli programmatic API. It handles argument parsing, output formatting, and daemon lifecycle management.
grite (CLI binary)
|
+-- libgrite-cli (programmatic API)
|
+-- libgrite-core (data model, storage, CRDTs)
+-- libgrite-git (WAL, sync, snapshots)
+-- libgrite-ipc (daemon communication)
- Single operation mode: If the daemon is not running, the CLI opens the database directly, executes the command, and exits. No daemon required.
- Daemon mode: If the daemon is running (or auto-spawned), commands are sent via IPC over Unix domain sockets for better performance and concurrency.
Configuration
Grite reads configuration from multiple sources, in order of precedence:
- Command-line flags (highest priority)
- Environment variables (
GRITE_*) .git/grite/config.toml(repository-level)~/.config/grite/config.toml(user-level)- Built-in defaults (lowest priority)
See the Configuration documentation for all options.
Integration
Shell Completions
# Bash
# Zsh
# Fish
CI/CD Integration
# Example GitHub Actions step
- name: Track deployment
run: |
grite issue create --title "Deploy v${{ github.ref_name }}" \
--label deployment \
--label "release:${{ github.ref_name }}"
grite sync --push
Editor Integration
Because grite outputs JSON, integrating with editors is straightforward:
# Vim: list issues in quickfix
|
# VS Code: use in tasks.json
See Also
- Grite Repository — Main project, architecture, and documentation
- libgrite-cli — Programmatic API for embedding in Rust applications
- grite-daemon — Background daemon for performance
- docs.rs/grite — Rust API documentation
License
MIT License — see LICENSE for details.