{"id":49027350,"url":"https://github.com/chitinhq/shellforge","last_synced_at":"2026-04-19T07:14:02.714Z","repository":{"id":347214393,"uuid":"1193223969","full_name":"chitinhq/shellforge","owner":"chitinhq","description":"🔥 Forge local AI agents. Governed. Private. Unstoppable. — Ollama + AgentGuard + OpenShell + DefenseClaw","archived":false,"fork":false,"pushed_at":"2026-04-13T03:46:44.000Z","size":4739,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T05:22:23.138Z","etag":null,"topics":["agentguard","agentic-ai","ai-agents","apple-silicon","defenseclaw","governance","local-llm","ollama","openshell","security"],"latest_commit_sha":null,"homepage":"https://agentguardhq.github.io/shellforge","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chitinhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.md","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-03-27T02:05:13.000Z","updated_at":"2026-04-13T03:46:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chitinhq/shellforge","commit_stats":null,"previous_names":["agentguardhq/shellforge","chitinhq/shellforge"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/chitinhq/shellforge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitinhq%2Fshellforge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitinhq%2Fshellforge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitinhq%2Fshellforge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitinhq%2Fshellforge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chitinhq","download_url":"https://codeload.github.com/chitinhq/shellforge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chitinhq%2Fshellforge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31997963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["agentguard","agentic-ai","ai-agents","apple-silicon","defenseclaw","governance","local-llm","ollama","openshell","security"],"created_at":"2026-04-19T07:14:02.627Z","updated_at":"2026-04-19T07:14:02.705Z","avatar_url":"https://github.com/chitinhq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ShellForge\n\n**Governed AI agent runtime -- single Go binary, local or cloud models.**\n\n[![Go](https://img.shields.io/badge/Go-1.18+-00ADD8?style=for-the-badge\u0026logo=go\u0026logoColor=white)](https://go.dev)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)\n[![Chitin](https://img.shields.io/badge/Governed_by-Chitin-green?style=for-the-badge)](https://github.com/chitinhq/chitin)\n\n\u003cimg src=\"https://github.com/user-attachments/assets/a94a8a5e-dfeb-4771-a6ab-465d3c2f01f0\" alt=\"ShellForge — Local Governed Agent Runtime\" width=\"700\"\u003e\n\n\u003c/div\u003e\n\n## Architecture\n\n```text\nEntry Points\n------------\n  shellforge chat -----+\n  shellforge agent ----+--\u003e [ Agent Loop ]\n  shellforge ralph ----+\n  shellforge run \u003cdriver\u003e --\u003e [ CLI Driver Subprocess ]\n  shellforge serve ---------\u003e [ Scheduler + Queue ] --\u003e [ Agent Loop ]\n\nAgent Loop\n----------\n  [ Agent Loop ]\n        |\n        v\n  [ Intent Parser ]  (any format: JSON, XML, bare)\n        |\n        v  Canonical Action\n  [ Normalizer ] ---+\n                    |\n  (alt: Native Tool-Use Path) ----+\n                                  v\n                    +---------------------------+\n                    |     Governance Layer      |\n                    |                           |\n                    |  [ governance.Engine ]    |\n                    |            |  evaluate    |\n                    |            v              |\n                    |      chitin.yaml          |\n                    |        /       \\          |\n                    |      deny     allow       |\n                    |       |         |         |\n                    |       v         v         |\n                    | [Correction] [ Tools ]    |\n                    +---------------------------+\n                            |         |\n          structured feedback|         |\n                            v         v\n                      [ Agent Loop ]   +--\u003e Tool Execution\n\nTool Execution\n--------------\n  8 Built-in Tools:\n    read_file  write_file  edit_file  run_shell\n    glob  grep  list_directory  search_files\n\nLLM Providers\n-------------\n  [ Agent Loop ] --\u003e Ollama (local)  OR  Anthropic API\n\nDrift Detector\n--------------\n  [ Agent Loop ] --\u003e [ Drift Detector ]\n                           |  (score below threshold)\n                           v\n                       Kill / Steer\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Go 1.18+ (for building from source)\n- [Ollama](https://ollama.com) for local model inference, or an Anthropic API key for cloud\n\n### Install\n\nFrom source:\n\n```bash\ngit clone https://github.com/chitinhq/shellforge.git\ncd shellforge\ngo build -o shellforge ./cmd/shellforge/\n```\n\nOr via Homebrew:\n\n```bash\nbrew tap chitinhq/tap\nbrew install shellforge\n```\n\n### Quick Start\n\n```bash\n# Pull a model and start Ollama\nollama pull qwen3:8b\nollama serve\n\n# Initialize governance in your project\ncd ~/your-project\nshellforge setup\n\n# Interactive pair-programming\nshellforge chat\n\n# One-shot agent task\nshellforge agent \"describe what this project does\"\n\n# Multi-task loop with validation\nshellforge ralph tasks.json --validate \"go test ./...\"\n```\n\n## CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `shellforge chat` | Interactive REPL with persistent conversation history |\n| `shellforge agent \"prompt\"` | One-shot governed agent execution |\n| `shellforge ralph tasks.json` | Stateless-iterative multi-task loop (pick, implement, validate, commit) |\n| `shellforge run \u003cdriver\u003e \"prompt\"` | Run a governed CLI driver (claude, copilot, codex, gemini, openclaw, nemoclaw) |\n| `shellforge serve agents.yaml` | Daemon mode -- memory-aware agent scheduling |\n| `shellforge setup` | Create governance config and verify stack |\n| `shellforge status` | Ecosystem health check |\n| `shellforge qa [dir]` | QA analysis with tool use |\n| `shellforge report [repo]` | Status report from git + logs |\n| `shellforge scan [dir]` | DefenseClaw supply chain scan |\n| `shellforge canon \"cmd\"` | Parse shell command into canonical JSON |\n\n### Provider Flags\n\n```bash\nshellforge chat --provider anthropic          # Cloud model via Anthropic API\nshellforge chat --model qwen3:14b             # Specific Ollama model\nshellforge agent --thinking-budget 8000 \"prompt\"  # Extended thinking (Sonnet/Opus)\n```\n\n## Governance\n\nEvery tool call passes through the governance engine before execution. Policies are defined in `chitin.yaml`:\n\n```yaml\nmode: enforce   # enforce | monitor\n\npolicies:\n  - name: no-force-push\n    action: deny\n    match:\n      command: \"git push\"\n      args_contain: [\"--force\"]\n\n  - name: no-destructive-rm\n    action: deny\n    match:\n      command: \"rm\"\n      args_contain: [\"-rf\"]\n```\n\nWhen a tool call is denied, the correction engine feeds structured feedback back to the model so it can self-correct rather than simply fail.\n\n## Key Internals\n\n| Package | Purpose |\n|---------|---------|\n| `internal/agent` | Core agent loop with tool calling, drift detection, context compaction |\n| `internal/governance` | Policy engine -- evaluates every action against `chitin.yaml` |\n| `internal/correction` | Escalating feedback for denied actions (retry budget + structured hints) |\n| `internal/intent` | Format-agnostic intent parser (JSON, XML, bare JSON, OpenAI function_call) |\n| `internal/normalizer` | Converts any tool call into a Canonical Action Representation |\n| `internal/llm` | Provider interface with Anthropic (prompt caching, native tool-use) and Ollama backends |\n| `internal/tools` | 8 governed tools: read, write, edit, glob, grep, shell, list, search |\n| `internal/ralph` | Stateless-iterative task loop with validation and auto-commit |\n| `internal/repl` | Interactive REPL with color output, shell escapes, signal handling |\n| `internal/scheduler` | Memory-aware agent queue for daemon mode |\n| `internal/orchestrator` | Sub-agent orchestration with context compression |\n\n## Development\n\n```bash\ngo build ./cmd/shellforge/\ngo test ./...\ngolangci-lint run\n```\n\n## Part of the Chitin Platform\n\nShellForge is the local governed agent runtime. Other repos:\n\n| Repo | Role | Start here if you want to… |\n|------|------|------------------------------|\n| [chitin](https://github.com/chitinhq/chitin) | Governance kernel — policy, invariants, hooks | Gate an agent you already use |\n| **shellforge** (this repo) | Local governed agent runtime | Run a governed agent end-to-end |\n| [octi](https://github.com/chitinhq/octi) | Swarm coordinator — triage, dispatch, routing | Orchestrate multiple agents |\n| [sentinel](https://github.com/chitinhq/sentinel) | Telemetry + detection on agent traces | Analyze how agents fail |\n| [llmint](https://github.com/chitinhq/llmint) | Token-economics middleware for LLM providers | Control LLM cost in Go apps |\n| [atlas](https://github.com/chitinhq/atlas) | Workspace starter kit — knowledge graphs + LLM-compiled wikis | Wrap your repos in AI-powered knowledge tooling |\n\nNew to the platform? See [chitin's GETTING_STARTED.md](https://github.com/chitinhq/chitin/blob/main/GETTING_STARTED.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchitinhq%2Fshellforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchitinhq%2Fshellforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchitinhq%2Fshellforge/lists"}