Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The tools

Everything in this guide was done with one program, vishy. This page lists its commands in the order a developer meets them, one line each. Every option, and every command’s exact output, is in docs/toolchain.md.

commandwhat it answers
vishy check <inputs>Does the program make sense? Types, names, examples, and a count of what it declares. With --from=<old>, also the migration from the program that wrote the store; with --interface, whether every contract is still a stub.
vishy run <inputs>What do the scenarios do? Each step’s outcome, then each unit’s state.
vishy verify <inputs> [seed] [iterations]Does every rule hold? Examples, scenarios, then sampled calls from random and reachable states.
vishy new <dir> [--slice <name>]A new application in a folder of its own, laid out in slices, with sign-in and the users package, checked before it reports; --slice adds a slice to an existing one.
vishy graph <inputs>Which units are joined, by flows and by rules across units, and what the verifier re-checks after each flow. --json for other tools.
vishy tree <file>The file’s declarations as the compiler parsed them, one per line in a bracketed form.
vishy tokens <file>The words the compiler reads the file as, one per line with their kind and position.
vishy ir <inputs>Counts of the compiler’s internal form of the program; it can write that form to a file, and verify --from-ir runs the verifier from such a file with no program read.
vishy schema <inputs>The SQLite tables of every unit with caps storage.
vishy service <inputs> <dir>The application’s folder: the program and a launcher, <dir>/service <store> <tenant> <command>, which the vishy program serves with nothing to build; --from=<old> makes its migrate carry an older store forward.
vishy service --crate <inputs> <dir> [sqlite]The same application as a Rust project to build with cargo, kept for now; the Rust that performs an effect is supplied there.
vishy client <inputs> <dir>A typed TypeScript client, an OpenAPI description and a Rust client crate, from the program’s routes.
vishy serve <inputs> [addr] --db <file>The development door: the routes served from source against a store, reloaded on every save.
vishy interface <inputs>The public surface: rows, enums, events, signatures with their outcomes, flows, routes, effects.
vishy brief <inputs> <Unit>What the writer of one unit is shown: the language, the shared declarations and the unit’s stubs.
vishy part <inputs> <Unit> <part.vish>One part checked alone against its interface: its examples and sampled checks.
vishy write <inputs> --out <dir>The writer stage: every unit’s part requested from a model at once, checked as it lands, assembled, verified and repaired.
vishy assemble <inputs> <out.vish>The interface and its parts written as one file; refused while any contract is a stub.
vishy diff <old> <new>Whether a package’s change is a patch, minor or major, and whether its new version number covers it.
vishy blocks <part.vish>The contract blocks found in a part, with their byte ranges; for debugging a part that will not split.

<inputs> is any mix of files, directories and packages, as the chapter on many files describes. Three things reach outside the machine. vishy write sends requests to a model endpoint with a key, and the toolchain page says where it looks for both. vishy serve makes a program’s web calls for real and fetches the keys of every identity provider the program trusts. And a package’s git dependency is cloned at its tag the first time a command reads it.

Starting an application

vishy new myapp writes a project into a folder that does not exist yet, and checks what it wrote before it reports success:

pathwhat it holds
package.vishythe application’s name and version, and its one dependency, the users package
flows.vishthe root: the trust line to fill in, the routes to the users package, and what spans slices
packages/users/the users package, copied in so the project stands alone
notes/interface.vish, notes/parts/notes.vishthe slice notes: its interface, and the part that implements it

Beside them are a README, which gives the project’s exact commands, and a .gitignore for the local store and the generated code.

A slice is one feature in one folder, so one namespace: its rows, units, flows, views, routes and scenarios in its interface, its contract bodies in parts/. Two people, or two agents, on two features rarely touch the same file. Every command takes the same inputs, . packages/users/parts notes notes/parts. vishy new . --slice tasks adds a slice beside the others and prints the inputs with it; a running door watches only the inputs it was started with, so restart it. A slice’s name is part of the names of its tables, so settle it before the slice stores data you want to keep. docs/start.md goes the whole way, from installing the compiler to a signed-in request, a typed client and a scheduled job, and tests/check_start.sh runs every command it shows.

The project’s one dependency is the users package, copied in:

Most applications want the same few things about people, so the repository has them as a package written in Vishy, packages/users, verified with the program that uses it: a user record created on the first sign-in, with the issuer, the subject and the last email the provider vouched for; one role per user, member or admin, the first person to sign in to a new tenant becoming its admin; the flows sign_in(), rename(name), grant(user, role) and revoke(user, role); the views me() and users(); and Users.require(caller, role), which an application’s own flow calls first so the rest of it runs only for those allowed.

Every promise is a script

The repository keeps one check script per feature under tests/, 86 of them on 3 Oct 2026. Each runs the commands its feature’s documentation states, on a real program, and fails when an answer changes: the door’s status codes, a migration carried forward exactly once, a delivery retried with the same key, a refusal’s wording. The documentation pages are held the same way, so a command written on a page is a command that was run. This guide is one more of them: tests/check_book.sh regenerates every answer these chapters include, builds and calls the door of every program with a POST route, and fails on the first line that differs.

A front end written in the language

The part of the compiler that reads a program and checks it is being written a second time, in Vishy. --front vishy on tree, check, verify or any command that reads a program runs the parser and the checker written in Vishy beside the ones written in Rust, and refuses when they disagree, naming the file and the first line that differs. On the storage chapter’s shelf program the answer is the ordinary one:

$ vishy check --front vishy book/programs/storage-shelf.vish
ok: 1 row(s), 1 event(s), 0 fn(s), 2 unit(s), 2 contract(s), 2 flow(s)

The two parsers are held equal on every program file in the repository’s tests, apps, examples, docs, book, stdlib and experiments folders, 3,177 files on 3 Oct 2026, and the two checkers the same way. The front end exists twice, once in the language it reads, and every file checked is a test of both.

Try

Run vishy tree book/programs/storage-shelf.vish and then the same with --front vishy. The two print the same lines: the first is the Rust parser’s reading of the program, the second the Vishy parser’s, compiled from the language this guide teaches.