@shell-shock/schema
v0.0.15
Published
A Power Plant schema package describing the Shell Shock command tree specification.
Maintainers
Readme
Shell Shock - Schema Package
A Power Plant schema package for the Shell Shock command tree specification.
Validates a Record<string, CommandTree> document — the same shape as context.commands in @shell-shock/core. Individual nodes match the CommandTree type (options, args, parent, children, plus required metadata).
Quick Features
- Zod schemas for the Shell Shock command tree.
- Power Plant document
command-schemaversion1.0. - Parameter types are
string,number, andboolean.
Installation
Add @shell-shock/schema with the workspace:* protocol and run pnpm install from the repository root.
The repository README says a public registry release is still pending. In this workspace, depend on the package with workspace:*.
Usage
import commandSchema, {
commandTreeSchema,
commandsSchema,
type CommandTree,
type Commands
} from "@shell-shock/schema";
import { defineGenerator } from "@power-plant/core";
export default defineGenerator({
schema: commandSchema,
generator: async (commands: Commands, options) => {
// generate from the command tree
}
});See also: Power Plant schemas.
Development
Run pnpm install from the repository root. packages/schema/project.json names the project schema and does not declare a test target.
