# Bashkit

A virtual Bash interpreter with an in-process virtual filesystem, a sandbox for running untrusted scripts from AI agents and users, with no containers or subprocesses.

[← Back to products](/products/)

**GitHub:** [github.com/everruns/bashkit](https://github.com/everruns/bashkit) · **Site:** [bashkit.sh](https://bashkit.sh) · **crates.io:** [bashkit](https://crates.io/crates/bashkit) · **npm:** [@everruns/bashkit](https://www.npmjs.com/package/@everruns/bashkit) · **License:** MIT

## What it is

Bashkit is a Bash interpreter that runs entirely in your process, against a virtual filesystem, built for multi-tenant environments. It is designed to execute scripts produced by AI agents, code you did not write and cannot fully trust, without giving that code access to the real host.

It is the main agent sandbox behind Everruns: most agents running on the platform use it to run shell commands safely.

## How it works

- **In-process execution**: No containers and no subprocess orchestration; the interpreter runs inside your application
- **Real Bash syntax**: Variables, pipelines, redirects, loops, and functions
- **Batteries included**: More than 150 built-in commands, including `grep`, `sed`, `awk`, `jq`, `curl`, and `find`
- **Persistent state**: Interpreter and filesystem state carry across calls, so a session builds up context
- **Virtual filesystem**: Scripts read and write an isolated filesystem rather than the host

## Where it runs

Bashkit is available across languages and platforms:

- A Rust crate on [crates.io](https://crates.io/crates/bashkit)
- [`@everruns/bashkit`](https://www.npmjs.com/package/@everruns/bashkit) on npm for JavaScript and Node.js
- Native Python bindings for fast, in-process execution
- Prebuilt for macOS (x86_64, aarch64), Linux (x86_64, aarch64), Windows (x86_64), and WASM

## Why it matters for agents

Giving an agent a shell is one of the most useful, and most dangerous, capabilities you can grant. Bashkit makes that capability safe to expose by keeping execution inside a virtual environment, so an agent can use familiar Unix tooling without reaching the host filesystem, network, or processes.

## Getting started

```bash
# Rust
cargo add bashkit

# JavaScript / Node.js
npm install @everruns/bashkit
```

## Related

- [Everruns Platform](/products/platform/), the agent platform that uses Bashkit as its sandbox
- [Headless Agent Platform](/use-cases/headless-agent-platform/), running agents as governed backend services