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

# Build with Lasso

> Lasso is a coding agent in your terminal that comes with the CLI and already knows how to build, test and deploy actors

Lasso is a coding agent that runs in your terminal. It comes with the `cowboy` CLI, so once you've [installed the CLI](https://docs.cowboy.inc/getting-started/install.md) you already have it. It also knows Cowboy from the start: in a Cowboy project, it loads a skill for building, testing and deploying actors. You describe the actor you want, and it writes the code and tests it on your machine.

You start it with `lasso`. `cowboy console` is another name for the same agent.

## 1. Connect a model

Lasso runs on your machine, but the thinking is done by an AI model hosted elsewhere, so it needs a key to reach one. It connects through [OpenRouter](https://openrouter.ai), a service that gives you one key for many models. You pay OpenRouter for what you use, separately from your Cowboy wallet. Paying for models from your wallet is coming soon.

Create a key on OpenRouter, then give it to Lasso by setting `LASSO_API_KEY`. This command waits for you to paste the key and press Enter. Nothing shows as you paste, and the key stays out of your shell history:

```bash theme={"system"}
read -rs LASSO_API_KEY && export LASSO_API_KEY
```

That lasts until you close the terminal. To have it in every terminal, set `LASSO_API_KEY` in your shell's startup file.

## 2. Start it in a project

Create a project, and check that Lasso is set up. This doesn't call a model, so it costs nothing:

```bash theme={"system"}
cowboy init hello --dir hello --env cloud
cd hello
lasso -p /status --trust
```

```text Output theme={"system"}
Initializing Cowboy project at '/path/to/hello':
Environment: cloud
…
Yeehaw! Project ready: /path/to/hello
Model:     deepseek/deepseek-v4.1-flash
Workspace: /path/to/hello
Messages:  0
Context:   nothing sent yet
…
Skills:    1
```

`--trust` tells Lasso it may read this folder, and remembers that. `Skills` counts what Lasso can use, including the Cowboy skill, and `/skills` lists them. `Model` is OpenRouter's name for the model in use. If it says `(no channel)`, Lasso didn't find your key. This check doesn't test the key itself: a wrong one shows up as an authentication error on your first prompt. To choose another, start with `lasso --model <id>`, using any id from OpenRouter's list.

Now run `lasso` to start a session, and say what you want:

```text theme={"system"}
Write an actor that keeps a list of notes. Anyone can add a note,
and only I can clear them. Add tests and run them.
```

## 3. Stay in control

Lasso reads and edits files in the project folder. On macOS its commands run in a sandbox with no network, and on Linux it asks before each one. It asks before anything that needs the network, such as a deploy, so you see what's about to happen first. A deploy pays from your Cowboy wallet, so [create and fund one](https://docs.cowboy.inc/getting-started/quickstart.md#3-deploy-it-to-cloud) before you ask for it.

Your conversation, including file contents and command output, goes to the model provider, so keep private data out of the project.

These are the commands you'll use most inside a session:

| Command | What it does |
| - | - |
| `/diff` | Shows what changed since the last commit, in a Git repository |
| `/undo` | Takes back the last turn and restores the files it changed |
| `/model` | Shows or switches the model |
| `/skills` | Lists the skills Lasso can use |
| `/new` | Starts a fresh session |
| `/help` | Lists every command |

From your shell, `lasso -c` continues the latest session in the folder, and `lasso -p "<prompt>"` runs one prompt without opening a session.

## Next

* [Quickstart](https://docs.cowboy.inc/getting-started/quickstart.md)
* [Build your first actor](https://docs.cowboy.inc/developers/your-first-actor.md)
* [Deploy and operate](https://docs.cowboy.inc/build/deploy.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.