Command line and flags

DataMind Oda can be started from a command line: pick a profile, add flags for the mode you want, and Oda reads the line once, before anything starts. Use it to run a mode with other settings, to work with profiles of your own, or to look at the configuration Oda will run.

Oda's own flags

Oda reads a small set of flags of its own; every mode adds its own flags on top.

Flag or commandWhat it does
--profile <name>Runs with the named profile.
--from-default-profile <template>Starts a new profile from a shipped template.
--dump-configPrints the configuration Oda will run, with its layers named.
--config-schema-dumpPrints the schemas the configuration declares.
--helpPrints the help for the app and exits with code 0, without starting anything.
--versionPrints the release version exactly.
pluginManages a profile's packages, for example oda plugin --profile <name> add <package>.

The modes themselves, with their own flags, are on Oda in the browser and Automation clients.

How the command line is read

Flags beat the configuration

A flag wins over the configuration: oda --profile web --port 8080 serves on port 8080 even when the configuration names another port.

Help, version and exit codes

Work with profiles

--profile names the profile for the run: oda --profile web starts the web mode. Oda ships the templates web, headless, acp, sdk and sdk-minimal; the modes themselves are described on Oda in the browser and Automation clients.

Preview the configuration

A config dump prints the configuration Oda will run, composed from its layers. Print it with --dump-config.

Check the configuration's schemas

A schema dump prints the schemas the configuration declares, with a status per entry: schema, partial, absent, unsupported or error. Print it with --config-schema-dump.

Questions, answered

Does a flag beat the configuration?

Yes. --port 8080 serves on port 8080 even when the configuration names another port, and the rule holds even when the configuration value is written as an expression. Oda resolves flags once, when it starts, so a later configuration reload never resets a flag.

I reloaded the configuration. Do my flags stay?

Yes. Flags are resolved when Oda starts, and a configuration reload never replaces them; Hot reload covers what a reload does change.

Where do Oda's flags end and the app's arguments start?

Oda's own flags come before the app's arguments, and everything after Oda's flags goes to the app you start, which parses its own flags from there. Keep that order: Oda's flags first, then anything meant for the app.

How do I pass a literal double dash?

Write it doubled: -- --. A literal -- needs that doubled form.

What do the help and version flags do?

--help prints the help for the app and exits with code 0, without starting anything. --version prints the release version exactly. Oda handles both itself, before the app starts.

Why did Oda refuse my flag value?

When a flag value is not accepted, the app prints its error and exits with a code other than 0. For example, a port that is not a number reads error: --port must be a number, got "<value>". Correct the value, or drop the flag, and start again.

Can I run Oda with a profile of my own?

Yes. Name it with --profile. Oda ships the templates web, headless, acp, sdk and sdk-minimal, and a profile can start from one of them with --from-default-profile <template>. Profiles live under the Oda home folder, one folder per name.

I named a profile Oda does not know. What now?

Oda stops the start and tells you how to create it: profile "<name>" does not exist; create it with 'oda plugin --profile <name> add <package>'. A name Oda cannot use as a profile is refused earlier, as invalid profile name "<name>".

What does the config dump show?

The configuration Oda will run, composed from its layers. Sections and rows carry # == comments naming their source, and rows that a patch layer changed say , patched by <layers>. Expressions print as written. A patch that names an entry the configuration does not have is reported as a warning instead of failing the dump; a configuration that cannot be read or parsed fails it (failed to read config, failed to parse config).

Does the schema dump print my values or expressions?

No. The schema dump lists the schemas the configuration declares, with a status per entry (schema, partial, absent, unsupported or error); configuration values and the sources of expressions are never printed, and Oda reads the declarations without starting the plugins.

Can two parts of Oda read the same command line?

Yes. Oda freezes the command line at startup, so any part of Oda can read it, and reading never consumes an argument for the next reader.