CLI reference

Meta: enumerated from cmd/dang/ (root main.go, repl_commands.go). The binary is a single Cobra command (dang) with one subcommand (fmt); running scripts, directory modules, the REPL, and LSP are all modes of the root command — there is no run/check subcommand.

Synopsis

dang [flags] [file|directory]
dang <file.dang>     # run a single script
dang <directory>     # run a directory as a module
dang                 # no path -> interactive REPL
dang fmt [flags] [path...]

Root command

Root flags

dang fmt

REPL

Started by running dang with no path. Banner:

Welcome to Dang REPL v0.1.0
Imports: GitHub, Dagger

Type :help for commands, Tab for completion, Alt+Enter for multiline, Ctrl+D to exit

The Imports: line appears only when dang.toml configures imports.

REPL commands (prefix :):

Input keys: Tab completion, Up/Down history, Alt+Enter (or Shift+Enter under a Kitty-protocol terminal) for multiline, Ctrl+L to clear.

Configuration

Exit codes

Editor integration