Skip to content

Commit 79f1460

Browse files
respencer-nclclaude
andcommitted
Migrate tooling documentation from riddl.tech
Expands riddlc documentation with content migrated from riddl/doc: - installation.md: Download releases or build from source - command-reference.md: Complete command and option documentation - configuration.md: HOCON configuration file format - compilation.md: Compilation phases and process - github-actions.md: CI/CD integration with get-riddlc action Adds new sbt-riddl plugin documentation: - Installation and configuration in sbt projects - Integration with build workflow Updates main riddlc index page with links to new sections. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fb0c4c2 commit 79f1460

7 files changed

Lines changed: 1235 additions & 96 deletions

File tree

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
---
2+
title: "Command Reference"
3+
description: "Complete reference for riddlc commands and options"
4+
---
5+
6+
# Command Reference
7+
8+
`riddlc` uses a subcommand structure. The general syntax is:
9+
10+
```bash
11+
riddlc [common-options] command [command-options]
12+
```
13+
14+
## Available Commands
15+
16+
| Command | Description |
17+
|---------|-------------|
18+
| `about` | Print out information about RIDDL |
19+
| `bastify` | Convert a RIDDL file to BAST (Binary AST) format |
20+
| `dump` | Dump the AST of the input file |
21+
| `flatten` | Flatten all includes into a single file |
22+
| `from` | Load options from a configuration file |
23+
| `help` | Print usage information |
24+
| `info` | Print build information |
25+
| `onchange` | Watch a directory and run a command on changes |
26+
| `parse` | Parse the input file and report syntax errors |
27+
| `prettify` | Reformat RIDDL source to a standard layout |
28+
| `repeat` | Repeatedly run a command for edit-build-check cycles |
29+
| `stats` | Generate statistics about a RIDDL model |
30+
| `unbastify` | Convert a BAST file back to RIDDL source |
31+
| `validate` | Parse and validate the input file |
32+
| `version` | Print the version and exit |
33+
34+
!!! info
35+
Hugo documentation generation and diagram generation have been moved to
36+
the [riddl-gen](https://github.com/ossuminc/riddl-gen) repository.
37+
38+
## Common Options
39+
40+
These options apply to all commands:
41+
42+
| Option | Description |
43+
|--------|-------------|
44+
| `-t`, `--show-times` | Show parsing phase execution times |
45+
| `-I`, `--show-include-times` | Show parsing of included files times |
46+
| `-d`, `--dry-run` | Go through the motions but don't write changes |
47+
| `-v`, `--verbose` | Provide verbose output |
48+
| `-D`, `--debug` | Enable debug output (for developers) |
49+
| `-q`, `--quiet` | No output, just execute the command |
50+
| `-a`, `--no-ansi-messages` | Disable ANSI formatting in messages |
51+
| `-w`, `--show-warnings` | Control warning message display |
52+
| `-m`, `--show-missing-warnings` | Control missing definition warnings |
53+
| `-s`, `--show-style-warnings` | Control style warning display |
54+
| `-u`, `--show-usage-warnings` | Control usage warning display |
55+
| `-i`, `--show-info-messages` | Control info message display |
56+
| `-S`, `--sort-messages-by-location` | Sort messages by file and line |
57+
| `-G`, `--group-messages-by-kind` | Group messages by severity |
58+
| `-x`, `--max-parallel-parsing` | Max parallel include file parsing |
59+
| `--max-include-wait` | Max time to wait for include parsing |
60+
| `--warnings-are-fatal` | Treat warnings as errors |
61+
| `-B`, `--auto-generate-bast` | Auto-generate .bast files after parsing |
62+
63+
## Command Details
64+
65+
### parse
66+
67+
Parse a RIDDL file for syntactic correctness without semantic validation:
68+
69+
```bash
70+
riddlc parse input-file.riddl
71+
```
72+
73+
This is useful for quickly checking if a file is syntactically valid.
74+
75+
### validate
76+
77+
Parse and semantically validate a RIDDL file:
78+
79+
```bash
80+
riddlc validate input-file.riddl
81+
```
82+
83+
This performs full validation including:
84+
85+
- Reference resolution (all referenced definitions exist)
86+
- Type checking
87+
- Containment rules
88+
- Style checks (optional)
89+
90+
### prettify
91+
92+
Reformat RIDDL source to a standard layout:
93+
94+
```bash
95+
riddlc prettify input-file.riddl -o output-dir
96+
```
97+
98+
Options:
99+
100+
| Option | Description |
101+
|--------|-------------|
102+
| `-o`, `--output-dir` | Required output directory |
103+
| `--project-name` | Project name for the output |
104+
| `-s`, `--single-file` | Merge all includes into a single file |
105+
106+
### bastify
107+
108+
Convert RIDDL to Binary AST (BAST) format for faster loading:
109+
110+
```bash
111+
riddlc bastify input-file.riddl
112+
```
113+
114+
Creates a `.bast` file next to the input file. BAST files can be loaded
115+
significantly faster than parsing RIDDL source, making them useful for
116+
large models.
117+
118+
### unbastify
119+
120+
Convert a BAST file back to RIDDL source:
121+
122+
```bash
123+
riddlc unbastify input-file.bast -o output-dir
124+
```
125+
126+
Options:
127+
128+
| Option | Description |
129+
|--------|-------------|
130+
| `-o`, `--output-dir` | Output directory (default: next to input) |
131+
132+
### flatten
133+
134+
Resolve all includes into a single file:
135+
136+
```bash
137+
riddlc flatten input-file.riddl -o output-file.riddl
138+
```
139+
140+
### stats
141+
142+
Generate statistics about a RIDDL model:
143+
144+
```bash
145+
riddlc stats -I input-file.riddl
146+
```
147+
148+
Reports counts of domains, contexts, entities, types, and other definitions.
149+
150+
### from
151+
152+
Load options from a HOCON configuration file:
153+
154+
```bash
155+
riddlc from config-file.conf target-command
156+
```
157+
158+
See [Configuration](configuration.md) for details on the configuration format.
159+
160+
### repeat
161+
162+
Support edit-build-check cycles by repeating a command:
163+
164+
```bash
165+
riddlc repeat config-file.conf target-command [refresh-rate] [max-cycles]
166+
```
167+
168+
Options:
169+
170+
| Option | Description |
171+
|--------|-------------|
172+
| `refresh-rate` | How often to check for changes |
173+
| `max-cycles` | Maximum number of cycles |
174+
| `-n`, `--interactive` | Exit on EOF from stdin |
175+
176+
### onchange
177+
178+
Watch a directory and run a command when changes occur:
179+
180+
```bash
181+
riddlc onchange config-file.conf watch-directory target-command
182+
```
183+
184+
### info
185+
186+
Display build information:
187+
188+
```bash
189+
riddlc info
190+
```
191+
192+
Example output:
193+
194+
```
195+
[info] About riddlc:
196+
[info] name: riddlc
197+
[info] version: 1.1.2
198+
[info] documentation: https://riddl.tech
199+
[info] copyright: © 2019-2026 Ossum Inc.
200+
[info] licenses: Apache License, Version 2.0
201+
[info] organization: Ossum Inc.
202+
[info] scala version: 3.3.7
203+
```
204+
205+
### help
206+
207+
Display usage information:
208+
209+
```bash
210+
riddlc help
211+
riddlc help validate # Help for specific command
212+
```
213+
214+
### version
215+
216+
Display the version number:
217+
218+
```bash
219+
riddlc version
220+
```

0 commit comments

Comments
 (0)