sprout

command module
v0.16.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 1 Imported by: 0

README

Sprout

AI-powered code editing and assistance tool. Leverages LLMs to understand your workspace, generate code, and orchestrate complex development tasks.

Disclaimer: Using sprout involves interactions with LLMs and external services which may incur costs. Currently there are limited safety checks — use at your own risk, ideally in a container.

Features

  • Coding Agent with smart workspace context, self-correction, and multi-step orchestration
  • 12 specialized personas (coder, debugger, reviewer, researcher, executive assistant, project planner, etc.)
  • Web UI with chat, code editor, terminal, file browser, Git UI, and more
  • Multi-provider LLM support — OpenAI, DeepInfra, OpenRouter, Z.AI, Ollama, DeepSeek, Mistral, Minimax, LMStudio, Cerebras, Chutes, plus community-contributed providers via the remote registry (see Provider Registry) and local custom providers (sprout custom add)
  • MCP Server Integration for external tools (GitHub repos, issues, PRs)
  • Persistent Memory across conversations
  • Built-in tool suite — file operations, web search, vision analysis, shell execution, PDF analysis, headless browser
  • Background subagents for parallel task execution
  • Workflow Automations: Define and run autonomous agent workflows from automate/ directory configs. Monitor with sprout automate status/stop/logs or the WebUI Automations panel.
  • Addressing — SSH remote workspace with local Web UI access via tunneling
  • Dataset tracing for training data generation
  • Provider catalog with model lists, costs, and recommendations

Component Library

The Sprout UI component library (@sprout/ui) is available as a standalone npm package, providing reusable IDE-style React components — code editor, terminal, chat panel, file tree, and more — for building IDE-like applications.

npm install @sprout/ui

See the Consumption Guide for full documentation.

Installation

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh

Windows (PowerShell 5.1+ — the default on Windows 10/11, or PowerShell 7):

irm https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.ps1 | iex

Termux (Android, arm64):

The same Linux installer detects Termux, installs into $PREFIX/bin, skips the systemd/launchd service step, and surfaces a clear error if the binary's libc requirements don't match Bionic:

pkg install curl tar
curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh

The release pipeline cross-compiles sprout-linux-arm64 with CGO disabled, so the resulting static binary runs on Termux's Bionic libc unmodified. If the post-install verification fails the installer prints a build-from-source recipe specific to Termux (pkg install golang nodejs make git + make deploy-ui && go install .).

macOS via Homebrew (once the tap is published):

brew tap sprout-foundry/sprout
brew install sprout

Or install directly from the release URL without adding the tap:

brew install --formula https://github.com/sprout-foundry/sprout/releases/latest/download/sprout.rb

The formula source lives at Formula/sprout.rb; scripts/update-homebrew-formula.sh stamps it with each release's version and SHA256s and release.yml uploads the result as an asset.

Install Options
# Specific version
SPROUT_VERSION=v0.14.0 curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh

# Custom directory
SPROUT_INSTALL_DIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh

# Without piping (Linux / macOS)
curl -fsSL -o install.sh https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh
sh install.sh
Upgrading

Once sprout is installed, you can upgrade from the binary itself — no need to re-pipe curl into a shell:

sprout upgrade                     # confirm, then download + verify + replace
sprout upgrade --check             # just print whether an upgrade is available
sprout upgrade -y                  # skip the prompt (useful in CI)
sprout upgrade --version v0.14.0   # pin a specific tag
sprout upgrade --pre-release       # include pre-release tags as "latest"
sprout upgrade --rollback          # restore the previous binary saved by the last upgrade

The same SHA256 verification used by install.sh runs inside the command; bypass with SPROUT_SKIP_CHECKSUM=1 only when you have a specific reason.

On Windows the running .exe is renamed to sprout.exe.old in place (Windows can't replace a loaded executable) and the new binary is written to the original path — restart any running sprout process to pick up the new build.

Uninstall

By default this removes the binary, the service files, and the config / session state under ~/.config/sprout/ and ~/.sprout/. Pass --keep-config (or -KeepConfig on Windows) to preserve them.

curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh -s -- --uninstall
# Keep your settings + session history:
curl -fsSL https://raw.githubusercontent.com/sprout-foundry/sprout/main/scripts/install.sh | sh -s -- --uninstall --keep-config
Verifying the download

Every release ships a SHA256SUMS manifest and an SLSA build-provenance attestation. The install scripts verify the checksum automatically; the provenance attestation can be checked manually with the GitHub CLI:

# Integrity (already automated by install.sh — this is for manual re-check):
curl -fsSL https://github.com/sprout-foundry/sprout/releases/latest/download/SHA256SUMS \
  | sha256sum -c --ignore-missing

# Provenance — proves the binary came from the official release workflow:
gh release download <tag> --pattern 'sprout-*' --repo sprout-foundry/sprout
gh attestation verify sprout-linux-amd64.tar.gz --repo sprout-foundry/sprout

Set SPROUT_SKIP_CHECKSUM=1 (or $env:SPROUT_SKIP_CHECKSUM='1' on Windows) only if you have a specific reason to bypass verification — e.g. a release that pre-dates the manifest.

From Source

Requires Go 1.25.0+ and Node.js 22+:

git clone https://github.com/sprout-foundry/sprout.git
cd sprout
make deploy-ui   # Build and embed the React web UI (requires Node.js)
make prepare-grammars
go install .

Note: go install github.com/sprout-foundry/sprout@latest does not currently work for installing via the Go module proxy, because the React web UI assets are built during CI release and committed to the release tag. Clone the repository and use make deploy-ui to build the UI assets locally.

Getting Started

# Start interactive agent mode (Web UI opens at http://localhost:56000)
sprout

# Run a specific task
sprout agent "Create a python script that prints 'Hello, World!'"
sprout agent --skip-prompt "Implement user authentication"
sprout agent --persona coder "Add JWT auth to API"

# Generate a commit message
sprout commit

# Generate shell scripts
sprout shell "backup all .go files to a timestamped archive"

# View change history
sprout log

Permissions & Risk Profiles

Before sprout runs a shell command it consults a risk cascade that decides whether to run, prompt, or block. The cascade is driven by a named profile — five ship out of the box, you can override any of them in config:

Profile Effect Use when
readonly Only reads (git status/log/diff, read_file). Everything else is blocked outright (no prompt). Audits, code review, untrusted agents.
cautious Reads auto-approve. Everything else prompts you. Sensitive workspaces.
default Reads + common edits auto-approve. Destructive ops (force flags, rm -rf, lossy git) prompt. Daily driver. ← the default
permissive Almost everything auto-approves; only force-flagged or recursive-destructive patterns prompt. High-trust agents in recoverable workspaces.
unrestricted Nothing prompts. Only catastrophic patterns (rm-rf-root, fork bombs) block. Sandboxed runs.
# Pick a profile for one session
sprout agent --risk-profile=cautious "review this PR"
sprout agent --risk-profile=permissive "rebuild the integration tests"

# Or set a persistent default in ~/.config/sprout/config.json
{ "risk_profile": "default" }

# Or override profile rules entirely — see docs/SECURITY.md#risk-profiles
{
  "risk_profile": "default",
  "risk_profiles": {
    "default": { "low_risk": [...], "high_risk_never": [...], "default_risk": "medium" }
  }
}

When the active persona spawns subagents (e.g. EA delegating to coder), the subagent's high-risk prompts auto-approve under the root's authority — you set the policy once and orchestration runs without prompts piling up. Catastrophic patterns (rm -rf /, fork bombs) stay blocked at every depth regardless of profile. Full reference: docs/SECURITY.md#risk-profiles.

Documentation

Document Description
Component Library @sprout/ui npm package usage and architecture
CLI Reference All commands, flags, slash commands, personas, tools
Configuration Config files, environment variables, Zsh detection, CI/CD
Architecture Package layout, data flow, workspace files
MCP Integration MCP server setup, configuration, troubleshooting
Agent Workflow Config-driven workflow sequences
Provider Catalog Provider catalog system and model metadata
Provider Registry Remote provider registry, community provider PRs, schema
Personas Persona system, risk model, and custom persona guide
Testing Test strategy, categories, and commands

Contributing

See CONTRIBUTING.md for guidelines. Run go test ./... before PRs.

License

MIT License.

Support

Report issues at github.com/sprout-foundry/sprout/issues.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
Agent command for sprout
Agent command for sprout
enrich_registry command
Command enrich_registry annotates freshly-generated canonical model files with capability-probe results.
Command enrich_registry annotates freshly-generated canonical model files with capability-probe results.
model_probe command
Command model_probe runs the capability probe against a single provider/model and prints the result as JSON.
Command model_probe runs the capability probe against a single provider/model and prints the result as JSON.
model_registry_server command
Command model_registry_server runs a lightweight static file server for serving per-provider model JSON files.
Command model_registry_server runs a lightweight static file server for serving per-provider model JSON files.
validate_registry command
Command validate_registry checks every providers/*.json against the runtime schema before the publish workflow uploads to GitHub Pages.
Command validate_registry checks every providers/*.json against the runtime schema before the publish workflow uploads to GitHub Pages.
wasm command
pkg
agent
Shell-mutation tracking for ChangeTracker.
Shell-mutation tracking for ChangeTracker.
agent_api
Package api provides API types used across all providers.
Package api provides API types used across all providers.
agent_tools
Package tools provides the interface-based tool system for the Sprout AI agent.
Package tools provides the interface-based tool system for the Sprout AI agent.
ast
Package ast (continued) — body extraction.
Package ast (continued) — body extraction.
automate
Package automate provides shared workflow discovery and validation for the automate/ feature used by both the CLI (cmd/automate.go) and the agent tool layer (pkg/agent/tool_handlers_automate.go).
Package automate provides shared workflow discovery and validation for the automate/ feature used by both the CLI (cmd/automate.go) and the agent tool layer (pkg/agent/tool_handlers_automate.go).
clihooks
Package clihooks holds tiny callback hooks that wire higher-level CLI behavior (e.g.
Package clihooks holds tiny callback hooks that wire higher-level CLI behavior (e.g.
configuration
Package configuration provides high-level configuration and credential resolution for providers, including support for custom providers and stored credentials.
Package configuration provides high-level configuration and credential resolution for providers, including support for custom providers and stored credentials.
console
Mouse tracking and context menu support for sprout IDE
Mouse tracking and context menu support for sprout IDE
credentials
Package credentials provides unified credential resolution for all providers.
Package credentials provides unified credential resolution for all providers.
embedding
Package embedding provides ONNX-based embedding infrastructure for sprout.
Package embedding provides ONNX-based embedding infrastructure for sprout.
envutil
Package envutil provides environment variable helpers with SPROUT_*/LEDIT_* prefix support.
Package envutil provides environment variable helpers with SPROUT_*/LEDIT_* prefix support.
errors
Package errors provides agent-specific error types and classification for intelligent retry/recovery logic.
Package errors provides agent-specific error types and classification for intelligent retry/recovery logic.
events
Package events provides event system for sprout UI architecture
Package events provides event system for sprout UI architecture
git
history
Quantity-based tiered compaction for the persistent revision store.
Quantity-based tiered compaction for the persistent revision store.
llmproxy
Package llmproxy provides an http.RoundTripper that rewrites direct calls to well-known LLM provider endpoints (api.openai.com, api.anthropic.com, etc.) so they instead route through the sprout-foundry platform's /api/proxy/llm/{provider}/* path.
Package llmproxy provides an http.RoundTripper that rewrites direct calls to well-known LLM provider endpoints (api.openai.com, api.anthropic.com, etc.) so they instead route through the sprout-foundry platform's /api/proxy/llm/{provider}/* path.
lsp/proxy
Package proxy provides an LSP (Language Server Protocol) proxy manager that manages language server processes for workspace-aware code intelligence.
Package proxy provides an LSP (Language Server Protocol) proxy manager that manages language server processes for workspace-aware code intelligence.
mcp
Package mcp provides secret management for MCP server environment variables.
Package mcp provides secret management for MCP server environment variables.
modelcontract
Package modelcontract defines the canonical, provider-agnostic model schema and the adapter interface that normalizes each provider's native model API into it.
Package modelcontract defines the canonical, provider-agnostic model schema and the adapter interface that normalizes each provider's native model API into it.
modelprobe
Package modelprobe runs a bounded capability probe against a model to check, cheaply and objectively, whether it's usable for agentic coding — and whether it's strong enough for complex work.
Package modelprobe runs a bounded capability probe against a model to check, cheaply and objectively, whether it's usable for agentic coding — and whether it's strong enough for complex work.
modelregistry
Package modelregistry provides a client for fetching per-provider model lists from a static JSON model registry server with in-memory caching.
Package modelregistry provides a client for fetching per-provider model lists from a static JSON model registry server with in-memory caching.
noninteractive
Package noninteractive provides utilities for detecting and handling provider-not-configured errors in non-interactive environments (daemons, CI, piped stdin).
Package noninteractive provides utilities for detecting and handling provider-not-configured errors in non-interactive environments (daemons, CI, piped stdin).
providercatalog
Package providercatalog is the curated UX layer for provider onboarding — friendly descriptions, signup URLs, API-key help text, recommended-model justifications.
Package providercatalog is the curated UX layer for provider onboarding — friendly descriptions, signup URLs, API-key help text, recommended-model justifications.
providerregistry
Package providerregistry provides a client for fetching provider connection configs from a remote JSON registry server with in-memory caching.
Package providerregistry provides a client for fetching provider connection configs from a remote JSON registry server with in-memory caching.
redact
Package redact provides byte-oriented secret redaction for log files and other persisted artifacts.
Package redact provides byte-oriented secret redaction for log files and other persisted artifacts.
secretdetect
Package secretdetect provides secret detection backed by the gitleaks detection engine.
Package secretdetect provides secret detection backed by the gitleaks detection engine.
skills
Package skills owns the catalogue of skills shipped with sprout.
Package skills owns the catalogue of skills shipped with sprout.
training
Package training provides utilities for exporting session data into training-ready formats (ShareGPT, OpenAI fine-tuning JSONL, Alpaca).
Package training provides utilities for exporting session data into training-ready formats (ShareGPT, OpenAI fine-tuning JSONL, Alpaca).
ui
utils
Package utils provides error handling utilities and conventions for the codebase.
Package utils provides error handling utilities and conventions for the codebase.
validation
Package validation provides syntax validation using gofmt/goimports
Package validation provides syntax validation using gofmt/goimports
webui
Package webui provides React web server with embedded assets
Package webui provides React web server with embedded assets
zsh
gomlx module
tensor module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL