oxur-cli

Crates.iooxur-cli
lib.rsoxur-cli
version0.2.0
created_at2026-01-03 17:50:57.049915+00
updated_at2026-01-17 00:33:05.151833+00
descriptionCLI infrastructure and unified command-line tool for Oxur
homepage
repositoryhttps://github.com/oxur/oxur
max_upload_size
id2020521
size395,099
Duncan McGreggor (oubiwann)

documentation

README

oxur-cli

Unified CLI infrastructure for Oxur.

Overview

This crate provides two things:

  1. 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
  2. Binary: The unified oxur command-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

[dependencies]
oxur-cli = { path = "../oxur-cli" }

File I/O

use oxur_cli::common::io::{read_input, write_output};
use std::path::PathBuf;

// Read from file or stdin (-)
let content = read_input(&PathBuf::from("input.txt"))?;

// Process...

// Write to file or stdout (-)
write_output(&result, Some(&PathBuf::from("output.txt")))?;

Colored Output

use oxur_cli::common::output::{success, error, info, warning};

info("Processing files...");
// ... work ...
success("All files processed!");

// Or with errors:
error("Failed to process file");
warning("Skipping invalid entry");

Progress Tracking

use oxur_cli::common::progress::ProgressTracker;

let mut progress = ProgressTracker::new(verbose);

progress.step("Loading data");
// ... work ...
progress.done();

progress.step("Processing data");
// ... work ...
progress.done();

progress.success("All done!");

Binary Usage

The oxur binary provides unified access to Oxur functionality.

Compile

oxur compile input.ox -o output

Compile an Oxur file to a native binary.

Run

oxur run input.ox -- arg1 arg2

Compile and run an Oxur file with arguments.

REPL

oxur repl

Start the interactive REPL.

New

oxur new my-project

Create a new Oxur project with standard structure.

Build

oxur build
oxur build --release

Build the current project.

Test

oxur test

Run tests in the current project.

Development

Build Library

cargo build --lib

Build Binary

cargo build --bin oxur --features binary

Run Tests

cargo test

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

Commit count: 489

cargo fmt