CLI Reference

The paradox CLI provides commands for type checking, code generation, formatting, interactive exploration, and language server support.

Usage

paradox COMMAND

Commands

Command Description

generate

Transpile to target language

start

Start Paradox

lsp

Paradox Language Server

clean

Clean Paradox workspace

check

Check a la carte

parse

Parse without checking

format

Format .dox source files

repl

Read Print Update Loop

atlas

Print available modules

generate

paradox generate (--haskell | --typescript | --rust | --elixir |
                  --python | --cpp | --scala | --ocaml | --java |
                  --nix | --sqlite | --postgresql |
                  --json TYPE [--out FILEPATH] |
                  --yaml TYPE [--out FILEPATH] | --spec [--out FILEPATH])
                 [--path PATH]
Option Description

--haskell

output Haskell

--typescript

output TypeScript

--rust

output Rust

--elixir

output Elixir

--python

output Python

--cpp

output C++23

--scala

output Scala 3

--ocaml

output OCaml

--java

output Java 17+

--nix

output Nix

--sqlite

output SQLite DDL

--postgresql

output PostgreSQL DDL

--json TYPE

output JSON for a given constant

--yaml TYPE

output YAML for a given constant

--spec

output typed AST as JSON

--out FILEPATH

path to write file (for --json, --yaml, --spec)

--path PATH

where are the source dox files

check

paradox check [--ast | --render] [--path PATH]
Option Description

--ast

print checked program AST

--render

print checked program as .dox

--path PATH

where are the source dox files

format

paradox format [--check | --stdout] [FILES...]
Option Description

--check

check if files are formatted (exit 1 if not)

--stdout

print formatted output to stdout

FILES…​

specific files to format (default: all .dox files)

start

paradox start [--path PATH]

Start Paradox in interactive mode.

lsp

paradox lsp

Start the Paradox Language Server (communicates over stdio).

clean

paradox clean [--path PATH]

Remove the .dox/ output directory from the workspace.

parse

paradox parse [--path PATH]

Parse .dox files without type checking. Useful for verifying syntax.

repl

paradox repl

Launch the interactive Read Print Update Loop.

atlas

paradox atlas

Print all modules available on the PARADOX_ATLAS search path. See PARADOX_ATLAS for configuration.

Common Options

--path PATH

Specify the directory containing .dox source files. Defaults to the current directory.

-h, --help

Show help text for any command.

Examples

# Type-check the current directory
paradox check

# Generate TypeScript from a specific path
paradox generate --typescript --path ./models

# Format all .dox files in place
paradox format

# Check what modules are available
paradox atlas

# Launch the REPL
paradox repl

# Start the language server
paradox lsp