@type-x/types
v0.4.7
Published
Shared runtime-facing types for @type-x/cli and @type-x/runtime
Readme
@type-x/types
Shared types for @type-x/runtime and @type-x/cli.
This package is intentionally small. It contains the public runtime contract:
CommandContextCommandRequestCommandStoreCommandHandler- related
ui,exec,git,io, andenvtypes
Use it when you only want types. If you are already depending on @type-x/runtime, you can import the same public types from there as well.
CommandRequest["flags"] accepts scalar and repeated flag values:
Record<string, string | boolean | string[] | boolean[]>;CommandExec accepts either a shell command string or an argv tuple:
context.exec("git status --short");
context.exec(["git", "status", "--short"]);CommandStore supports top-level keys and dot paths:
context.store.set("providers.github", "hello");
context.store.get("providers.github");CommandContext.fail() reports expected user-facing failures:
context.fail("Missing token", { exitCode: 2 });