0.0.26 • Published 4 months ago
@intellegens/cornerstone-cli v0.0.26
Cornerstone TypeScript CLI Tool(s)
A command-line interface (CLI) with various utilities. The CLI is built using yargs and supports the following commands:
Getting started
- Install dependencies:
npm install
Available scripts
build
: Compiles the TypeScript code
npm run build
cli
: Runs the CLI in development mode using tsx
npm run cli <command> [options]
Install and run
npm install -g @intellegens/cornerstone-cli
cornerstone-ts <command> [options]
API reference
Zod Schema Generator
Generates Zod schemas from JSON schema files, preserving namespace structure.
# Development
npm run cli zod-gen --input <input-dir> --output <output-dir>
# After building
./dist/utils/cli/index.js zod-gen --input <input-dir> --output <output-dir>
Options:
--input, -i
: Path to the folder containing JSON schemas--output, -o
: Path to the folder where Zod schemas will be saved
The command will:
- Read JSON schema files from the input directory
- Create a folder structure matching the type's namespace
- Generate Zod schemas with proper type names
- Save the generated schemas in their respective namespace folders
For example, if you have a JSON schema file named MyCompany.ModuleA.Models.User.json
, it will:
- Create directories:
output-dir/MyCompany/ModuleA/Models/
- Generate and save
User.ts
in that directory with the Zod schema
0.0.26
4 months ago
0.0.25
4 months ago
0.0.24
5 months ago
0.0.23
5 months ago
0.0.22
5 months ago
0.0.21
6 months ago
0.0.20
6 months ago
0.0.19
6 months ago
0.0.18
6 months ago
0.0.17
7 months ago
0.0.16
7 months ago
0.0.15
7 months ago
0.0.14
7 months ago
0.0.13
7 months ago
0.0.12
7 months ago
0.0.11
7 months ago
0.0.10
7 months ago
0.0.9
7 months ago
0.0.8
7 months ago
0.0.7
7 months ago
0.0.6
7 months ago