CLI Commands
The LUMOS CLI (lumos) provides commands for code generation, validation, and schema evolution.
Installation
Section titled “Installation”cargo install lumos-cliVerify installation:
lumos --version# Output: lumos-cli 0.1.0lumos generate
Section titled “lumos generate”Generate Rust and TypeScript code from a .lumos schema file.
lumos generate <SCHEMA_FILE> [OPTIONS]Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output directory for generated files | Current directory |
--lang | -l | Target languages (comma-separated) | rust,typescript |
--target | -t | Target framework (auto, native, anchor) | auto |
--watch | -w | Watch for changes and regenerate | false |
--dry-run | -n | Preview changes without writing files | false |
--backup | -b | Create backup before overwriting | false |
--show-diff | -d | Show diff and ask for confirmation | false |
--help | -h | Print help information | - |
Supported languages: rust (rs), typescript (ts), python (py), go, ruby (rb)
Target frameworks:
auto- Detect based on#[account]attribute (default)native- Force pure Borsh, no Anchor dependenciesanchor- Use Anchor framework (requires#[account])
Examples
Section titled “Examples”Basic generation:
lumos generate schema.lumosGenerates:
./generated.rs- Rust structs and enums./generated.ts- TypeScript interfaces + Borsh schemas
Custom output directory:
lumos generate schema.lumos -o ./src/generatedMulti-language generation:
# Generate Rust, TypeScript, and Pythonlumos generate schema.lumos --lang rust,typescript,python
# Generate all supported languageslumos generate schema.lumos --lang rust,typescript,python,go,rubyForce native Solana mode:
lumos generate schema.lumos --target nativeWatch mode for development:
lumos generate schema.lumos --watch# Watches for changes and regenerates automaticallySafe file operations:
# Preview changes without writinglumos generate schema.lumos --dry-run
# Create backup before overwritinglumos generate schema.lumos --backup
# Show diff and confirm before writinglumos generate schema.lumos --show-diffExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success - files generated |
| 1 | Parse error - invalid .lumos syntax |
| 2 | Transform error - unsupported types or attributes |
| 3 | I/O error - cannot write files |
Common Errors
Section titled “Common Errors”File not found:
Error: Schema file not found: schema.lumosFix: Check file path is correct.
Parse error:
Error: Failed to parse schema --> schema.lumos:5:12 |5 | level u16, | ^ expected ':'Fix: Add : after field name (level: u16).
Invalid type:
Error: Unsupported type 'f64' at line 10Fix: Use supported types only. See Type System.
lumos validate
Section titled “lumos validate”Check if a .lumos schema file has valid syntax.
lumos validate <SCHEMA_FILE>Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Examples
Section titled “Examples”Valid schema:
lumos validate schema.lumos# Output: ✓ Schema is valid# Exit code: 0Invalid schema:
lumos validate bad_schema.lumos# Output:# Error: Failed to parse schema# --> bad_schema.lumos:3:5# |# 3 | invalid syntax here# | ^^^^^^^ unexpected token# Exit code: 1Use Cases
Section titled “Use Cases”- Pre-commit hook - Validate before committing
- CI/CD pipeline - Ensure schemas are valid
- Editor integration - Real-time syntax checking
Example: Pre-commit Hook
Section titled “Example: Pre-commit Hook”#!/bin/bash# Find all .lumos filesLUMOS_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\\.lumos$')
if [ -n "$LUMOS_FILES" ]; then for file in $LUMOS_FILES; do lumos validate "$file" if [ $? -ne 0 ]; then echo "❌ Validation failed for $file" exit 1 fi done echo "✅ All schemas valid"filumos init
Section titled “lumos init”Initialize a new LUMOS project with example schema and configuration.
lumos init [PROJECT_NAME]Arguments
Section titled “Arguments”[PROJECT_NAME]- Optional directory name (defaults to current directory)
Examples
Section titled “Examples”Create new project:
lumos init my-solana-appcd my-solana-appInitialize current directory:
mkdir my-project && cd my-projectlumos initGenerated Files
Section titled “Generated Files”my-solana-app/├── schema.lumos # Example schema├── lumos.toml # Configuration file└── README.md # Getting started guideschema.lumos (example):
#[solana]#[account]struct PlayerAccount { wallet: PublicKey, level: u16, experience: u64,}lumos.toml (configuration):
[generation]rust_output = "generated.rs"typescript_output = "generated.ts"format = true
[imports]rust_prelude = truelumos check
Section titled “lumos check”Verify that generated code is up-to-date with schema.
lumos check <SCHEMA_FILE>Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Examples
Section titled “Examples”Schema and generated files match:
lumos check schema.lumos# Output: ✓ Generated files are up-to-date# Exit code: 0Schema changed, need regeneration:
lumos check schema.lumos# Output: ⚠️ Generated files are outdated# Run: lumos generate schema.lumos# Exit code: 1Generated files missing:
lumos check schema.lumos# Output: ⚠️ Generated files not found# Run: lumos generate schema.lumos# Exit code: 1Use Cases
Section titled “Use Cases”- CI/CD Pipeline - Ensure developers ran
generatebefore committing - Build Scripts - Automatically regenerate if needed
- Pre-build Hook - Verify code is current
Example: package.json Script
Section titled “Example: package.json Script”{ "scripts": { "prebuild": "lumos check schema.lumos || lumos generate schema.lumos", "build": "anchor build" }}Example: GitHub Actions
Section titled “Example: GitHub Actions”name: Check LUMOS Schemas
on: [push, pull_request]
jobs: check-schemas: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install LUMOS CLI run: cargo install lumos-cli
- name: Check schemas are up-to-date run: | for schema in $(find . -name "*.lumos"); do lumos check "$schema" doneSchema Evolution Commands
Section titled “Schema Evolution Commands”These commands help you manage schema changes and migrations between versions.
lumos diff
Section titled “lumos diff”Compare two schema files and show differences.
lumos diff <SCHEMA1> <SCHEMA2> [OPTIONS]Arguments
Section titled “Arguments”<SCHEMA1>- Path to the first (older) schema file<SCHEMA2>- Path to the second (newer) schema file
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or json) | text |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Compare two versions:
lumos diff schema-v1.lumos schema-v2.lumosOutput (text):
Schema Differences==================
+ Added struct: PlayerStats - level: u16 - experience: u64
~ Modified struct: PlayerAccount + Added field: stats (PlayerStats) - Removed field: score (u32)
- Removed enum: OldStatusJSON output for scripting:
lumos diff schema-v1.lumos schema-v2.lumos --format json{ "added": [ { "type": "struct", "name": "PlayerStats" } ], "modified": [ { "type": "struct", "name": "PlayerAccount", "changes": { "added_fields": ["stats"], "removed_fields": ["score"] } } ], "removed": [ { "type": "enum", "name": "OldStatus" } ]}lumos check-compat
Section titled “lumos check-compat”Check backward compatibility between two schema versions.
lumos check-compat <FROM_SCHEMA> <TO_SCHEMA> [OPTIONS]Arguments
Section titled “Arguments”<FROM_SCHEMA>- Path to the old schema file (v1)<TO_SCHEMA>- Path to the new schema file (v2)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or json) | text |
--verbose | -v | Show detailed explanations | false |
--strict | -s | Treat warnings as errors | false |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Check compatibility:
lumos check-compat schema-v1.lumos schema-v2.lumosOutput (compatible):
✓ Schema is backward compatible
Changes detected: - Added optional field: PlayerAccount.nickname (Option<String>) - Added struct: AchievementData
These changes are safe for existing on-chain accounts.Output (breaking changes):
✗ Schema has breaking changes
Breaking changes detected: ✗ Changed field type: PlayerAccount.score (u32 → u64) Reason: Different byte size (4 → 8 bytes) Impact: Existing accounts cannot be deserialized
✗ Removed field: PlayerAccount.legacy_data Reason: Field removal changes Borsh layout Impact: Data corruption on deserialization
Run 'lumos migrate' to generate migration code.Verbose mode for CI/CD:
lumos check-compat old.lumos new.lumos --verbose --strictUse Cases
Section titled “Use Cases”- Pre-merge check - Validate schema changes in PR
- Release validation - Ensure new version won’t break production
- CI/CD pipeline - Automated compatibility testing
Example: GitHub Actions
Section titled “Example: GitHub Actions”- name: Check Schema Compatibility run: | lumos check-compat main-schema.lumos pr-schema.lumos --strictlumos migrate
Section titled “lumos migrate”Generate migration code from one schema version to another.
lumos migrate <FROM_SCHEMA> <TO_SCHEMA> [OPTIONS]Arguments
Section titled “Arguments”<FROM_SCHEMA>- Path to the old schema file (v1)<TO_SCHEMA>- Path to the new schema file (v2)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output file path | stdout |
--language | -l | Target language (rust, typescript, both) | both |
--dry-run | -n | Show changes without generating code | false |
--force | -f | Force generation for unsafe migrations | false |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Preview migration (dry run):
lumos migrate schema-v1.lumos schema-v2.lumos --dry-runOutput:
Migration: schema-v1.lumos → schema-v2.lumos
Required migrations: 1. PlayerAccount.score: u32 → u64 - Requires account reallocation (+4 bytes) - Safe: value range expansion
2. PlayerAccount.stats: (new field) - Requires account reallocation (+10 bytes) - Default value needed
Generated files (dry run): - migration.rs (Rust migration instruction) - migration.ts (TypeScript client helper)Generate Rust migration:
lumos migrate schema-v1.lumos schema-v2.lumos -l rust -o migration.rsGenerated migration.rs:
use anchor_lang::prelude::*;
/// Migration from v1 to v2pub fn migrate_player_account( old_data: &[u8], new_account: &mut PlayerAccountV2,) -> Result<()> { // Read old format let old = PlayerAccountV1::try_from_slice(old_data)?;
// Transform to new format new_account.wallet = old.wallet; new_account.score = old.score as u64; // Safe upcast new_account.stats = PlayerStats::default(); // New field
Ok(())}Generate TypeScript migration:
lumos migrate schema-v1.lumos schema-v2.lumos -l typescript -o migration.tsForce unsafe migration:
lumos migrate schema-v1.lumos schema-v2.lumos --forceAccount Analysis Commands
Section titled “Account Analysis Commands”lumos check-size
Section titled “lumos check-size”Analyze account sizes and check against Solana limits.
lumos check-size <SCHEMA_FILE> [OPTIONS]Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or json) | text |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Check account sizes:
lumos check-size schema.lumosOutput:
Account Size Analysis=====================
PlayerAccount wallet: PublicKey 32 bytes level: u16 2 bytes experience: u64 8 bytes username: String 36 bytes (4 + 32 max) ───────────────────────────────── Total: 78 bytes Status: ✓ Within Solana limit (10,240 bytes)
GameState (enum) Discriminant: 1 byte Active: 0 bytes (unit variant) Paused: 0 bytes (unit variant) Finished { winner }: 32 bytes (PublicKey) ───────────────────────────────── Max size: 33 bytesJSON output for tooling:
lumos check-size schema.lumos --format json{ "accounts": [ { "name": "PlayerAccount", "size": 78, "fields": [ { "name": "wallet", "type": "PublicKey", "size": 32 }, { "name": "level", "type": "u16", "size": 2 }, { "name": "experience", "type": "u64", "size": 8 }, { "name": "username", "type": "String", "size": 36 } ], "within_limit": true } ]}Use Cases
Section titled “Use Cases”- Pre-deployment check - Verify accounts fit within Solana’s 10KB limit
- Cost estimation - Calculate rent costs based on size
- Optimization - Identify fields consuming most space
Security Commands
Section titled “Security Commands”lumos security analyze
Section titled “lumos security analyze”Analyze schema for common Solana vulnerabilities.
lumos security analyze <SCHEMA_FILE> [OPTIONS]Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or json) | text |
--strict | -s | Enable strict mode (more aggressive warnings) | false |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Basic security analysis:
lumos security analyze schema.lumosOutput:
Security Analysis=================
⚠️ WARNING: PlayerAccount Missing signer field - consider adding owner/authority Recommendation: Add `authority: PublicKey` for access control
⚠️ WARNING: TransferInstruction Large integer field `amount: u128` - potential overflow risk Recommendation: Validate bounds in program logic
✓ GameState: No issues found
Summary: 2 warnings, 0 errorsStrict mode for production:
lumos security analyze schema.lumos --strictJSON output for CI/CD:
lumos security analyze schema.lumos --format json{ "warnings": [ { "type": "MissingSignerField", "account": "PlayerAccount", "message": "Missing signer field", "recommendation": "Add authority: PublicKey for access control" } ], "errors": [], "summary": { "warnings": 2, "errors": 0 }}Detected Vulnerabilities
Section titled “Detected Vulnerabilities”| Issue | Description | Severity |
|---|---|---|
| Missing signer | No authority/owner field | Medium |
| Integer overflow | Large integers without bounds | Medium |
| Unchecked owner | Account lacks ownership validation | High |
| PDA seed issues | Insecure PDA derivation patterns | High |
| Reentrancy risk | State changes before external calls | High |
lumos audit generate
Section titled “lumos audit generate”Generate security audit checklist from schema.
lumos audit generate <SCHEMA_FILE> [OPTIONS]Arguments
Section titled “Arguments”<SCHEMA_FILE>- Path to the.lumosschema file (required)
Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output file path | SECURITY_AUDIT.md |
--format | -f | Output format (markdown or json) | markdown |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate audit checklist:
lumos audit generate schema.lumos# Creates: SECURITY_AUDIT.mdCustom output file:
lumos audit generate schema.lumos -o docs/audit-checklist.mdGenerated SECURITY_AUDIT.md:
# Security Audit Checklist
Generated from: schema.lumosDate: 2025-12-08
## Account: PlayerAccount
### Access Control- [ ] Verify owner validation in all instructions- [ ] Check signer requirements for mutations- [ ] Validate authority field matches expected signer
### Data Validation- [ ] Validate `level` bounds (u16: 0-65535)- [ ] Validate `experience` doesn't overflow- [ ] Sanitize `username` string input
### State Management- [ ] Check for reentrancy vulnerabilities- [ ] Verify account initialization logic- [ ] Validate account closure cleanup
## Enum: GameState- [ ] Verify all variant transitions are valid- [ ] Check discriminant handlingFuzz Testing Commands
Section titled “Fuzz Testing Commands”lumos fuzz generate
Section titled “lumos fuzz generate”Generate fuzz testing targets for types.
lumos fuzz generate <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output directory for fuzz targets | fuzz/ |
--type-name | -t | Specific type to generate target for | All types |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate fuzz targets for all types:
lumos fuzz generate schema.lumosOutput:
Generated fuzz targets: fuzz/fuzz_targets/player_account.rs fuzz/fuzz_targets/game_state.rs fuzz/Cargo.tomlGenerate for specific type:
lumos fuzz generate schema.lumos --type-name PlayerAccountlumos fuzz run
Section titled “lumos fuzz run”Run fuzzing for a specific type.
lumos fuzz run <SCHEMA_FILE> --type-name <TYPE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--type-name | -t | Type to fuzz (required) | - |
--jobs | -j | Number of parallel jobs | 1 |
--max-time | -m | Maximum run time in seconds | Unlimited |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Run fuzzing:
lumos fuzz run schema.lumos --type-name PlayerAccountParallel fuzzing with timeout:
lumos fuzz run schema.lumos -t PlayerAccount -j 4 --max-time 3600lumos fuzz corpus
Section titled “lumos fuzz corpus”Generate corpus files for fuzzing.
lumos fuzz corpus <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output directory for corpus | fuzz/corpus/ |
--type-name | -t | Specific type to generate corpus for | All types |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate corpus for all types:
lumos fuzz corpus schema.lumosOutput:
Generated corpus files: fuzz/corpus/player_account/ seed_1.bin seed_2.bin seed_3.bin fuzz/corpus/game_state/ seed_1.binAnchor Framework Commands
Section titled “Anchor Framework Commands”Commands for Anchor framework integration.
lumos anchor generate
Section titled “lumos anchor generate”Generate complete Anchor program from LUMOS schema.
lumos anchor generate <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output directory | Current directory |
--name | -n | Program name | Derived from schema |
--version | -V | Program version | 0.1.0 |
--address | -a | Program address (optional) | - |
--typescript | Generate TypeScript client | false | |
--dry-run | Preview without writing files | false | |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate Anchor program:
lumos anchor generate schema.lumosOutput:
Generated Anchor program: programs/my_program/ src/lib.rs # Program with #[derive(Accounts)] src/state.rs # Account structs with space constants Cargo.toml target/idl/ my_program.json # Anchor IDLFull project with TypeScript client:
lumos anchor generate schema.lumos \ --name my_defi_app \ --version 1.0.0 \ --address "MyProgram111111111111111111111111111111111" \ --typescriptPreview generation:
lumos anchor generate schema.lumos --dry-runGenerated Code Features
Section titled “Generated Code Features”#[derive(Accounts)]contexts for each instruction- Account
LENconstants for space calculation - Anchor IDL JSON for client generation
- Optional TypeScript client with typed methods
lumos anchor idl
Section titled “lumos anchor idl”Generate Anchor IDL from LUMOS schema.
lumos anchor idl <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output file path | target/idl/<program>.json |
--name | -n | Program name | Derived from schema |
--version | -V | Program version | 0.1.0 |
--address | -a | Program address (optional) | - |
--pretty | -p | Pretty print JSON | false |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate IDL:
lumos anchor idl schema.lumosPretty printed with custom name:
lumos anchor idl schema.lumos --name my_program --prettyGenerated IDL structure:
{ "version": "0.1.0", "name": "my_program", "instructions": [...], "accounts": [...], "types": [...], "errors": [...]}lumos anchor space
Section titled “lumos anchor space”Calculate Anchor account space constants.
lumos anchor space <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or rust) | text |
--account | -a | Specific account type | All accounts |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Calculate space for all accounts:
lumos anchor space schema.lumosOutput (text):
Account Space Constants=======================
PlayerAccount: DISCRIMINATOR: 8 bytes wallet: 32 bytes level: 2 bytes experience: 8 bytes username: 36 bytes (4 + 32) ───────────────────────── TOTAL (LEN): 86 bytesRust constants output:
lumos anchor space schema.lumos --format rustimpl PlayerAccount { pub const LEN: usize = 8 // discriminator + 32 // wallet: Pubkey + 2 // level: u16 + 8 // experience: u64 + 36; // username: String (4 + 32)}Specific account:
lumos anchor space schema.lumos --account PlayerAccountMetaplex Commands
Section titled “Metaplex Commands”Commands for Metaplex Token Metadata integration.
lumos metaplex validate
Section titled “lumos metaplex validate”Validate schema against Metaplex Token Metadata standards.
lumos metaplex validate <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (text or json) | text |
--verbose | -v | Show all validations | false |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Validate NFT metadata schema:
lumos metaplex validate nft-schema.lumosOutput:
Metaplex Validation===================
✓ NftMetadata.name: Valid (length ≤ 32)✓ NftMetadata.symbol: Valid (length ≤ 10)✓ NftMetadata.uri: Valid (length ≤ 200)⚠️ NftMetadata.seller_fee_basis_points: Warning Value should be 0-10000 (0% - 100%)
Creators validation:✓ Max 5 creators: Valid (3 defined)✓ Shares sum to 100: Valid (100%)
Summary: 0 errors, 1 warningMetaplex Constraints
Section titled “Metaplex Constraints”| Field | Constraint |
|---|---|
name | Max 32 characters |
symbol | Max 10 characters |
uri | Max 200 characters |
seller_fee_basis_points | 0-10000 (0% - 100%) |
creators | Max 5, shares must sum to 100 |
lumos metaplex generate
Section titled “lumos metaplex generate”Generate Metaplex-compatible code from schema.
lumos metaplex generate <SCHEMA_FILE> [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--output | -o | Output directory | Current directory |
--typescript | Generate TypeScript code | false | |
--rust | Generate Rust code | true | |
--dry-run | Preview without writing files | false | |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Generate Metaplex types:
lumos metaplex generate nft-schema.lumosGenerate both Rust and TypeScript:
lumos metaplex generate nft-schema.lumos --typescriptlumos metaplex types
Section titled “lumos metaplex types”Show standard Metaplex type definitions.
lumos metaplex types [OPTIONS]Options
Section titled “Options”| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (lumos or json) | lumos |
--help | -h | Print help information | - |
Examples
Section titled “Examples”Show LUMOS format:
lumos metaplex typesOutput:
// Standard Metaplex Token Metadata types
#[solana]struct Creator { address: PublicKey, verified: bool, share: u8,}
#[solana]struct Collection { verified: bool, key: PublicKey,}
#[solana]struct Metadata { name: String, symbol: String, uri: String, seller_fee_basis_points: u16, creators: Option<[Creator]>, collection: Option<Collection>,}JSON format for tooling:
lumos metaplex types --format jsonGlobal Options
Section titled “Global Options”Available for all commands:
| Option | Short | Description |
|---|---|---|
--help | -h | Print help information |
--version | -V | Print version information |
--verbose | -v | Enable verbose output |
--quiet | -q | Suppress non-error output |
Examples
Section titled “Examples”Verbose mode:
lumos generate schema.lumos -v# Output:# [DEBUG] Parsing schema file...# [DEBUG] Transforming AST to IR...# [DEBUG] Generating Rust code...# [DEBUG] Generating TypeScript code...# ✓ Generated 2 filesQuiet mode:
lumos generate schema.lumos -q# No output on success, only errorsEnvironment Variables
Section titled “Environment Variables”Configure LUMOS CLI behavior via environment variables:
| Variable | Description | Default |
|---|---|---|
LUMOS_OUTPUT_DIR | Default output directory | Current directory |
LUMOS_FORMAT | Enable/disable formatting | true |
LUMOS_COLOR | Enable/disable colored output | Auto-detect |
Examples
Section titled “Examples”# Disable colored outputexport LUMOS_COLOR=neverlumos generate schema.lumos
# Change default output directoryexport LUMOS_OUTPUT_DIR=./generatedlumos generate schema.lumosExit Status Summary
Section titled “Exit Status Summary”| Code | Meaning | Commands |
|---|---|---|
| 0 | Success | All |
| 1 | Parse/validation error | generate, validate, check |
| 2 | Transform error | generate |
| 3 | I/O error | generate, init |
| 4 | Outdated files | check |
Tips & Best Practices
Section titled “Tips & Best Practices”See Also
Section titled “See Also”- Type System - Supported types and mappings
- Attributes - Available schema attributes
- Generated Code - Understanding output
- Schema Versioning - Version your schemas safely
- Schema Migrations - Migration strategies and patterns