pub enum Command {
Show 31 variants
Doctor {
input: PathBuf,
only: Option<CapabilityArg>,
strict: bool,
format: FormatArg,
},
Dev {Show 14 fields
sub: Option<DevSub>,
path: PathBuf,
lock: LockArgs,
contexts: Vec<String>,
base_port: Option<u16>,
inspect: bool,
inspect_port: Option<u16>,
no_install: bool,
env: String,
local_workers: Vec<String>,
format: DevFormatArg,
ready_json: Option<PathBuf>,
stream: DevStreamArgs,
wrangler_args: Vec<String>,
},
Tail {
path: PathBuf,
lock: LockArgs,
context: Option<String>,
env: String,
wrangler_args: Vec<String>,
},
Deploy {Show 17 fields
path: PathBuf,
lock: LockArgs,
context: Option<String>,
worker: Option<String>,
env: String,
dry_run: bool,
no_install: bool,
format: DeployFormatArg,
yes: bool,
secrets_file: Option<PathBuf>,
secrets: Vec<String>,
force: bool,
prune: bool,
confirm_delete: Vec<String>,
accept_fresh_agent: Vec<String>,
accept_compatible_skew: bool,
wrangler_args: Vec<String>,
},
New {
path: PathBuf,
name: Option<String>,
},
Check {
input: PathBuf,
format: CheckFormatArg,
fix: Option<Vec<String>>,
emit: bool,
each: bool,
lock: LockArgs,
},
Build {
input: PathBuf,
out: Option<PathBuf>,
target: Option<CliTarget>,
platform: Option<CliPlatform>,
emit: Option<EmitFormat>,
profile: Option<CliProfile>,
lock: LockArgs,
},
Compile {
input: PathBuf,
output: PathBuf,
target: CliTarget,
platform: CliPlatform,
emit: EmitFormat,
sources_stdin: bool,
lock: LockArgs,
},
Client {
input: PathBuf,
out: Option<PathBuf>,
service: Vec<String>,
layout: Option<ClientLayoutArg>,
check: bool,
lock: LockArgs,
},
Openapi {
input: PathBuf,
service: Option<String>,
out: Option<PathBuf>,
format: Option<OpenapiFormatArg>,
lock: LockArgs,
},
Token {
actor: Option<String>,
sub: Option<String>,
lifetime: Option<String>,
expired: bool,
not_before: Option<String>,
claims: Vec<String>,
input: PathBuf,
lock: LockArgs,
},
Fmt {
args: FmtArgs,
},
Test {
args: Box<TestArgs>,
lock: LockArgs,
},
Eval {
args: EvalCommand,
lock: LockArgs,
},
Fetch {
path: PathBuf,
lock: LockArgs,
format: DeployFormatArg,
},
Update {
names: Vec<String>,
path: PathBuf,
},
Revert {
path: PathBuf,
context: Option<String>,
worker: Option<String>,
env: String,
to: Option<String>,
dry_run: bool,
format: DeployFormatArg,
yes: bool,
accept_schema_ahead: Vec<String>,
accept_secret_changes: bool,
},
Migrate {
command: MigrateCommand,
},
Add {
package: String,
alias: Option<String>,
path: PathBuf,
format: DeployFormatArg,
},
Search {
package: String,
path: PathBuf,
format: DeployFormatArg,
},
Deps {
path: PathBuf,
format: DeployFormatArg,
},
Publish {
path: PathBuf,
dry_run: bool,
expect_checksum: Option<String>,
format: DeployFormatArg,
},
Yank {
package: String,
version: String,
undo: bool,
path: PathBuf,
},
Login {
target: AccountTarget,
},
Logout {
target: AccountTarget,
},
Org {
command: OrgCommand,
},
Approve {
package: Option<String>,
all: bool,
list: bool,
format: DeployFormatArg,
path: PathBuf,
},
Registry {
command: RegistryCommand,
},
Explain {
code: String,
},
Mcp {
path: PathBuf,
},
Book {
search: Option<String>,
format: BookFormat,
},
}Variants§
Doctor
Check this machine has the tools Bynk needs.
Surveys what compiling, testing, and deploying need, and prints the exact remedy for anything missing.
Bare bynk doctor is informational: it surveys every capability and
exits 0 unless the compiler itself is unusable. --only <capability> gates on
one capability (exits non-zero if its tools are missing); --strict
turns every warning into a failure, for CI.
Fields
input: PathBufProject directory to inspect (for project-local node_modules/.bin
resolution). Defaults to the current directory.
only: Option<CapabilityArg>Scope the check — and the exit code — to one capability.
Dev
Build and serve the project locally, rebuilding on save.
One step in place of the manual compile + cd + wrangler dev recipe.
Compiles into a managed .bynk/dev/ build dir and runs one wrangler dev per context from inside its worker dir, in local mode (Miniflare) —
no namespace provisioning needed. Every context is served by default and
the service bindings between them are wired (#552), so a cross-context
call resolves locally; --context narrows to a subset. While serving,
.bynk sources are watched (#524): saving a file rebuilds in place and
the running workers hot-reload; a failing rebuild reports errors and
keeps serving the last good build. Everything after -- is forwarded to
wrangler dev verbatim.
bynk dev inspect reads a running session (#3581): see its help.
Fields
path: PathBufProject directory to serve from (anywhere inside the project; the
root is found by walking up for bynk.toml). Defaults to ..
contexts: Vec<String>Which context to serve, repeatable. Omit to serve every context in the project with the service bindings between them wired (#552); pass one or more to narrow to a subset. Accepts the dotted name or its dasherised worker-dir form.
base_port: Option<u16>First port of the per-context allocation (context i gets
--base-port + i, in sorted order). Defaults to wrangler’s 8787.
A single context left on the default keeps -- --port N working.
inspect: boolServe with the V8 inspector enabled (slice 3, ADR 0104): wrangler dev
starts with --inspector-port so a JavaScript debugger can attach.
Breakpoints set in .bynk sources resolve through the emitted source
maps, composed into the worker bundle. Prints the inspector URL on start.
inspect_port: Option<u16>First inspector port, allocated per context exactly as --base-port
is. Always honoured, even for one context. Without it the base is
9229 under --inspect or with several contexts, and a single
context without --inspect gets a free port of its own, so
sessions started together do not collide on 9229.
no_install: boolDo not install the generated project’s npm packages: stop, naming
the install command, when one is missing. For people who provision
node_modules themselves, and CI. Also set by BYNK_NO_INSTALL=1.
env: StringWhich bynk.deploy.lock environment -- --remote reads the KV id
from. dev never provisions, so this only selects among what
bynk deploy --env NAME already recorded — irrelevant without
--remote. Omit for today’s single, unqualified default.
local_workers: Vec<String>A Worker outside the project, named by a Service instance
(@worker("NAME")), to reach in your own locally running
wrangler dev of it rather than in the stand-in dev binds by
default. Repeatable.
format: DevFormatArgOutput format. human (default) is the readable stream on stderr.
json adds one JSON event per line on stdout (serving with each
context’s ports, rebuilding, rebuild_ok, rebuild_failed,
stopped), the stable scriptable surface for editors and CI.
ready_json: Option<PathBuf>Once every served context answers an HTTP probe, write
{ "<worker>": "<url>" } to FILE: the readiness signal for a test
runner or CI script. A stale FILE is removed at start, and FILE is
removed when the session stops.
stream: DevStreamArgsTail
Stream a deployed Worker’s logs, mapped to .bynk sources.
Runs wrangler tail with stack frames rewritten to .bynk locations,
as bynk dev does for the local server (#2546). The project is
compiled so the frames can be mapped through the emitter’s source maps,
but nothing is deployed or provisioned. Everything after -- is forwarded to wrangler tail.
Fields
Deploy
Provision Cloudflare resources and deploy every Worker.
Each context’s resources are provisioned and its Worker deployed; the
whole project ships in one command, in Service-Binding dependency
order — Cloudflare rejects a Worker uploaded before a Worker it binds
to. The generated configuration remains disposable: Cloudflare ids live
in the committed bynk.deploy.lock.
Fields
context: Option<String>Deploy this context alone, assuming the contexts it consumes are already live; a dependency that has never been deployed is reported rather than pushed into. Accepts the dotted name or its dasherised worker-dir form. Omit to deploy the whole project in order.
worker: Option<String>Deploy this Worker alone, by its directory name under workers/: a
[deploy.workers.<key>] group’s key (the group is one Worker, so it
deploys, and rolls back, as a unit), or a context’s dasherised name.
Like --context, it assumes the Workers it binds to are already live.
env: StringTarget environment. Selects the bynk.deploy.lock section and,
for any value other than default, synthesises an environment-
scoped Wrangler config section (KV, queues, Service Bindings all
qualified) since Cloudflare does not inherit bindings into a named
environment. Omit to deploy today’s single, unqualified default.
dry_run: boolPrint the provisioning and deploy plan without changing Cloudflare
or writing bynk.deploy.lock.
no_install: boolDo not install the generated project’s npm packages: stop, naming
the install command, when one is missing. For people who provision
node_modules themselves, and CI. Also set by BYNK_NO_INSTALL=1.
format: DeployFormatArgPlan output format. short is line-oriented; json is for CI.
yes: boolSkip the confirmation required before creating a namespace or publishing a Worker. Required for non-interactive automation.
secrets_file: Option<PathBuf>Read secret values from a dotenv-style NAME=value file. Supplies
both names and values; never committed, never persisted. Values move
to wrangler secret put and are dropped.
secrets: Vec<String>Set this named secret, taking its value from the environment (or a
prompt). Repeatable. Use for a bynk.Secrets name, whose spelling
the compiler cannot know — an actor’s declared auth secret needs no
flag. The environment is never scanned for names.
force: boolOverwrite a secret that is already set. The default sets only the missing ones, so a re-deploy does not cut a fresh Cloudflare secret version for every secret every time.
prune: boolDelete every reported orphan — a KV namespace or queue the ledger remembers that the current build no longer declares. Never deletes a Worker. Prompts separately from the creation confirmation unless –yes is also given; omit to report only.
confirm_delete: Vec<String>Confirm deleting this agent class’s stored data, named as the plan
prints it (<context>.<Class>). Repeatable. A removed agent
declaration deletes data irreversibly, so --yes never stands in
for this.
accept_fresh_agent: Vec<String>Let this context start with fresh agent state on another Worker script
than the one it was last deployed to (into or out of a
[deploy.workers.<key>] group, or after a group is renamed or re-keyed).
An agent’s state belongs to its script, so without this such a move is
refused (bynk.deploy.agent_move_refused); with it the old state stays
in the old script, which the plan then reports as holding data.
Repeatable; each context is named, never a blanket.
accept_compatible_skew: boolWith --context: deploy a callee ahead of live callers still on an
older contract, when every such change is compatible for them. The
older contracts are recorded in bynk.contracts.lock (commit it),
and the callee answers them until the callers are redeployed. A
breaking change, and a caller ahead of its live callee, are
refused as before.
New
Scaffold a new project.
The project is a complete, runnable single-context HTTP service you can
serve immediately with bynk dev.
Writes a bynk.toml, a .gitignore, and src/<name>.bynk into a new
directory. Pure offline file-writing — it shells nothing and needs no
toolchain, so you can run it before Node or wrangler are
installed. The project name defaults to the target directory’s final
component; --name overrides it and must be a legal Bynk identifier.
Fields
Check
Type-check a file or project.
Writes no output.
Runs the compiler pipeline in-process.
Fields
format: CheckFormatArgDiagnostic output format. rich (default) is the ariadne
source-context rendering; short emits one terse
path:line:col: severity[category]: message line per diagnostic,
for tooling (the VS Code problem-matcher, CI, scripts).
In both, path is the file as you’d type it from the working
directory (the input you passed, joined with the file’s place in
it), the same path fmt reports.
fix: Option<Vec<String>>Apply the machine-applicable fix suggestions to the sources, in
place, before checking (#2642): the same fixes the editor’s
“fix all” applies, repeated until none remain. Writes only files
that change, does not format, and writes nothing if applying the
fixes would leave a problem that needs a human. What remains is
reported as usual. --fix=<code>[,<code>…] takes only the fixes of
the named diagnostic codes (a hint’s too, when named): for a single
migration, such as an upgrade note’s one change. An unknown code is
an error that names the nearest real one (#3537).
emit: boolAfter a passing check, generate the Workers TypeScript into a
temporary directory and type-check it with tsc (#3068). A failure
is reported as bynk.codegen.tsc_failed at the Bynk source the
failing line came from: it is a compiler bug. Needs tsc (with
Node.js); slower than a plain check, so off by default. Project
directories only.
each: boolRun over each project directly inside a directory that has no
bynk.toml of its own (#3274): as at a [workspace] root, one
report per project under a ── path ── header, every project run,
and a non-zero exit if any fails. A subdirectory without a
bynk.toml is not a project and is skipped. At a workspace root
it changes nothing; at a project, or inside one, it is an error.
Build
Build a project from its [build] settings.
Needs no flags: out, target, platform and emit come from the
[build] table, else the defaults (out, bundle, cloudflare,
ts), and a flag overrides its key. build infers from the project;
bynk compile is told, and never reads [build].
Fields
platform: Option<CliPlatform>Deploy platform. Overrides [build] platform.
emit: Option<EmitFormat>Artefact language. Overrides [build] emit.
profile: Option<CliProfile>Build profile: release (the default, no contract checks) or dev
(contract checks on). [profile.<name>] overrides its defaults.
Compile
Compile a project to TypeScript, settings as flags.
Use bynk build for a project that takes its settings from bynk.toml.
Runs in-process (#2471, #2998).
The compiler is linked in. With --sources-stdin it compiles unsaved editor buffers:
a JSON object { "<absolute path>": "<text>" }
on stdin wins over the files on disk, and bynk.schema.lock is neither
read nor written. What “Bynk: Show Compiled Output” runs.
Fields
target: CliTargetBuild target. bundle (default) produces a single deployment
unit; workers produces one Cloudflare Worker per context with
Service Binding plumbing.
platform: CliPlatformDeploy platform selecting the bynk surface binding: cloudflare
(default), node, or browser (bundle topology only).
emit: EmitFormatArtefact language. ts (default) writes typed TypeScript; js
writes the same modules with types stripped, runnable with no tsc
in the loop.
Client
Write a typed TypeScript client for the HTTP services.
One module a front end (SvelteKit, Next.js, anything that can fetch)
imports (#3508): one function per from http route, the boundary types as
TypeScript types, and the same refinement checks the server runs, on the
way out and on the way in. Each call returns a union of the route’s own
responses keyed by status, or a CallFailure; nothing is thrown for an
HTTP status. An optional value is T | null.
The module carries a small browser-safe runtime, so it needs nothing
installed. Pass it your own fetch, a baseUrl and headers:
createClient({ baseUrl, fetch, headers }). Writes to stdout unless
--out is given. The project must check clean. Experimental: member names
may change in a minor version until it is stabilised.
Routes the client cannot represent yet (raw bodies, raw and streamed
responses) are named on stderr and left out. bynk openapi is the language-neutral contract and stays.
Fields
out: Option<PathBuf>Write the client to PATH instead of stdout: a .ts file, or with
--layout dir a directory. Defaults to [build.client] out in
bynk.toml.
service: Vec<String>Generate only this from http service (Name or unit.Name); may be
given more than once. Defaults to [build.client] service, else every
one.
layout: Option<ClientLayoutArg>file (default) writes one module; dir writes index.ts,
types.ts, codecs.ts and runtime.ts into --out. Defaults to
[build.client] layout.
Openapi
Write an OpenAPI document for the project’s HTTP services.
An OpenAPI 3.1 document for every from http service (#856): paths
and methods from the routes, parameters and request bodies from the
handler params, and responses keyed by the exact status codes
the handlers can return — the 2xx body and each error variant a handler
constructs, plus the 400 the boundary itself answers.
Schemas come from the same boundary-shape derivation the emitted codecs
use, so a refinement (String where NonEmpty) becomes the JSON Schema
constraint it re-validates (minLength: 1) and the spec cannot drift
from the handlers. Writes to stdout unless --out is given, so it
composes in CI. The project must check clean.
Fields
service: Option<String>Document only this from http service (Name or unit.Name).
Defaults to every one.
format: Option<OpenapiFormatArg>Output format. Defaults to yaml when --out ends in .yaml or
.yml, otherwise json.
Token
Mint a credential for the project’s own Bearer actor.
For calling a Bearer-guarded route by hand — curl under bynk dev,
or a smoke test against a deployment. Prints the token alone on stdout,
so $(bynk token Reader --sub me) works.
This is not bynk org token mint, which mints a registry publish
token for bynk publish. bynk token signs an HS256 JWT for an actor
this project declares, exactly as that actor’s emitted seam verifies it.
The secret is read from the environment under the name the actor declares
(auth = Bearer(secret = "API_TOKEN_SECRET") → $API_TOKEN_SECRET),
never from an argument, and is never printed. --sub is checked against
the actor’s identity type, refinements included, before signing. Only
Bearer actors are supported: a Signature actor signs a request body,
and an Oidc actor’s tokens come from the identity provider. With no
actor, lists the project’s Bearer actors and the secret each reads.
A refinement actor (actor Moderator = Reader where hasClaim("mod"))
signs with its base’s secret and carries the claims its predicate needs,
as the system test harness does for by Moderator("x"). A predicate
that no claims satisfy is refused. --claim name[=value] (repeatable)
adds claims to any actor’s token, and replaces a claim the predicate
would have set, so the seam’s 403 can be tested.
The default lifetime is 1 hour; --lifetime (up to 365d) sets another.
--expired and --not-before mint tokens the seam must refuse, for
testing the refusals.
Fields
actor: Option<String>The actor to mint for (Name or unit.Name). Omit to list the
project’s Bearer actors.
lifetime: Option<String>How long the token is valid, like 15m, 1h or 30d (default
1h, at most 365d). Counted from --not-before when that is set.
not_before: Option<String>Start the token’s validity this long from now, like 10m, to test
that the seam refuses a token not yet valid.
Fmt
Format .bynk source files.
Formats in place. Passing - reads from stdin and writes to stdout.
Runs the formatter in-process.
--indent, --indent-width, --max-line-width and
--no-trailing-comma override the canonical style for this run; with
none of them the output is the canonical formatting.
Test
Run the project’s tests.
Discovers and runs test declarations.
Runs in-process. Requires tsc (with Node.js) or tsx on PATH.
Eval
Evaluate a snippet in a unit’s scope; print its value.
Compiles and runs the snippet as a synthetic test case in a suite for
--unit, under the test runtime, and prints
{"value": <wire shape>, "type": "…", "diagnostics": […]} (#3585). The
snippet is --expr, or stdin; its last expression is the value. Leading
consumes and stub lines belong to the suite, so a snippet that uses
another unit consumes it, as a suite does. A capability the snippet
calls needs a stub; nothing reaches the network. Each evaluation is
independent: send earlier cells’ lets again ahead of the snippet.
The project’s own suites are left out of the build, so a suite that does
not compile cannot block an evaluation. --suite <UNIT> builds --unit’s
own suite in and puts the snippet inside it, so the suite’s stubs
and fns apply; its errors are then reported.
Runs in-process, with the build and runner of bynk test; requires
tsc (with Node.js) or tsx on PATH. The exit status is zero only when
there is a value.
Fetch
Fetch dependencies and write bynk.lock.
Resolves the project’s dependencies, fetches the git ones missing from
the store, and writes bynk.lock (#2240). check, test, dev and
deploy do this first anyway; fetch does only this — warm the store
before an --offline CI step, or after editing [dependencies].
Fields
format: DeployFormatArgOutput format. json prints one document on stdout (#2472).
Update
Move git dependencies to their latest revisions.
Re-resolves git dependencies’ revisions — a branch that moved upstream
— and rewrites bynk.lock (#2240). Name aliases or packages to update only
those; with none, every git dependency is re-resolved.
Fields
Revert
Make a Worker’s previous deployment live again.
Needs no rebuild. Drives Cloudflare’s version rollback after checking what makes it
unsafe: D1 migrations the live version applied, agent state stamped
with a newer schema version, contract skew against the other live
Workers, a replaced resource id, a secret change. Every unknown is a
refusal, and a refusal changes nothing. Reads Cloudflare even with
--dry-run, so it needs CLOUDFLARE_API_TOKEN (with D1 read access)
and CLOUDFLARE_ACCOUNT_ID. Only versions deployed by a bynk that
records deploy facts can be reverted; for any other, redeploy the tag.
Fields
context: Option<String>Revert this context alone (dotted name or Worker directory). Default: every Worker the ledger records for the environment.
worker: Option<String>Revert this Worker alone, by its directory name: a
[deploy.workers.<key>] group’s key, or a context’s dashed name. A
group is one script, so every member goes back together.
to: Option<String>Go back to this Cloudflare Worker version id instead of the
deployment before the live release. Needs --context, since
a version id belongs to one Worker. The same checks apply.
format: DeployFormatArgPlan output format. short is line-oriented; json is for CI.
Migrate
Inspect and migrate agents’ stored state.
status reports where each agent class’s stored state stands; sweep
migrates every stored instance so old migrate steps can retire.
Fields
command: MigrateCommandAdd
Add a registry dependency to bynk.toml.
Adds (#2274) the highest version its registry offers (or one matching
@<range>), written as <alias> = { package = "…", version = "^…" },
then resolved and locked.
Fields
format: DeployFormatArgOutput format. json prints the entry written on stdout (#2472).
Search
Look up a package’s versions on its registry.
Asks the registry its organisation routes to (#2472) for every version
its index lists, with the newest usable one. An exact org/package
lookup — a registry’s index has no free-text search.
Fields
format: DeployFormatArgOutput format. json is for scripts and editors.
Deps
List dependencies and their locked versions.
What bynk.lock resolved each of the project’s dependencies to (#2472).
Offline.
Fields
format: DeployFormatArgOutput format. json is for scripts and editors.
Publish
Publish this package to its registry.
Publishes to the registry its organisation routes to (#2287): check it, pack it, upload it through the registry’s publish API, and verify the signed line the registry returns.
Fields
expect_checksum: Option<String>Refuse, before uploading anything, unless the package packs to
exactly this checksum (the one a --dry-run reported).
format: DeployFormatArgOutput format. json prints the package, version, registry and
file list on stdout (#2472).
Yank
Yank a published version.
Yanks through the registry’s publish API (#2287): the version is kept for locked builds, but never newly chosen.
Fields
Login
Sign in to a registry.
Signs in to a registry’s accounts (#2378) through GitHub’s device flow, and keeps the account token in the credentials file.
Fields
target: AccountTargetLogout
Sign out of a registry.
Signs out of a registry’s accounts (#2378), here and on the server.
Fields
target: AccountTargetOrg
Manage a registry organisation, its members and tokens.
For a registry with accounts (#2378): claim and block an organisation, add and remove members, mint and revoke publish tokens.
Fields
command: OrgCommandApprove
Approve the npm packages that dependencies bring in.
Reviews and approves the npm packages that git and registry
dependencies’ adapters bring into the build (#2296), recording each
approval in bynk.lock. With no package, asks about each pending one.
Fields
format: DeployFormatArgWith --list: short (default) is one line per requirement;
json is one document for tooling (the editor’s review).
Registry
Build and maintain a static package registry.
The registry lives in a directory (#2274), served by any static host
or read as a file:// index.
Fields
command: RegistryCommandExplain
Explain a diagnostic code.
Prints the longer-form “what the rule is, why it exists, and how to fix
it” behind a bynk.* error code (#853).
Prints a curated blurb, a minimal before/after example, and a link to the relevant Book concept page. The blurb is offline-complete, so the substance is available without network. Codes without a curated explanation report that gracefully; an unrecognised code exits non-zero. The same explanations back the editor’s clickable diagnostic-code links.
Mcp
Serve toolchain answers to an AI agent over MCP.
Read-only answers over the Model Context Protocol (#2466), on stdin/stdout.
Eight tools: diagnostics, a symbol’s type and definition, a unit’s
documentation, the project’s architecture, a handler’s wire contract,
a diagnostic explanation, a project check, and a search of the Book. Each answers in compact
Markdown with path:line:column locations relative to PATH. Nothing is
written, and file arguments cannot leave PATH. Point an MCP client at
bynk mcp (see the tooling docs for per-client set-up).
Book
Print or search the Bynk Book.
The whole Book, every page in reading order, is embedded in this build
(#2463), so it matches the bynk you run and works offline. With no arguments it
prints the Book, its first line naming the toolchain version. With
--search <QUERY> it prints the best-matching sections instead, each
with its page link. Used by the editor’s bynk_search_book
language-model tool; a build made without the bundle says so and exits
non-zero.
Fields
format: BookFormatWith --search: text (Markdown, the default) or json.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<'a, T> FromIn<'a, T> for T
impl<'a, T> FromIn<'a, T> for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'a, T, U> IntoIn<'a, U> for Twhere
U: FromIn<'a, T>,
impl<'a, T, U> IntoIn<'a, U> for Twhere
U: FromIn<'a, T>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);