@criterionx/cli
v0.3.5
Published
CLI for scaffolding Criterion decisions
Maintainers
Readme
@criterionx/cli
CLI for scaffolding Criterion decisions.
Installation
npm install -g @criterionx/cli
# or
npx @criterionx/cliCommands
criterion init
Initialize a new Criterion project with example decision.
criterion init
criterion init --dir my-project
criterion init --no-installCreates:
package.jsonwith dependenciestsconfig.jsonconfigured for ESMsrc/decisions/transaction-risk.ts- Example decisionsrc/index.ts- Example usage
criterion new decision <name>
Generate a new decision boilerplate.
criterion new decision user-eligibility
criterion new decision LoanApproval
criterion new decision "payment risk" --dir src/decisionsCreates a decision file with:
- Input/output/profile schemas
- Default rule
- TODO comments for customization
criterion new profile <name>
Generate a new profile template.
criterion new profile us-standard
criterion new profile eu-premiumcriterion list (coming soon)
List all decisions in the project.
criterion validate (coming soon)
Validate all decisions in the project.
Example Workflow
# 1. Create new project
criterion init --dir my-decisions
cd my-decisions
# 2. Generate decisions
criterion new decision loan-approval
criterion new decision fraud-detection
# 3. Run your code
npx tsx src/index.tsLicense
MIT
