Monorepo for the x command runtime, the standalone runtime package, and the shared types.
cliPublished as@type-x/cli. This is thexbinary.packages/runtimePublished as@type-x/runtime. Use this to build a standalone CLI with the same runtime context.packages/typesPublished as@type-x/types. Shared runtime-facing types.
Install workspace dependencies:
pnpm installBuild everything once:
pnpm buildThe usual CLI loop is:
pnpm --filter @type-x/cli build --watch
alias x-dev='node /absolute/path/to/type-x/cli/dist/src/cli.js'Then use it like:
x-dev --help
x-dev init demo
x-dev init demo-standalone --standaloneUseful package-level commands:
pnpm --filter @type-x/runtime test
pnpm --filter @type-x/cli test
pnpm --filter @type-x/cli lint
pnpm --filter @type-x/runtime lint@type-x/cliinstalls and runsxpackages declared through thexfield inpackage.json@type-x/runtimeis for normal npm CLIs that want the same injected context without requiring globalx@type-x/typeskeeps the runtime contract small and shareable
The x CLI supports npm-style package sources, including custom registries and
private packages. Example:
x add @acme/private-tool --registry https://npm.pkg.github.com --token-env GITHUB_TOKEN
x upgrade @acme/private-toolx upgrade reuses the package source settings from the original install, so you
do not need to pass the registry again. Token values are never stored.
You can also pass a token directly for a one-shot install or upgrade:
x add @acme/private-tool --registry https://npm.pkg.github.com --token "$GITHUB_TOKEN"