CLI Reference

Installation🔗

macOS and Linux:

curl -sSf https://dogma.ws/install.sh | sh

Windows:

irm https://dogma.ws/install.ps1 | iex

The installer downloads the latest release from the Dogma registry and adds dogma to ~/.dogma/bin. Add that directory to your PATH if prompted.


dogma init🔗

Initialise a new Dogma package.

dogma init [OPTIONS] [PATH]
OptionDescription
--name <NAME>Package name (defaults to directory name)
[PATH]Directory to initialise (defaults to .)

Creates dogma.toml and src/main.dg.


dogma add🔗

Add a dependency to dogma.toml.

dogma add <PACKAGE> [OPTIONS]
OptionDescription
<PACKAGE>Package name, e.g. dogma:core or my-lib
--version <VERSION>Version requirement, e.g. "^1.0"
--git <URL>Add as a git dependency
--branch <BRANCH>Git branch to use
--tag <TAG>Git tag to use
--path <PATH>Add as a local path dependency

dogma install🔗

Install dependencies listed in dogma.toml, or install a package globally.

dogma install [PACKAGE] [OPTIONS]
OptionDescription
[PACKAGE]Package name to install globally
--globalInstall as a globally available binary
--path <PATH>Install from local path
--git <URL>Install from git URL
--rev <REV>Git revision to install
--registry <URL>Custom registry URL (default: https://registry.dogma.ws)

dogma uninstall🔗

Remove a globally installed package.

dogma uninstall <PACKAGE>

dogma check🔗

Type-check a Dogma source file without running it.

dogma check <FILE>

Exits with code 0 on success, non-zero if type errors are found.


dogma build🔗

Build a Dogma package.

dogma build

dogma run🔗

Run a Dogma program.

dogma run <FILE>

dogma register🔗

Register a new account on the package registry.

dogma register

Interactive prompt — enter username, email, and password.


dogma login🔗

Log in to the package registry.

dogma login

dogma org create🔗

Create a new organisation on the registry.

dogma org create <NAME>

dogma publish🔗

Publish the current package to the registry.

dogma publish [OPTIONS]
OptionDescription
--binPublish a compiled binary instead of source
--target <TARGET>Cross-compilation target triple (used with --bin), e.g. x86_64-unknown-linux-gnu
--registry <URL>Custom registry URL

dogma fmt🔗

Not yet implemented. dogma fmt is a planned source formatter (analogous to rustfmt/gofmt) but the subcommand has not been built yet.