@@ -6,8 +6,8 @@ draft: false
66weight : 10
77---
88
9- riddlc is the command that makes all the magic happen. As you will see, riddlc
10- is a rich and powerful tool for processing RIDDL input.
9+ riddlc is the command that makes all the magic happen. As you will see, riddlc
10+ is a rich and powerful tool for processing RIDDL input.
1111
1212## Command Syntax overview
1313` riddlc ` uses a sub-command structure. At a high level, the command line syntax
@@ -16,125 +16,129 @@ is very simple:
1616> riddlc [common options] command-name [command-options]
1717```
1818
19+ ## Available Commands
20+
21+ The following commands are available in ` riddlc ` :
22+
23+ | Command | Description |
24+ | ---------| -------------|
25+ | ` about ` | Print out information about RIDDL |
26+ | ` bastify ` | Convert a RIDDL file to BAST (Binary AST) format |
27+ | ` dump ` | Dump the AST of the input file |
28+ | ` unbastify ` | Convert a BAST file back to RIDDL source files |
29+ | ` flatten ` | Flatten all includes into a single file |
30+ | ` from ` | Load a configuration file and execute a command from it |
31+ | ` help ` | Print out how to use this program |
32+ | ` info ` | Print out build information about this program |
33+ | ` onchange ` | Watch a directory and run a command when changes occur |
34+ | ` parse ` | Parse the input file and report any errors |
35+ | ` prettify ` | Reformat RIDDL source to a standard layout |
36+ | ` repeat ` | Repeatedly run a command for edit-build-check cycles |
37+ | ` stats ` | Generate statistics about a RIDDL model |
38+ | ` validate ` | Parse and validate the input file |
39+ | ` version ` | Print the version of riddlc and exit |
40+
41+ {{% hint info %}}
42+ ** Note** : Hugo documentation generation and diagram generation have been moved
43+ to the [ riddl-gen] ( https://github.com/ossuminc/riddl-gen ) repository. Use that
44+ tool if you need to generate Hugo sites or diagrams from RIDDL models.
45+ {{% /hint %}}
46+
1947## Info Command Output
2048For this version of ` riddlc ` :
2149``` shell
22- > content % riddlc info
50+ > riddlc info
2351[info] About riddlc:
2452[info] name: riddlc
25- [info] version: 0.14.0
53+ [info] version: 1.1.2
2654[info] documentation: https://riddl.tech
27- [info] copyright: © 2019-2022 Ossum Inc.
28- [info] built at: 2022-09-09 11:28:07.485-0400
55+ [info] copyright: © 2019-2026 Ossum Inc.
2956[info] licenses: Apache License, Version 2.0
3057[info] organization: Ossum Inc.
31- [info] scala version: 2.13.8
32- [info] sbt version: 1.7.1
33- ```
34- the help text shows the commands and options available:
35-
58+ [info] scala version: 3.3.7
3659```
37- RIDDL Compiler © 2019-2022 Ossum Inc. All rights reserved."
38- Version: 0.13.3-2-49ff0a59-20220909-1104-SNAPSHOT
3960
40- This program parses, validates and translates RIDDL sources to other kinds
41- of documents. RIDDL is a language for system specification based on Domain
42- Drive Design, Reactive Architecture, and distributed system principles.
61+ ## Common Options
4362
63+ The following options apply to all commands:
4464
45- Usage: riddlc [options]
46-
65+ ```
4766 -t | --show-times
48- Show compilation phase execution times
67+ Show parsing phase execution times
68+ -I | --show-include-times
69+ Show parsing of included files execution times
4970 -d | --dry-run
5071 go through the motions but don't write any changes
5172 -v | --verbose
52- Provide verbose output detailing riddlc's actions
73+ Provide verbose output detailing actions taken by riddlc
5374 -D | --debug
5475 Enable debug output. Only useful for riddlc developers
5576 -q | --quiet
5677 Do not print out any output, just do the requested command
57- -w | --suppress-warnings
78+ -a | --no-ansi-messages
79+ Do not print messages with ANSI formatting
80+ -w <value> | --show-warnings <value>
5881 Suppress all warning messages so only errors are shown
59- -m | --suppress-missing-warnings
60- Show warnings about things that are missing
61- -s | --suppress-style-warnings
62- Show warnings about questionable input style.
63- -P <value> | --plugins-dir <value>
64- Load riddlc command extension plugins from this directory.
65-
66- Usage: [about|dump|from|help|hugo|info|parse|repeat|validate|version] <args>...
67-
68- Command: about
69- Print out information about RIDDL
70-
71- Command: dump input-file
72- input-file
73-
74- Command: from config-file target-command
75- Loads a configuration file and executes the command in it
76- config-file
77- A HOCON configuration file with riddlc options in it.
78- target-command
79- The name of the command to select from the configuration file
80-
81- Command: help
82- Print out how to use this program
83-
84- Command: hugo [options] input-file
85- Parse and validate the input-file and then translate it into the input
86- needed for hugo to translate it to a functioning web site.
87- input-file
88- required riddl input file to read
89- -o <value> | --output-dir <value>
90- required output directory for the generated output
91- -p <value> | --project-name <value>
92- optional project name to associate with the generated output
93- -e <value> | --erase-output <value>
94- Erase entire output directory before putting out files
95- -b <value> | --base-url <value>
96- Optional base URL for root of generated http URLs
97- -t <value> | --themes <value>
98- Add theme name/url pairs to use alternative Hugo themes
99- -s <value> | --source-url <value>
100- URL to the input file's Git Repository
101- -h <value> | --edit-path <value>
102- Path to add to source-url to allow editing
103- -m <value> | --site-logo-path <value>
104- Path, in 'static' directory to placement and use
105- of the site logo.
106- -n <value> | --site-logo-url <value>
107- URL from which to copy the site logo.
108-
109- Command: info
110- Print out build information about this program
111-
112- Command: parse input-file
113- input-file
114-
115- Command: repeat [options] config-file target-command [refresh-rate] [max-cycles]
116- This command supports the edit-build-check cycle. It doesn't end
117- until <max-cycles> has completed or EOF is reached on standard
118- input. During that time, the selected subcommands are repeated.
119- config-file
120- The path to the configuration file that should be repeated
121- target-command
122- The name of the command to select from the configuration file
123- refresh-rate
124- Specifies the rate at which the <git-clone-dir> is checked
125- for updates so the process to regenerate the hugo site is
126- started
127- max-cycles
128- Limit the number of check cycles that will be repeated.
129- -n | --interactive
130- This option causes the repeat command to read from the standard
131- input and when it reaches EOF (Ctrl-D is entered) then it cancels
132- the loop to exit.
133-
134- Command: validate input-file
135- input-file
136-
137- Command: version
138- Print the version of riddlc and exits
82+ -m <value> | --show-missing-warnings <value>
83+ Suppress warnings about things that are missing
84+ -s <value> | --show-style-warnings <value>
85+ Suppress warnings about questionable input style
86+ -u <value> | --show-usage-warnings <value>
87+ Suppress warnings about usage of definitions
88+ -i <value> | --show-info-messages <value>
89+ Suppress information output
90+ -S <value> | --sort-messages-by-location <value>
91+ Print all messages sorted by file name and line number
92+ -G <value> | --group-messages-by-kind <value>
93+ Print all messages grouped by severity
94+ -x <value> | --max-parallel-parsing <value>
95+ Maximum number of include files parsed in parallel
96+ --max-include-wait <value>
97+ Maximum time to wait for include file parsing
98+ --warnings-are-fatal <value>
99+ Makes validation warnings fatal
100+ -B | --auto-generate-bast
101+ Automatically generate .bast files after parsing
102+ ```
103+
104+ ## Command Details
105+
106+ ### bastify
107+ Convert a RIDDL file to BAST (Binary AST) format for faster loading:
108+ ``` shell
109+ riddlc bastify input-file.riddl
110+ ```
111+ Creates a ` .bast ` file next to the input file.
112+
113+ ### unbastify
114+ Convert a BAST file back to RIDDL source:
115+ ``` shell
116+ riddlc unbastify input-file.bast -o output-dir
117+ ```
118+
119+ ### from
120+ Load options from a HOCON configuration file:
121+ ``` shell
122+ riddlc from config-file.conf target-command
123+ ```
139124
125+ ### prettify
126+ Reformat RIDDL source to a standard layout:
127+ ``` shell
128+ riddlc prettify input-file.riddl -o output-dir
140129```
130+ Options:
131+ - ` --project-name <value> ` - Project name for the output
132+ - ` -s | --single-file <value> ` - Resolve all includes into a single file
133+
134+ ### validate
135+ Parse and validate a RIDDL file:
136+ ``` shell
137+ riddlc validate input-file.riddl
138+ ```
139+
140+ ### stats
141+ Generate statistics about a RIDDL model:
142+ ``` shell
143+ riddlc stats -I input-file.riddl
144+ ```
0 commit comments