# sprouts

The command-line interface for the **Sprouts** platform — build, deploy, and
operate sprouts (sandboxed, event-driven trading automations for Solana
protocols).

## Install

```bash
cargo install sprouts
```

This installs the `sprouts` binary.

## Quickstart

```bash
sprouts login                 # sign in via the browser, save a session
sprouts init my-bot           # scaffold a new sprout
cd my-bot
sprouts deploy                # build to wasm + upload + register triggers
sprouts run --handler tick    # manually run a handler
sprouts logs                  # view executions
```

Sprouts are written in Rust with the
[`cotyledon`](https://crates.io/crates/cotyledon) framework; `sprouts init`
scaffolds a project that depends on it.

## Commands

| Command | Description |
|---|---|
| `login` / `logout` / `whoami` | Manage your saved session. |
| `init` | Scaffold a new sprout in the current directory. |
| `deploy` | Build the sprout to `wasm32-wasip1`, upload it, and register its triggers. |
| `run` | Manually run a handler. |
| `logs` | View executions for a deployed sprout. |
| `rollback` | Roll a sprout back to a previous deployment. |

Run `sprouts <command> --help` for details.

## Configuration

By default the CLI talks to the hosted Sprouts platform:

- API — `https://api.sprouts.run`
- Web — `https://sprouts.run`

Override either with an environment variable (handy for local development):

```bash
export SPROUTS_API_URL=http://localhost:4000
export SPROUTS_WEB_URL=http://localhost:3000
```

Your session and any saved URLs live in `~/.sprouts/config.json`.

## License

MIT OR Apache-2.0
