Skip to content

Set up oxa CLI NPM package #13

@nokome

Description

@nokome

Set up the main OXA CLI npm package for validating documents against the schema. Create packages/oxa/ with:

package.json

  • Package name: oxa
  • Binary: oxa
  • Dependencies: oxa-types (workspace), commander, ajv, ajv-formats, js-yaml

src/cli.ts

  • Main CLI entry point using commander
  • validate command that validates JSON/YAML files against the OXA schema
  • Support for stdin input
  • Exit codes: 0 for valid, 1 for invalid, 2 for errors

src/index.ts

  • Export validation utilities for programmatic use
  • Re-export types from oxa-types

Tasks

  • Create packages/oxa/package.json with bin entry
  • Create packages/oxa/tsconfig.json
  • Implement packages/oxa/src/cli.ts with validate command
  • Implement packages/oxa/src/index.ts with exports
  • Add build script to compile TypeScript
  • Test CLI validation against sample documents

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions