CLI reference
caravel is one CLI for every template. Each command finds lane.toml in the current directory (or -f) and uses its default deployment (or --env). Every command takes --json, which prints JSON on stdout for scripts while progress goes to stderr.
These pages are generated from caravel help, so they match the binary they were built from.
Deploy and change a lane
| Command | What it does |
|---|---|
caravel plan | Show what apply would change on Stellar and on the host. Changes nothing |
caravel apply | Make Stellar and the host match the deployment. Shows the plan and asks first, unless --yes. Running it again changes nothing. Given a saved plan (caravel plan --out FILE), applies exactly that plan |
caravel status | A deployment's health: height, the last accepted checkpoint, when a freeze would be possible, the relayer's XLM, TTL horizons, and whether it matches the lane file |
caravel destroy | Wind a lane down for good: drain, stop the sequencer and relayer, export every exit with its proof to exit.json, then freeze once the contract allows it. A frozen lane can't be restarted |
caravel graph | The deployment's resources and what each depends on, as Graphviz DOT (caravel graph | dot -Tsvg > lane.svg), or as JSON. Dashed edges restart their target when their source changes |
Check a lane file
| Command | What it does |
|---|---|
caravel validate | Check the lane file without Stellar or a host: each deployment's rules, the genesis, and the identities it names |
caravel render | The deployment as plan reads it: includes, inheritance, vars and expressions resolved. With --genesis, the genesis document the template hashes and the hosts get as lane.toml |
caravel env | The lane file's deployments |
caravel output | A deployment's addresses and URLs, from the lane file and its keys; one of them with NAME |
caravel doctor | Check that this machine can run the deployment: the Stellar CLI, Node.js, the template, the release and the identities |
caravel version | This CLI, the templates it finds and the Stellar CLI it needs |
Run the nodes
| Command | What it does |
|---|---|
caravel start | Start nodes that aren't running (all when none is named). Refuses if the deployment differs from the lane file in anything else: that's apply's |
caravel stop | Stop nodes (all of them when none is named) and leave the lane as it is: no checkpoint is posted while the sequencer is down, and after the contract's escape timeout anyone may freeze the lane |
caravel restart | Stop and start nodes (all when none is named) |
caravel logs | A node's log: the last lines, then with --follow what it writes |
caravel wait | Wait until something holds (exit 4 if the time runs out) |
caravel api | GET a path of the lane's API (or a validator's) and print the JSON |
caravel replay | Replay the lane from Stellar alone (spec §16), with the deployment's contract, network and engine; optionally an account's proofs |
Use a lane
| Command | What it does |
|---|---|
caravel account | A user's Stellar account for the lane: an identity on the network with a trustline to the settlement token, and some of it |
caravel balance | An account's settlement token on Stellar, and its lane account (a C… contract's on Stellar only) |
caravel deposit | Deposit into the lane; returns once the lane has credited it |
caravel tx | Sign a lane transaction with SEP-53 through the Stellar CLI keystore and send it; waits until a block takes it and prints its result |
caravel withdraw | Withdraw from the lane: the transaction, then its leaf in an accepted checkpoint, then the claim on Stellar |
caravel claim | Claim every unclaimed withdrawal of an account on Stellar |
caravel force-withdraw | Ask the settlement contract for a withdrawal the lane must include (when it won't take one), then claim it |
caravel escape | After a freeze: claim an account's withdrawals and its share of the lane's last checkpoint |
Start a lane
| Command | What it does |
|---|---|
caravel init | Start a lane: write DIR/lane.toml from a template's example, and create the Stellar CLI identities it names (<name>-<role>) |
caravel keys | The Stellar CLI identities a deployment names |