<!--
Copyright (C) 2026 Ordinary Labs, LLC.

SPDX-License-Identifier: AGPL-3.0-only
-->

# Ordinary CLI

[![crates.io](https://img.shields.io/crates/v/ordinary.svg)](https://crates.io/crates/ordinary/0.8.3)
[![docs.rs](https://img.shields.io/docsrs/ordinary/0.8.3)](https://docs.rs/ordinary/0.8.3)
[![dependency status](https://deps.rs/crate/ordinary/0.8.3/status.svg)](https://deps.rs/crate/ordinary/0.8.3)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

Command line interface for Ordinary.

The Ordinary CLI is built with [Clap](https://docs.rs/clap/latest/clap/).

## Installation

Prebuilt releases are provided [here](https://codeberg.org/ordinarylabs/Ordinary/releases).

**Note:** When building from source, [`esbuild`](https://esbuild.github.io/getting-started/#install-esbuild) 
will need to be installed because it is used to bundle the 
[built-in](https://codeberg.org/ordinarylabs/Ordinary/src/branch/main/core/servers/app/assets/v1)
TypeScript/JavaScript files.

### git

```sh
## clone
git clone https://codeberg.org/ordinarylabs/Ordinary.git

## install
cargo install --path Ordinary/core/apps/cli/ --debug 
## `--debug` is optional but will make installation much faster
## and won't meaningfully impact local development performance
```

### crates.io

```sh
## ordinary CLI
cargo install ordinary@0.8.3

## OR if your platform has prebuilt binaries in <https://codeberg.org/ordinarylabs/Ordinary/releases>
cargo binstall ordinary@0.8.3
```

### Homebrew

```sh
## add the ordinarylabs tap
brew tap ordinarylabs/tap --custom-remote https://codeberg.org/ordinarylabs/homebrew-tap

## trust the ordinarylabs tap
brew trust ordinarylabs/tap

## supported for `aarch64-apple-darwin`, `aarch64-unknown-linux-gnu`, `x86_64-unknown-linux-gnu`
brew install ordinary
```

## Setup

```sh
## install system components
ordinary doctor --fix wasm,wasm-opt,exiftool
```

## Quick Start

Create and build new project `example.com`.

```sh
ordinary new example.com 
ordinary build -p example.com
```

Run new project at <http://localhost:4433>.

```sh
ordinary start -p example.com --insecure --stdio-logs
```

## CLI Documentation

```sh
ordinary --help
```

See: [docs/cli-reference.md](https://codeberg.org/ordinarylabs/Ordinary/src/branch/main/core/apps/cli/docs/cli-reference.md).

## CLI Completions

Add this line to your `.zshrc`, `.bashrc`, etc. to gain support for dynamic tab completions. 

```sh
## ~/.bashrc
eval "$(COMPLETE='bash' ordinary)"

## ~/.zshrc
eval "$(COMPLETE='zsh' ordinary)"
```

See: [clap_complete](https://docs.rs/clap_complete/latest/clap_complete/env/index.html).

## License

Copyright 2026 Ordinary Labs, LLC

Licensed under the GNU `AGPLv3`: <https://www.gnu.org/licenses/agpl-3.0.html>

## Security

THIS CODE HAS NOT BEEN AUDITED OR REVIEWED. USE AT YOUR OWN RISK.

Refer to the [Security Policy](https://codeberg.org/ordinarylabs/Ordinary/src/branch/main/SECURITY.md).
