Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 119 additions & 49 deletions .claude/skills/local-node-validation/SKILL.md

Large diffs are not rendered by default.

54 changes: 28 additions & 26 deletions .claude/skills/miden-client-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,60 @@
---
name: miden-client-cli
description: Map to the official Miden client CLI. The recommended path is via midenup, which installs a managed `client` toolchain component and is invoked as `miden client ...` (component invocation through the midenup `miden` wrapper). The underlying / direct-install path is the `miden-client-cli` crate (`cargo install miden-client-cli --locked`), which exposes the binary `miden-client` and is invoked as `miden-client ...`. Both paths run the same upstream binary. Covers install, init, network selection, and where to find the canonical command reference and configuration docs. Use when an agent needs to create accounts, query state, mint, send, or consume notes against a running Miden node from the command line; pair with the local-node-validation skill for localhost workflows.
description: Map to the official Miden client CLI for the current project-template v16 line. Use midenup's managed `miden client ...` component when it matches the intended workflow; use direct `miden-client-cli` installation when exact parity with this repository's resolved `Cargo.lock` client is required. Covers install, init, network selection, and canonical command/configuration references. Use when an agent needs to create accounts, query state, mint, transfer, or consume notes against a running Miden node; pair with the local-node-validation skill for localhost workflows.
---

# Miden Client CLI

The Miden client CLI is the command-line wrapper around the `miden-client` library. It creates accounts, syncs state, mints assets, sends transactions, and consumes notes against a running Miden node.
The Miden client CLI is the command-line wrapper around the `miden-client` library. It creates accounts, syncs state, mints assets, submits transactions, and consumes notes against a running Miden node.

This skill maps agents to the canonical install paths and upstream command reference. Do not memorize commands or config keys here. Follow the links.
This skill maps agents to the managed midenup invocation and the exact client version currently resolved by this repository's lockfile. Do not mix a store or command set from another client release into the v0.16 workflow.

When to reach for this skill: the user wants to interact with a node from the shell. For Rust-library work against a localhost node from a binary, see the `local-node-validation` skill. For test-side note construction, see `rust-sdk-testing-patterns`.

## Two Invocation Paths
## Installation and Version Check

There are two ways to invoke the same upstream binary.
The repository README uses midenup for the managed Miden toolchain. After installing and initializing midenup, the `miden` wrapper delegates `miden client <args>` to the toolchain's `client` component, whose installed executable is `miden-client`. Always check the installed component before using an existing store:

**Through midenup (recommended).** Run `miden client <args>`. This is component invocation: the midenup `miden` wrapper looks up the `client` component in the active toolchain and runs its installed executable. `miden client` is **not** an alias; the midenup README alias table only documents short-hand aliases (such as `miden account`, `miden faucet`, `miden new-wallet`, `miden send`), and component invocation is independent of the alias map. The toolchain manifest declares `installed_executable: miden-client` for the `client` component.

**Direct install.** Run `cargo install miden-client-cli --locked`, then invoke `miden-client <args>`. This installs the same upstream binary that midenup delegates to.

Both paths execute identically.

References:
- midenup install, init, toolchain delegation, and alias docs: [github.com/0xMiden/midenup](https://github.com/0xMiden/midenup). midenup is unpublished; the canonical install command is `cargo install --path .` or `cargo install --git <repo_uri>`.
- miden-client CLI install and setup: [miden-client `bin/miden-cli/README.md`](https://github.com/0xMiden/miden-client/blob/main/bin/miden-cli/README.md).
```sh
miden client --version
```

## Install via midenup
Midenup components are independent of this repository's `Cargo.lock`, so use the managed component only after the version check matches the workflow you are validating. When exact parity with the current lockfile is required, install and verify the resolved client directly:

```sh
cargo install midenup && midenup init
midenup install stable
cargo install miden-client-cli --version 0.16.0-rc.2 --locked
test "$(miden-client --version)" = "miden-client 0.16.0-rc.2"
```

`midenup init` creates a `miden` symlink in `$CARGO_HOME/bin` (default `~/.cargo/bin`). If `miden` is not found after init, ensure `$CARGO_HOME/bin` is on your `PATH`.
`integration/Cargo.toml` lower-bounds `miden-client` and `miden-client-sqlite-store` at `0.16.0-rc.1`; `Cargo.lock` currently resolves both to `0.16.0-rc.2`, backed by protocol/standards/testing `0.16.0-rc.6`.

References:
- midenup install, init, toolchain delegation, and component docs: [github.com/0xMiden/midenup](https://github.com/0xMiden/midenup).
- Exact direct CLI install and setup: [miden-client v0.16.0-rc.2 `bin/miden-cli/README.md`](https://github.com/0xMiden/miden-client/blob/v0.16.0-rc.2/bin/miden-cli/README.md).

## First-Time Initialization

`init` writes a `miden-client.toml` config in the current directory:
`init` is optional because the CLI can self-initialize. Explicit initialization is safer when selecting a network and a fresh store. By default it creates global configuration at `~/.miden/miden-client.toml`; pass `--local` to create `./.miden/miden-client.toml`. A local config takes precedence over the global config.

For this repository's Testnet runtime, use a fresh v0.16 local configuration and store. With direct install:

```sh
miden client init --network localhost # or testnet | devnet | http://<custom-rpc>[:port]
miden-client init --local --network testnet --store-path store.sqlite3
```

Subsequent commands operate against that config. For localhost workflows, pair this skill with `local-node-validation`: it boots a local node on `http://0.0.0.0:57291` and prepares a clean keystore.
With midenup, the equivalent shape is `miden client init --local --network testnet --store-path store.sqlite3`. Omitting `--network` selects Testnet. Other accurate choices are `localhost`, `testnet`, or a full custom HTTP(S) RPC URL. Do not open a pre-v0.16 or different-network SQLite store with this client; archive it and initialize a fresh path. For localhost workflows, pair this skill with `local-node-validation`.

Current v0.16 command changes include `transfer` in place of the removed `send` subcommand, and `account --inspect <ID> --verbose` in place of the removed `account --show --with-code`. Use `miden-client <command> --help` for the exact installed command surface. The old client/CLI debug-mode toggle and `--debug` flag are removed.

## Canonical Command Reference

Follow the canonical in-repo references on `0xMiden/miden-client` (the active line, which matches project-template's pinned `miden-client = "0.14"`). The `miden-docs` site (`0xMiden.github.io/miden-docs/...`) is not used here because those URLs are not stable.
Follow the canonical references at the exact `v0.16.0-rc.2` tag, which matches the client currently resolved in project-template's `Cargo.lock`.

- CLI Reference: [`docs/external/src/rust-client/cli/index.md`](https://github.com/0xMiden/miden-client/blob/main/docs/external/src/rust-client/cli/index.md)
- CLI Configuration: [`docs/external/src/rust-client/cli/cli-config.md`](https://github.com/0xMiden/miden-client/blob/main/docs/external/src/rust-client/cli/cli-config.md)
- Repo overview and recent release notes: [`0xMiden/miden-client`](https://github.com/0xMiden/miden-client) (browse the `CHANGELOG.md` on `main` for the latest behavioral changes; pin to a release tag if you need a snapshot).
- CLI Reference: [`docs/external/src/rust-client/cli/index.md`](https://github.com/0xMiden/miden-client/blob/v0.16.0-rc.2/docs/external/src/rust-client/cli/index.md)
- CLI Configuration: [`docs/external/src/rust-client/cli/cli-config.md`](https://github.com/0xMiden/miden-client/blob/v0.16.0-rc.2/docs/external/src/rust-client/cli/cli-config.md)
- Release behavior: [`CHANGELOG.md`](https://github.com/0xMiden/miden-client/blob/v0.16.0-rc.2/CHANGELOG.md).

For the live command list and flags on the installed binary, run `miden client --help` (midenup path) or `miden-client --help` (direct-install path). Drill into a specific command with `miden client <command> --help`. The canonical references above remain authoritative for deeper documentation.
For the live command list and flags, run `miden-client --help` and drill into a command with `miden-client <command> --help`. If an exact-version midenup component is deliberately selected, the equivalent invocation is `miden client ...`.

## Cross-References

Expand Down
Loading
Loading