canic-cli 0.293.0

Canic command line deployment tool
# Fleet console

The Canic CLI embeds the browser console in the served fleet report. Open **Fleet console** to inspect the selected fleet. The CLI reads endpoint names, modes and Rust signatures from local Wasm artifacts and Wire schemas from the app’s reviewed inventory, `wire-baseline/<app>/contracts.json` beside `canic.toml`. A browser can also load an inventory or individual endpoint manifests. A known mode, schema, target principal and pinned local gateway are required to send a call. Calls use the browser’s anonymous identity.

The sidebar lists each canister with its endpoint count and links to every endpoint. Filter endpoints by name and call mode together; queries include composite queries. Each endpoint shows its request and reply types. Its form presents the single element of a one-element tuple and wraps it for the call. A required ULID field, or a 16-byte `request_id` or `idempotency_key`, starts with a fresh ULID, and 16-byte fields also accept ULID text. Switch to **edit as JSON** to paste a value. The editor accepts `123n`, `{"$hex": …}`, `{"$ulid": …}`, `{"$ulidBytes": …}` and `{"$principal": …}`. Replies use the same tags; a 10- or 29-byte value also shows its principal text in `_principal`, which the editor ignores. A reply can therefore be edited and sent back. Replies show `Ok`, `Err · <tag>` or `Rejected`, the elapsed time and highlighted JSON.

Type a principal under **Canister ID** to call a canister the fleet does not list, such as a user shard or project. The override applies to the selected canister type in the current tab. The header shows whether the pinned gateway answers.

Show, copy or download TypeScript for the selected canister, or copy one endpoint’s declaration. Call history keeps the last 50 attempts in the current tab, with up to 4,096 characters per request and outcome. Clear it manually, reload, or select another fleet to discard it.

The schema form and TypeScript renderer originate in [canic-ui at febe88e](https://github.com/dragginzgame/canic-ui/tree/febe88e9ab544dd50e97f9636471dd3d72905c4d). Toko owns its sign-in and fixture permissions.

To start a local fleet and open its application in the system browser, declare the frontend beside that fleet’s network in `canic.toml`. For example:

```toml
[apps.example.fleets.local.local_frontend]
program = "signup-console"
port = 5173
```

Run `canic fleet start --fleet local --open`. Canic starts the declared executable from the configuration directory with the absolute verified connection-file path and decimal port as its two arguments. The executable binds IPv4 loopback, writes `READY\n` to stdout when it can serve, sends diagnostics to stderr and stays in the foreground. Canic prints the clickable localhost URL and opens it in the system browser. Ctrl-C ends the frontend and leaves the fleet running. Repeat the command to reopen it. Plain `canic fleet start` is headless.

For a running local application, `canic fleet status --serve --app-port 5173` adds **Open application**. The app owns the named localhost port, Internet Identity login, session and logout. Importing another fleet's connection removes the link. The inspector never imports an app's session key.

To rebuild the embedded JavaScript after changing the console or the selected Wire runtime, prepare the locked Cargo dependencies, then run from the workspace root:

```sh
npm --prefix crates/canic-cli/ui ci
npm --prefix crates/canic-cli/ui run build
make canic
```

Commit the generated bundle with its sources. CLI builds use the checked-in bundle.