> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stoffelmpc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Create a Stoffel project, build bytecode, and run the generated program through local MPC.

This guide gets you to a working Stoffel project. You will create the default Rust-backed project, check the StoffelLang source, build bytecode, run local MPC, and run the generated Rust wrapper.

## Copy-paste path

Use this when you want the fastest default project check:

```bash theme={null}
curl -fsSL https://get.stoffelmpc.com | sh
export PATH="$HOME/.local/bin:$PATH"
stoffel --version
stoffel init hello-mpc
cd hello-mpc
stoffel status --verbose
stoffel check
stoffel build
stoffel run --timeout-secs 180
cargo build
cargo run
```

Success means the CLI creates the project, `stoffel check` validates `src/main.stfl`, `stoffel build` writes `.stflb` bytecode under `target/`, the local MPC run completes, and the Rust wrapper builds and runs.

## Create a project

After installing the `stoffel` CLI, create and enter a new project:

```bash theme={null}
stoffel init hello-mpc
cd hello-mpc
```

The default template creates:

```text theme={null}
hello-mpc/
├── Cargo.toml
├── README.md
├── Stoffel.toml
└── src/
    ├── main.rs
    ├── main.stfl
    └── stoffel_bindings.rs
```

Start with these files:

* `src/main.stfl`: the StoffelLang program.
* `Stoffel.toml`: package, build, and local MPC settings.
* `src/main.rs`: a Rust wrapper that calls the same Stoffel program.
* `src/stoffel_bindings.rs`: generated program metadata used by the Rust wrapper.

## Check and build

Validate the Stoffel source and project configuration:

```bash theme={null}
stoffel check
```

Expected output includes the checked source path and discovered functions:

```text theme={null}
Checked .../hello-mpc/src/main.stfl (...)
```

Build bytecode under `target/`:

```bash theme={null}
stoffel build
```

Expected output includes the generated `.stflb` file:

```text theme={null}
Built .../hello-mpc/target/debug/hello-mpc.stflb
Bytecode size: ... bytes
Optimization: O2 (enabled)
Profile: debug
```

## Run local MPC

Run the generated program through local MPC:

```bash theme={null}
stoffel run
```

Local MPC testing runs the compiled program by spawning several MPC nodes/processes locally on your machine. The default project uses five parties with threshold one unless you override those settings in `Stoffel.toml` or with command-line flags.

For one-shot development runs, use:

```bash theme={null}
stoffel dev --once
```

`stoffel dev` checks the project, builds it, runs local MPC, and can watch the project when you omit `--once`.

## Run from Rust

The generated `src/main.rs` calls the same `src/main.stfl` program from Rust application code.

Build and run the wrapper:

```bash theme={null}
cargo build
cargo run
```

Use the Rust wrapper when you are ready to call Stoffel from an application rather than only from the CLI.

## Make one change

Open `src/main.stfl`, make a small change, then rerun the fast loop:

```bash theme={null}
stoffel check
stoffel build
stoffel run
```

If the generated program asks for inputs, check the generated `README.md` and `src/main.stfl`:

* use `--input NAME=VALUE` for ordinary named function inputs;
* use `--client-input SLOT=VALUE` for programs that call `ClientStore.take_share`.

## You now have

* a Stoffel project created with `stoffel init`;
* checked StoffelLang source;
* compiled `.stflb` bytecode under `target/`;
* a local MPC development run;
* a Rust wrapper that calls the same program.

## Use with AI coding agents

Delegating this quickstart to an AI coding agent? Complete the [agent setup in Installation](./installation#install-stoffel-with-an-ai-coding-agent) first so the agent has Stoffel skills and live docs access before it edits code.

Require the agent to return real command output from:

* `stoffel --version`
* `stoffel check`
* `stoffel build`
* `stoffel run` or `stoffel dev --once`
* `cargo build` or `cargo run`

Do not accept a code-only summary for a runnable app task. If a command fails, the agent should report the exact error and fix the root cause instead of inventing expected output.

## Next steps

Choose the next step based on what you want to do:

* To understand the core CLI commands in more detail, read [Basic Usage](./basic-usage).
* To build the smallest app-shaped Rust integration, run the [Rust SDK quickstart](../tutorials/rust-sdk-quickstart), then read [Rust SDK App Integration](../rust-sdk/app-integration) for the reusable pattern.
* To build the first substantial tutorial app after the SDK quickstart, start [Private Matchmaking](../tutorials/private-matchmaking).
