@isl-lang/cli
v0.1.0
Published
Command-line interface for ISL (Intent Specification Language)
Downloads
22
Maintainers
Readme
@isl-lang/cli
Command-line interface for ISL (Intent Specification Language).
Installation
# Global installation (recommended)
npm install -g @isl-lang/cli
# Or use npx
npx @isl-lang/cli <command>Quick Start
# Initialize a new ISL project
isl init my-project
# Parse and validate ISL files
isl check specs/*.isl
# Generate code
isl generate --target typescript specs/
# Start the REPL
isl repl
# Get help
isl --helpCommands
isl init [name]
Initialize a new ISL project with recommended structure.
isl init my-api
cd my-apiCreates:
isl.config.yaml- Project configurationspecs/- Directory for ISL specificationsgenerated/- Output directory for generated code
isl check <files...>
Parse and type-check ISL files.
isl check specs/*.isl
isl check --strict specs/Options:
--strict- Enable strict mode (all warnings become errors)--format <format>- Output format (text, json, sarif)
isl generate <files...>
Generate code from ISL specifications.
# Generate TypeScript
isl generate --target typescript specs/
# Generate Python
isl generate --target python --output src/generated specs/
# Generate OpenAPI
isl generate --target openapi specs/api.islOptions:
--target, -t- Target language (typescript, python, rust, go, openapi, graphql)--output, -o- Output directory--config, -c- Config file path
isl verify <files...>
Formally verify ISL specifications.
isl verify specs/critical-flow.islisl repl
Start an interactive REPL for exploring ISL.
isl replisl format <files...>
Format ISL files.
isl format specs/*.isl --writeisl lsp
Start the Language Server Protocol server.
isl lsp --stdioConfiguration
Create isl.config.yaml in your project root:
version: 1
# Default generation target
target: typescript
# Output directory
output: ./generated
# Include paths for imports
include:
- ./specs
- ./node_modules/@company/shared-specs
# Generation options
codegen:
typescript:
runtime: true
validators: true
python:
framework: fastapi
pydantic: v2Environment Variables
ISL_CONFIG- Path to config fileISL_DEBUG- Enable debug outputISL_NO_COLOR- Disable colored output
Documentation
Full documentation: https://isl-lang.dev/docs/cli
Related Packages
- @isl-lang/parser - ISL parser
- @isl-lang/codegen - Code generators
- @isl-lang/repl - Interactive REPL
License
MIT
