The five commands to remember are inspect, build, check, plan, and dev. Environment commands describe what a target can provide. The sections below cover installation, the complete current CLI surface, and machine-readable outputs intended for automation.
Install the released Presolve CLI.
macOS or Linux
curl -fsSL https://presolve.dev/install.sh | sh
presolve --versionThe installer selects the native archive for your operating system and CPU architecture, verifies its SHA-256 checksum, installs it under ~/.presolve/bin, and adds that directory to your shell PATH when necessary.
Windows PowerShell
irm https://presolve.dev/install.ps1 | iex
presolve --versionThe Windows installer downloads the x86_64 native archive, verifies its checksum, installs presolve.exe under your user profile, and updates your user PATH.
Build from source
Use a source build when contributing to Presolve itself or when you intentionally need an unreleased commit:
git clone https://github.com/fierstdev/presolve.git
cd presolve
cargo build -p presolve-cli
./target/debug/presolve --versionThis is a contributor/development path, not the normal installation path.
Describe what is available here.
presolve env init
presolve env provider add memory-services --provides kv,objects
presolve env show
presolve env checkThe environment tooling generates and persists stable environment/provider identities so normal local development does not require hand-managing opaque IDs. env show explains the discovered environment; env check validates the environment declaration itself.
--provides shorthand currently covers kv and objects. Advanced/current contracts such as SQL and queues can be declared with exact --capability INTERFACE@VERSION arguments or authored directly in presolve.env.toml.Five commands, five different jobs.
presolve inspect — What does the app require?Shows the normalized source application definition without requiring an environment.
presolve inspect
presolve inspect --jsonpresolve build — What exact release are we distributing?Builds and packages a detached .presolved release whose identity does not include an environment.
presolve build
presolve inspect dist/orders.presolvedpresolve check — Can this environment satisfy the app?Runs compatibility checks and reports structured problems when mandatory requirements cannot be satisfied.
presolve check
presolve check dist/orders.presolved --jsonpresolve plan — What exactly did Presolve select?Shows the environment, workloads, provider identities, exact versions, negotiated features, and optional unbound requirements selected for this application.
presolve plan
presolve plan dist/orders.presolved --jsonpresolve dev — Can I run the resolved application locally?Checks compatibility, constructs the plan, realizes supported local providers, assembles the runtime, and invokes the application.
presolve dev
presolve dev --input "hello"Inspect the decision before runtime objects exist.
A deployment plan is the recorded result of matching one application to one environment. It identifies what Presolve selected; it does not contain live database clients, sockets, secrets, or cloud SDK objects.
application: orders 1.0.0
environment: production
status: resolved
presolve:sql/database
provider: postgres-sql
version: 0.1.0
features: dialect-postgresql, returning
presolve:objects/store
provider: s3-objects
version: 0.1.0
features: range-readThe exact human formatting may evolve during preview. Automation should use the JSON form described below.
Use the versioned JSON projection for tooling.
presolve inspect --json
presolve check --json
presolve plan --json
presolve inspect dist/orders.presolved --jsonEvery machine payload identifies the explicit CLI schema rather than directly serializing internal Rust structs:
{
"schema": "presolve.cli",
"schema_version": "0.1",
"kind": "..."
}| Command | Machine meaning |
|---|---|
inspect --json | normalized source application semantics; no environment required |
inspect RELEASE --json | verified detached release identity and semantics; no environment required |
check --json | compatibility status + structured resolution problems; no full plan payload |
plan --json | exact symbolic deployment plan when resolved; plan: null when rejected |
Rejected check and plan calls write their structured payload to stdout and return a non-zero status. Branch on stable problem type/code fields rather than scraping human text.
Stable codes separate application errors from compatibility failures.
| Range | Subsystem | Examples |
|---|---|---|
PS1xxx | Application definition | PS1001 parse error · PS1005 duplicate capability · PS1016 invalid capability feature |
PS2xxx | Compatibility/resolution | PS2001 missing capability · PS2004 missing required feature · PS2005 unsupported workload |
Application validation can return multiple PS1xxx diagnostics. Compatibility failures preserve PS2xxx codes through check, plan, and local execution.
{
"status": "rejected",
"plan": null,
"problems": [
{
"type": "missing_capability",
"code": "PS2001",
"interface": "presolve:kv/store",
"version": "^0.1"
}
]
}presolve dev closes the local loop.
The local path discovers the application and environment, validates compatibility, constructs the plan, materializes supported local provider/runtime configuration, and executes through the same architecture used by detached-release checkpoints.
presolve env check
presolve check
presolve plan
presolve devdev is convenient for local iteration; check and plan remain useful separately because they let you inspect compatibility and decisions without executing anything.
Run the portability claims directly.
| Command | What it exercises |
|---|---|
bash ./demo/portability/run.sh | KV: memory, Redis, Cloudflare planning; same release identity |
bash ./scripts/check-object-portability.sh | Object storage: memory ↔ S3-compatible |
bash ./scripts/check-sql-portability.sh | SQL conformance + SQLite ↔ PostgreSQL |
bash ./scripts/check-queue-portability.sh | Queue runtime/provider capability proof with leased delivery semantics |