Sign In

@ultimat3/cli

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ultimat3/cli

The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy

latest
Source
npmnpm
Version
11.2.0
Version published
Maintainers
1
Created
Source

@ultimat3/cli

The x binary. One char during dev, one command per job, --json on every one of them.

What it owns

Commands and the x verify step count, As of 2026-08:

CommandDoesNotes
x new <name>scaffolds the monorepointeractive-free; auth, seeded DB, example route
x devevery role in one processembedded Postgres/events/storage, /_x mounted
x build --target docker|binary|staticone artifactROLE selects behaviour at start
x verifythe gate19 named steps, each with pass/fail + duration
x g <primitive> <name>scaffolds a primitive with a passing testnever a TODO stub
x db gen|migrate|reset|branch|backfilleverything DBbranch = copy-on-write clone + preview URL; backfill dry-runs unless --write. x db studio is planned — it parses, and exits X_NOT_IMPLEMENTED naming /_x's db panel
x mcp serve@ultimat3/mcp's 13 dev tools, over stdio or HTTPone catalog, one scope set, both transports
x doctorenvironment, ports, drift, PWA prerequisitesevery finding carries a fix command
x deploycontainer deploy plancompose or helm; zero platform primitives
x manifest / x routesgenerated factsx.manifest.json, openapi.json, route table
x actions / x queries / x entitiesthe declaration registrieslist and describe <name>, straight off the registries
x tasks list|showcron taskstimezone and next run, off registeredTasks()
x jobs ls|show|retry|cancel|drainthe queuedepth, dead letters, step traces, retry --from-step, cancel --reason, drain --to
x test [type]one of the six test types, or allsame type rule as the gate; --filter, --sample N
x env check|examplethe typed environment envSchema declaresand the .env.example rendered from it
x secrets show|init|edit|set|rotatethe committed encrypted secretsdecrypted into the envSchema variables of the same names
x policy list|explain <subject>which clause decided a permission, and whyfive packages print x policy explain as a denial's fix:
x i18n check|add|synccatalogs: gaps, a new locale, key syncall three of i18n's own error fixes name it
x errors explain <CODE> / listthe error table, programmaticallyrefuses an unregistered code instead of inventing one
x docs "<question>"the framework docs, offlineanswered from the installed packages, never the network
x fix boundary <file>the minimal cut for a crossed surface boundaryprints the plan and the git mv; never rewrites a file

Everything in CLI reference's planned table is also in the registry and exits X_NOT_IMPLEMENTED with a fix: naming the closest shipped command — "not built yet" and "not a command" are different facts.

The output contract

Every command returns one CommandResult; the human renderer and the JSON renderer are projections of it, so --json can never drift from the terminal.

X_DB_DRIFT: schema differs from migrations
  cause: table "posts" has column "publish_at" not present in any migration
  fix:   x db gen "add publish_at"
x verify --json
# {"ok":false,"command":"verify","summary":"1 of 19 steps failed","steps":[...]}

x verify steps

typecheck lint boundaries filesize package-shape errors unit contract live job e2e eval drift contract-diff budgets seo i18n manifest roadmap

Nineteen, in cost order, defined once as VERIFY_STEP_NAMES (verify-step.ts) — the summary count above is projected from that list, and the framework repo's own gate (bun run verify) runs exactly it. A step with nothing to check here reports as skipped, never as passed. Never bails early: an agent fixing three things needs all three findings from one run.

--only <step> runs one step, for an iteration loop — it prints NOT A GATE RUN in the human summary and in --json (data.notAGateRun), and it writes no floor file. The gate is this command with no flag, which is what "one command means shippable" means. There is no --skip: a knob that removes a step from a run that still calls itself the gate is the one thing this command must not offer. The exit code is non-zero if any step fails.

A committed x.verify.json is the floor, As of 2026-08: it names the steps this repo has already proved it can run, and a step it names that reports nothing is X_VERIFY_SUITE_VANISHED rather than a skip. "Nothing" is both ways a suite disappears — no files at all, and every test in the files it found skipping itself, which is read back out of bun test's own summary. x new writes one.

An app extends the gate with its own conventions, never with its own step: a file in guards/ exports a guard whose check(root) returns Finding[], and the boundaries step runs every one of them. Nothing registers a guard — the directory is the registration — and what a guard returns is held to the same error contract shipped source is (X_GUARD_INVALID, X_GUARD_FAILED, X_GUARD_FINDING_INVALID). x g guard <name> scaffolds one with its test.

Layout

FileResponsibility
bin.tsargv, stdout, exit code — nothing else
write-line.tsthe synchronous fd-1 write both published entry points use (create-ultimate's too)
dispatch.tsparse → run → render → exit; the only I/O boundary
parse.tsflags, subcommands, --json, --help, suggestions
flag-number.tsthe one integer-flag reader — --port, --workers, --shard
shell-quote.tsthe one POSIX quoter for a value pasted into a fix: or a reproduce line
output.tsone data shape, two renderers, the 3-line error format
registry.tsthe one command list
generate-kinds.tswhich generators exist, and how a command line names one
guards.tsthe app's own conventions: guards/ discovered, run, and held to the error contract
cmd-*.tsone command group each
templates/scaffolding as typed string modules, not copied fixtures
app-load.tsimport an app's modules so the framework registries hold it
app-manifest.tsx.manifest.json, projected by @ultimat3/manifest
app-openapi.tsopenapi.json, projected by @ultimat3/action
app-boundaries.tsapp import boundaries, over @ultimat3/render's surface check
app-agents-md.tsAGENTS.md exists and stays short, over @ultimat3/manifest's check
serve.tswhat a container startsrunRole(options), the same boot x dev runs minus the watcher, /_x and dev: true. x new's apps/web/server.ts is three lines that call it
prerender.tsx build --target static: which site/ routes qualify, and where the bytes land
metrics-endpoint.tsthe METRICS_PATH scrape listener every role opens, on METRICS_PORT
otlp-export.tsthe exporters OTEL_EXPORTER_OTLP_ENDPOINT switches on, and their drain hooks
dev-*.tswhat x dev boots: services, runtime, routes, hooks, roles, the /_x mount
island-bundle.tsevery *.island.tsx built as its own entry point, content-hashed
island-routes.tsthe one route those chunks are served from, in dev and in the container
mcp-host.tsthe shell-side half of @ultimat3/mcp's dev server — db, tests, logs, verify
verify-step.tsthe step shape, the step names, the host-check hook
verify-tests.tsone bun test invocation per test type
workspace-checks.tsfile-size ceiling and package contract files
drift.ts budgets.tsthe checks x verify composes

The CLI describes an app by loading it, never by parsing it: action(), entity(), job() and defineRoute() register themselves, and x manifest, x routes and x verify read the same tables the running server reads. There is no second definition of a primitive, no second OpenAPI builder and no second surface-boundary walk anywhere in this package.

Generated file layout

x g writes into the feature slice:

apps/web/app/<feature>/{entity,repo,service,policy,errors,ui}.ts
apps/web/app/<feature>/{actions,queries,live,jobs,tasks}/<name>.ts
apps/web/{site,app}/<path>/page.tsx
apps/web/{site,app}/<path>/<name>.island.tsx     # x g island <name> --at <dir>
apps/admin/src/pages/<name>.tsx                  # x g admin:page <name> --permission p
guards/<name>.ts                                 # x g guard <name>

Every emitted source has a <file>.test.ts beside it that passes on the first run.

Errors

X_CLI_UNKNOWN_COMMAND X_CLI_BAD_FLAG X_VERIFY_FAILED X_NOT_IN_APP X_BUN_VERSION X_NOT_IMPLEMENTED X_GUARD_INVALID X_GUARD_FAILED X_GUARD_FINDING_INVALID

FAQs

Package last updated on 23 Aug 2026

Related posts