{"id":42960999,"url":"https://github.com/speakeasy-api/granary","last_synced_at":"2026-02-22T22:22:57.681Z","repository":{"id":332002633,"uuid":"1132433426","full_name":"speakeasy-api/granary","owner":"speakeasy-api","description":"A CLI context hub for agentic work","archived":false,"fork":false,"pushed_at":"2026-02-08T15:28:51.000Z","size":2081,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-08T20:48:01.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-12T00:09:18.000Z","updated_at":"2026-02-06T22:00:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/speakeasy-api/granary","commit_stats":null,"previous_names":["danielkov/granary","speakeasy-api/granary"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/speakeasy-api/granary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fgranary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fgranary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fgranary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fgranary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-api","download_url":"https://codeload.github.com/speakeasy-api/granary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fgranary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29458453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T21:29:27.764Z","status":"ssl_error","status_checked_at":"2026-02-14T21:28:11.111Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-30T23:08:33.136Z","updated_at":"2026-02-14T22:17:43.807Z","avatar_url":"https://github.com/speakeasy-api.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Granary\n\nShared memory and coordination for AI coding agents. Single binary, local-first, no cloud.\n\n```sh\n# Install\ncurl -sSfL https://raw.githubusercontent.com/speakeasy-api/granary/main/scripts/install.sh | sh\n\n# Init + plan + watch\ngranary init\nclaude -p \"use granary to plan: Migrate endpoints to v2\" \u0026 granary summary --watch\n```\n\n## Getting Started\n\n### Install\n\n**macOS / Linux:**\n\n```sh\ncurl -sSfL https://raw.githubusercontent.com/speakeasy-api/granary/main/scripts/install.sh | sh\n```\n\n**Windows (PowerShell):**\n\n```powershell\nirm https://raw.githubusercontent.com/speakeasy-api/granary/main/scripts/install.ps1 | iex\n```\n\n**From source** (requires [Rust](https://rustup.rs/)):\n\n```sh\ncargo install --git https://github.com/speakeasy-api/granary.git\n```\n\n### LLM-First workflow\n\n```sh\ngranary init\ngranary plan \"User authentication\"\ngranary next\ngranary work \u003ctask-id\u003e\ngranary task \u003ctask-id\u003e done\ngranary summary --format prompt\n```\n\n`plan` creates a project and breaks it into tasks. `work` claims a task and gives your agent full context. `summary` produces an LLM-optimized handoff of everything that happened.\n\n## Runners \u0026 Workers\n\nRunners are reusable command configs. Workers subscribe to events and spawn runners automatically. This is the core automation loop — plan work, then let workers drive execution.\n\n### 1. Configure a runner\n\n```sh\ngranary config runners add claude-implementer \\\n  --command \"claude\" \\\n  --arg \"-p\" \\\n  --arg \"$(granary work start {event.entity_id})\" \\\n  --arg \"--allowedTools\" \\\n  --arg \"Bash,Read,Write,Edit,Glob,Grep\" \\\n  --concurrency 3\n```\n\n### 2. Start a worker\n\n```sh\ngranary worker start --runner claude-implementer --on task.next\n```\n\nNow every time a task is available, a Claude Code session is spawned with the task context piped in. Add filters to narrow scope:\n\n```sh\ngranary worker start --runner claude-implementer --on task.next --filter \"priority=P0\"\n```\n\n### 3. Monitor\n\n```sh\ngranary workers              # List active workers\ngranary runs                 # List runner executions\ngranary runs --watch         # Live-updating view\ngranary run \u003crun-id\u003e logs    # Inspect a specific run\n```\n\nRunner args support `{event.entity_id}`, `{id}`, `{title}`, `{project_id}`, and other event payload fields. See [docs/workers.md](docs/workers.md) for the full reference on events, filters, template substitution, retry behavior, and concurrency control.\n\n## Why Granary?\n\nAgents don't coordinate well on their own. Without shared infrastructure they lose context between sessions, duplicate work, and create silent conflicts.\n\n- **Session-centric context** — explicit \"what's in context\" for each agent run, so nothing is lost between handoffs\n- **Lossless planning** — agents can clear their working context freely; granary persists decisions and progress for the next agent\n- **Concurrency safety** — task claiming with leases prevents multiple agents from colliding on the same work\n- **LLM-native commands** — `plan`, `work`, and `initiate` bundle multiple operations into single calls, reducing tool invocations\n- **Event-driven automation** — workers react to state changes and spawn agent sessions without human intervention\n\n## CLI Workflows\n\n### Planning\n\n```sh\ngranary plan \"Audit service\"\ngranary initiate \"Q1 Platform Migration\"\n```\n\n### Task management\n\n```sh\ngranary project \u003cproject-id\u003e tasks create \"Implement login\" --priority P0\ngranary next\ngranary start \u003ctask-id\u003e\ngranary search \"auth\"\n```\n\n### Context \u0026 handoffs\n\n```sh\ngranary context --format prompt --token-budget 2000\ngranary handoff --to \"Code Review Agent\" --tasks task-1,task-2\ngranary summary\n```\n\n## Output Formats\n\nEvery command supports multiple output formats:\n\n```sh\ngranary tasks                    # Human-readable table\ngranary tasks --json             # JSON for parsing\ngranary tasks --format prompt    # Optimized for LLM context\ngranary tasks --format yaml      # YAML\ngranary tasks --format md        # Markdown\n```\n\n## Watch Mode\n\n```sh\ngranary tasks --watch\ngranary workers --watch --interval 5\ngranary runs --watch --status running\n```\n\nSupported commands: `tasks`, `projects`, `workers`, `runs`, `sessions`, `initiatives`, `search`, `summary`.\n\n## Key Concepts\n\n| Concept       | Description                                                           |\n| ------------- | --------------------------------------------------------------------- |\n| **Workspace** | A directory (typically a repo) containing `.granary/`                 |\n| **Project**   | Long-lived initiative with tasks and steering references              |\n| **Task**      | Unit of work with status, priority, dependencies, and claiming        |\n| **Runner**    | A reusable command configuration (stored in `~/.granary/config.toml`) |\n| **Worker**    | A process that subscribes to events and spawns runners                |\n| **Session**   | Container for \"what's in context\" for an agent run                    |\n\n## Commands\n\n```\ngranary init              # Initialize workspace\ngranary plan              # Plan a feature interactively\ngranary initiate          # Plan a multi-project initiative\ngranary work \u003ctask-id\u003e    # Claim and work on a task\ngranary next              # Get next actionable task\ngranary start \u003cid\u003e        # Start working on a task\ngranary search            # Search projects and tasks\ngranary summary           # Generate work summary\ngranary context           # Export context pack for LLM\ngranary handoff           # Generate handoff for sub-agent\ngranary config runners    # Manage runner configurations\ngranary worker start      # Start an event-driven worker\ngranary workers           # List all workers\ngranary runs              # List all runner executions\ngranary checkpoint        # Create/restore checkpoints\n```\n\nUse `granary --help` or `granary \u003ccommand\u003e --help` for detailed usage.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fgranary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-api%2Fgranary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fgranary/lists"}