Expand description
The bynkc command-line interface definition.
The clap types live here (rather than in main.rs) so they are the single
source of truth for both the binary and the generated CLI reference page
site/src/content/docs/docs/cli.md. render_markdown walks the
clap command tree;
the test tests/cli_reference.rs checks the page is up to date.
Structs§
- Cli
- FmtArgs
- The
fmtsubcommand’s flags, shared withbynk fmtthe same way (#968): one#[derive(Args)]struct both CLIs flatten, rather than two copies to keep in step as formatting options are added. Thefmtsubcommand’s arguments, flattened by bothbynkc::cliandbynk::cliso the two spell one contract rather than two copies of it (thetest_runner::TestArgspattern, findings #40/#72). Field docs here are the CLI help text for both commands’ flags. - Test
Args - v0.59:
bynkc test --formatselector, and thetestsubcommand’s flags —bynk_driver::test_runner::TestFormat/TestArgs, re-exported so existingbynkc::cli::TestFormatpaths resolve unchanged (Wave 5 §5.4: thetestsubcommand’s contract, findings #40/#72, is now shared withbynk testrather than a per-command near-duplicate). Thetestsubcommand’s flags — the one contractbynkc testandbynk testboth#[command(flatten)](review findings #40/#72/#20/#21 remainder), replacing four independent hand-spellings (bynkc::cli,bynk::cli,bynk::test::TestArgs, and the argv-literal rebuild that turned the latter back into flags for thebynkcshell-out) with one. Field docs here are the CLI help text for both commands’ flags.
Enums§
- CliPlatform
- v0.17: the deploy platform that selects the
bynksurface binding. Distinct fromCliTarget(the emit topology). v0.18 addsnode. - CliTarget
- Command
- Diag
Format - v0.38 (ADR 0071):
bynkc check --formatselector. - Emit
Format - v0.108 (in-browser track, slice 1): the emitted artefact language.
ts(the default and primary output) writes the typed TypeScript modules;jswrites the same modules with their types stripped — an emit-then-strip JavaScript artefact (ADR 0137) runnable with notscin the loop. Orthogonal to--target(topology) and--platform(binding). - Indent
Kind - The
fmtsubcommand’s flags, shared withbynk fmtthe same way (#968): one#[derive(Args)]struct both CLIs flatten, rather than two copies to keep in step as formatting options are added. How--indentspells the twoIndentStylevariants. The words match the[fmt] indentkey inbynk.toml, which the language server already reads, so a project states the same choice the same way in either place. - Test
Format - v0.59:
bynkc test --formatselector, and thetestsubcommand’s flags —bynk_driver::test_runner::TestFormat/TestArgs, re-exported so existingbynkc::cli::TestFormatpaths resolve unchanged (Wave 5 §5.4: thetestsubcommand’s contract, findings #40/#72, is now shared withbynk testrather than a per-command near-duplicate).test --formatselector, shared bybynkc testandbynk test(review findings #40/#72): one enum both CLIs’Testsubcommand uses, instead of two structurally-identical copies that must be hand-kept in sync.
Functions§
- command
- The clap [
clap::Command] tree for thebynkcCLI. - render_
markdown - Render the CLI reference as a Markdown page, walking the clap command tree.