Mount host directories into a sandboxed bashkit session. Demonstrates
--mount-ro (readonly) and --mount-rw (read-write) CLI flags.
cargo build -p bashkit-cli --features realfs
bash examples/realfs_mount.shRun the wedow/ticket issue tracker inside bashkit. Exercises plugin discovery via PATH, awk-heavy scripts, YAML frontmatter parsing, dependency trees, and filtered listing, all interpreted.
cargo build -p bashkit-cli --features realfs
bash examples/ticket-cli.shticket-cli.sh checks out a pinned wedow/ticket commit by default for
reproducibility/supply-chain safety. Override with TICKET_REF=<commit>.
Python examples use PEP 723 inline script metadata.
uv run resolves dependencies automatically, bashkit installs from PyPI as a pre-built wheel (no Rust toolchain needed).
Core features, live output callbacks, and ScriptedTool orchestration:
uv run crates/bashkit-python/examples/bash_basics.py
uv run crates/bashkit-python/examples/k8s_orchestrator.pyLangChain agent with Bashkit sandbox.
export ANTHROPIC_API_KEY=your_key
uv run examples/treasure_hunt_agent.pyDeep Agents with Bashkit middleware + backend.
export ANTHROPIC_API_KEY=your_key
uv run examples/deepagent_coding_agent.pyMinimal LangChain/LangGraph console agent for Bashkit docs Q&A. It exposes
Bashkit's built-in bash tool to the model, which writes compact rg, grep,
and sed search scripts against real docs and a curated examples view mounted
read-only under /docs. The whole session filesystem is read-only, so
copy/write attempts into /tmp fail too.
cd examples/docs-grep-agent
export OPENAI_API_KEY=sk-...
uv run docs-grep-agent "what is bashkit"
uv run docs-grep-agent --show-tools "give me example on how to use bashkit cli"JS examples install @everruns/bashkit from npm. All dependencies are in
examples/package.json:
cd examples && pnpm installCore features: execution, pipelines, variables, loops, jq, error handling, reset.
node examples/bash_basics.mjsReal-world data tasks: CSV processing, JSON transformation, log analysis, report generation.
node examples/data_pipeline.mjsWire BashTool into any AI framework: tool definition, simulated tool-call loop, generic adapter.
node examples/llm_tool.mjsRegister JS callbacks as persistent bash builtins via customBuiltins and
addBuiltin(). Covers sync + async callbacks, VFS persistence across
execute() calls, post-construction registration without rebuilding the
interpreter, override precedence (shell function > custom builtin >
baked-in builtin), error handling, and BashTool integration.
node examples/custom_builtins.mjsOpenAI function calling with manual tool-call loop.
export OPENAI_API_KEY=sk-...
node examples/openai_tool.mjsVercel AI SDK tool() + generateText() with automatic tool-call loop.
export OPENAI_API_KEY=sk-...
node examples/vercel_ai_tool.mjsLangChain.js ReAct agent with DynamicStructuredTool.
export OPENAI_API_KEY=sk-...
node examples/langchain_agent.mjsBashkit running in the browser via WebAssembly. A minimal terminal UI that lets you type bash commands and see output, all executed client-side in a sandboxed WASM interpreter.
Requires Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy
headers for SharedArrayBuffer support (Vite config handles this).
cd examples/browser
pnpm install
pnpm run dev