fig-sbrs.ts is a completion spec for the sbrs command in the Fig format, the
format of the withfig/autocomplete
repository. Warp’s built-in completions, inshellisense and Amazon Q Developer
CLI read specs from it. The file is prepared here, not submitted: nothing in
this folder has been sent to upstream, and whether to send it is for the
maintainer of this repository to decide.
What the file is#
- The output of
sbrs completions figof this branch (0.5.1).crates/cli/src/fig.rswrites it from the tables of theusageparser that reads the command line, so it lists the commands, aliases, options, required options, repeatable options and accepted words the parser accepts. A test (the_committed_fig_spec_matches_the_cli) fails when the file is stale. Until 0.3.0clap_complete_figwrote it. - The file is the generator’s raw output, not formatted with the prettier settings of
withfig/autocomplete (
trailingComma: "es5",printWidth: 80). Upstream’spnpm lintrunsprettier --check, which the raw output fails;pnpm lint:fixin the steps below formats it, and the formatting only wraps long descriptions. - It is the CLI of a build without the
tursofeature, which is how the Homebrew tap and a plaincargo install --path crates/clibuildsbrs.sbrs reportexists only withturso, so the spec has noreportsubcommand. Thetuifeature changes what some commands do, not the command line, so it does not matter here. - 113 top-level subcommands (the 112 commands of
sbrs --helpandhelp) and 24 top-level options,-hand-Vincluded. It usestemplate: "filepaths"in six places, and has nogeneratorsand noscript, so it runs nothing in a user’s shell. Two descriptions contain a URL (https://example.comandhttp://localhost:4444), which upstream’s review bot lists.
To regenerate it after the CLI changes (the same test writes the usage spec and the CLI reference too):
or, from an sbrs built without turso, sbrs completions fig > docs/completions/fig-sbrs.ts.
Where the spec and the CLI differ#
The generator reads the parser’s own tables, so it states what sbrs needs: an
option is isRequired when the command line refuses to run without it, isRepeatable
only when it collects a list (such as --features and --assert), and an argument
is isOptional only when it may be left out. The clap_complete_fig file of 0.3.0
marked every option that takes a value as repeatable and every optional option’s value
as optional, which did not match the parser.
The differences left are small: the help command is listed without the nested
help <command> entries, the short options are listed as one name array with the
long ones and never as combined flags, and the descriptions are the first line of
the help text of each command, option and argument.
Before you decide#
Checked on 2026-10-15:
- withfig/autocomplete is not archived, but its last commit and last merged pull request are from 2025-05-05, and pull requests opened since (the newest from 2026-10-04) have not been merged. A new spec may wait a long time for a review, or never get one.
- The README says Amazon Q Developer CLI is the former Fig. The “How to
Contribute” page it links (
fig.io/docs/getting-started/contributing) answered with HTTP 503. The steps below come from the repository’s own README, CONTRIBUTING.md,package.jsonand workflows instead. - There is no spec named
sbrs,seleniumbaseor similar in the repository. - Contributors must sign a CLA (
cla/cla.md; the bot asks for a pull request comment). Among other things it has you state that the work is yours. - Without the upstream spec,
sbrs completions bash|zsh|fishstill gives shell-native completion, and Warp uses that by default (see CLI Usage).
What was checked on the file, and what was not:
- Checked: it loads as a module (Node 24 type stripping) with 113 subcommands, 24
options, six
templates and two repeatable options; prettier parses it as TypeScript (prettier 3.2.5 here, upstream asks for ^3.4.2) andprettier --checkwith upstream’s settings reports only formatting differences, whichpnpm lint:fixapplies. A test compares the file with the generator’s output. - Not checked: upstream’s
pnpm test(tsc --noEmitagainst@withfig/autocomplete-types) andpnpm lint(eslint with@fig/eslint-config-autocomplete). They need a clone of withfig/autocomplete andpnpm install, which was not done. Run them in your fork before you open the pull request.pnpm dev(trying the spec live) needs the Amazon Q app.
Steps to submit#
Requirements from upstream: Node 20 or newer and pnpm 9 or newer.
Then open the pull request against withfig/autocomplete master, with the text
below. The CI jobs are a build, a linter (pnpm lint), a typecheck, a bot that
comments with the spec’s URLs and scripts, and the CLA check: sign it by commenting
I have read the CLA Document and I hereby sign the CLA on the pull request when
the bot asks. If pnpm lint:fix changes the file, send the changed file, not the
one in this folder.
Pull request text#
Title:
Description (tick the boxes that are true after you ran the checks):
Install sbrs with cargo install --path crates/cli in this repository, or from the
Homebrew tap, to run the generator yourself.