oxur-cli
Unified CLI infrastructure for Oxur.
Overview
This crate provides two things:
-
Library: Common utilities for building Oxur CLI tools
- File I/O helpers (stdin/stdout/file handling)
- Colored terminal output (success, error, info, warnings)
- Progress tracking for long-running operations
-
Binary: The unified
oxurcommand-line tool- Compiling and running Oxur programs
- Starting the REPL
- Managing Oxur projects
Library Usage
All Oxur CLI tools use this library for consistency.
Add Dependency
[]
= { = "../oxur-cli" }
File I/O
use ;
use PathBuf;
// Read from file or stdin (-)
let content = read_input?;
// Process...
// Write to file or stdout (-)
write_output?;
Colored Output
use ;
info;
// ... work ...
success;
// Or with errors:
error;
warning;
Progress Tracking
use ProgressTracker;
let mut progress = new;
progress.step;
// ... work ...
progress.done;
progress.step;
// ... work ...
progress.done;
progress.success;
Binary Usage
The oxur binary provides unified access to Oxur functionality.
Compile
Compile an Oxur file to a native binary.
Run
Compile and run an Oxur file with arguments.
REPL
Start the interactive REPL.
New
Create a new Oxur project with standard structure.
Build
Build the current project.
Test
Run tests in the current project.
Development
Build Library
Build Binary
Run Tests
Architecture
oxur-cli
├── Library (common utilities)
│ ├── io - File I/O helpers
│ ├── output - Colored terminal output
│ └── progress - Progress tracking
│
└── Binary (unified CLI)
└── main - Entry point for `oxur` command
License
MIT OR Apache-2.0