runnables 0.1.0

What a folder can run: apps, tests, watchers, simulators, databases and deploys, found from its files. A library, a CLI, and an MCP server for coding agents.
Documentation
# runnables

What a folder can run, found from the files it already has: its apps, tests, watchers, simulators,
databases and Docker Compose services, each with the exact shell command and one picked to run by
default. A Rust library, a CLI, and an MCP server that tells coding agents how to run your project.

[![crates.io](https://img.shields.io/crates/v/runnables.svg)](https://crates.io/crates/runnables)
[![docs.rs](https://docs.rs/runnables/badge.svg)](https://docs.rs/runnables)
[![MIT](https://img.shields.io/crates/l/runnables.svg)](LICENSE)

It is the scan behind the Run bar of [Edit](https://rustedit.dev), the agentic code editor, where it
also feeds the iPhone and Android apps and the VS Code extension.

```console
$ cargo install runnables
$ runnables ~/code/shop
shop-api (Rust)
  * Run            (cd /Users/me/code/shop/api && cargo run)
    Run Release    (cd /Users/me/code/shop/api && cargo run --release)
shop-web (Node · pnpm)
    dev            (cd web && pnpm dev)
    build          (cd web && pnpm build)
    test           (cd web && pnpm test)
Docker Compose (compose.yaml)
    Up             docker compose up
    Down           docker compose down
shop-api (Cargo)
    Test           (cd /Users/me/code/shop/api && cargo test)
    Clippy         (cd /Users/me/code/shop/api && cargo clippy --all-targets)
    Build Release  (cd /Users/me/code/shop/api && cargo build --release)
```

`*` marks the default. Nothing is run: `runnables` only reads files and returns commands.

## What it finds

| Kind | From | Commands |
|---|---|---|
| .NET | `.csproj`, `.sln`, `.slnx` | Aspire AppHost, web, worker, desktop and console apps (watch, run, release), MAUI, tests |
| Databases | EF Core `DbContext`s in .NET projects | update, add, remove and list migrations, per context and all at once |
| Node, Deno, Bun | `package.json`, `deno.json`, the lock file | the scripts, with the package manager the lock file names |
| Rust | `Cargo.toml` (workspaces, several binaries) | run, release, test, clippy, build |
| Go | `go.mod` | run each main package, test |
| iOS | `.xcodeproj`, `.xcworkspace`, XcodeGen `project.yml` | simulator, device, archive, tests (macOS only) |
| Android | Gradle (`build.gradle`, `.kts`) | emulator, device, release build, tests |
| Docker Compose | `compose.yaml`, `docker-compose.yml` | up, down |
| Deploys | shell scripts in `.deploy/` | what each one does, read from its commands ([`deploy`](https://docs.rs/runnables/latest/runnables/deploy/)) |

It looks four folders deep and skips `node_modules`, `target`, `bin`, `obj` and the like.

## For coding agents (MCP)

`runnables mcp` is a stdio MCP server with one tool, `list_runnables { folder }`. An agent asks it
how to start, test or migrate a project instead of guessing from the README.

Claude Code:

```sh
claude mcp add runnables -- runnables mcp
```

Cursor, VS Code, Zed and others (`mcp.json`):

```json
{
  "mcpServers": {
    "runnables": { "command": "runnables", "args": ["mcp"] }
  }
}
```

## As a library

```rust
let report = runnables::report(std::path::Path::new("."));
for group in &report.groups {
    for task in &group.tasks {
        println!("{} · {}: {}", group.title, task.label, task.command);
    }
}
```

`runnables::detect` returns the groups; `runnables::report` adds the default; every type is
`Serialize`, and `runnables detect <folder>` prints the same JSON.

## License

MIT. Made by [Pavel Sich](https://github.com/sichy) for [Edit](https://rustedit.dev).