Ovie

CLI Reference

Complete guide to Ovie command-line tools

🏆 Self-Hosted CLI!

The Ovie CLI tools are powered by the self-hosted compiler - a compiler written in Ovie itself!

Overview

The Ovie CLI provides a comprehensive set of tools for developing, building, testing, and managing Ovie projects. All commands are designed to be intuitive and follow consistent patterns.

💡 Getting Help

Use ovie --help or ovie <command> --help to get detailed information about any command.

Basic Commands

ovie --version Info

Display the Ovie version and build information.

ovie --version

Example output:

Ovie Programming Language v1.0.0
Self-hosted compiler (written in Ovie)
Build: 2026-01-30
Target: x86_64-unknown-linux-gnu
ovie --help Info

Show help information and available commands.

ovie --help

Project Management

ovie new Project

Create a new Ovie project with the standard directory structure.

ovie new <project-name> [options]
Option Description Default
--template <name> Use a specific project template basic
--lib Create a library project false
--bin Create a binary project true

Examples:

ovie new my-app
ovie new my-lib --lib
ovie new web-server --template web
ovie init Project

Initialize an Ovie project in the current directory.

ovie init [options]
Option Description
--name <name> Set the project name
--force Overwrite existing files

Building and Running

ovie run Execute

Compile and run an Ovie program or project.

ovie run [file] [options]
Option Description
--release Build in release mode (optimized)
--target <target> Specify compilation target
--args <args> Pass arguments to the program

Examples:

ovie run                    # Run current project
ovie run main.ov           # Run specific file
ovie run --release         # Run optimized build
ovie run --args "arg1 arg2" # Pass arguments
ovie build Build

Compile an Ovie project without running it.

ovie build [options]
Option Description
--release Build in release mode
--target <target> Compilation target
--output <path> Output file path
--verbose Verbose compilation output
ovie check Validate

Check code for errors without building.

ovie check [file] [options]
Option Description
--all Check all files in project
--json Output results in JSON format

Testing

ovie test Test

Run tests for the current project.

ovie test [pattern] [options]
Option Description
--release Run tests in release mode
--verbose Show detailed test output
--parallel Run tests in parallel
--coverage Generate code coverage report

Examples:

ovie test                  # Run all tests
ovie test math             # Run tests matching "math"
ovie test --coverage       # Run with coverage report
ovie bench Test

Run benchmark tests.

ovie bench [pattern] [options]
Option Description
--save-baseline Save results as baseline
--compare Compare with baseline

Code Quality

ovie fmt Format

Format Ovie source code according to style guidelines.

ovie fmt [files] [options]
Option Description
--check Check if files are formatted
--diff Show formatting differences
ovie lint Quality

Run the Aproko code assistant for style and quality checks.

ovie lint [files] [options]
Option Description
--fix Automatically fix issues
--strict Enable strict mode

Package Management

ovie add Package

Add a dependency to the current project.

ovie add <package> [options]
Option Description
--dev Add as development dependency
--version <ver> Specify package version
ovie remove Package

Remove a dependency from the current project.

ovie remove <package>
ovie update Package

Update project dependencies.

ovie update [package]

Development Workflow

Here's a typical development workflow using the Ovie CLI:

1

Create Project

ovie new my-app

2

Write Code

Edit src/main.ov

3

Check Code

ovie check

4

Run Tests

ovie test

5

Format Code

ovie fmt

6

Build Release

ovie build --release

Configuration

The Ovie CLI can be configured through the ovie.toml file in your project root:

[project]
name = "my-app"
version = "1.0.0"
authors = ["Your Name <you@example.com>"]

[build]
target = "native"
optimization = "speed"
debug_info = true

[dependencies]
# Add dependencies here

[dev-dependencies]
# Add development dependencies here

[features]
aproko = true
self_hosting = true

Environment Variables

The Ovie CLI respects these environment variables:

Variable Description Default
OVIE_HOME Ovie installation directory Auto-detected
OVIE_CACHE Compilation cache directory ~/.cache/ovie
OVIE_LOG Logging level info
OVIE_TARGET Default compilation target native

🚀 Pro Tips

  • Use ovie check frequently during development for fast feedback
  • Set up ovie fmt in your editor for automatic formatting
  • Use ovie test --coverage to ensure good test coverage
  • The --verbose flag provides detailed output for debugging

CLI powered by the self-hosted Ovie compiler 🎉

For more help, visit our Community Discussions