Loading the documentation…

DataMind Oda on the command line

DataMind Oda usually runs as the desktop app, and it can also run from a command line. Use the command line to start Oda in a named profile: serve its interface in a browser, answer one task and exit, or host a client of your own.

Start a profile

A command-line Oda runs in a profile: a named setup of Oda that decides how that run works. Each profile keeps its own folder under the Oda home folder, one folder per profile name, and starting the same name again reuses that setup.

Start one from a terminal:

sh
oda --profile web

Oda ships five profiles:

ProfileWhat it starts
webThe Oda interface in a browser on this computer.
headlessAnswers one task and exits.
sdkA runtime for Oda SDK clients.
sdk-minimalA small standalone runtime for SDK clients.
acpA server for automation clients that speak the Agent Client Protocol.

The serving profiles and their clients are described on Automation with Oda.

How Oda reads the command line

Oda reads a small set of flags of its own, and 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.
--patch <path>Lays one of your own files over the profile.
--dump-config, --dump-default-config, --dump-config-schemaPrint the configuration or its schemas without starting anything.
--helpPrints the help and exits with code 0, without starting anything.
-V, --versionPrints the release version exactly.
pluginManages a profile's packages.

Run one task and exit

The headless profile answers one task and exits, without opening the app:

sh
oda --profile headless "summarise the latest changes"

The full contract, including the JSON event stream and its bounds: Headless runs.

Continue an earlier run

Name an earlier chat with --session-id, plus the new task:

sh
oda --profile headless --session-id <id> "carry on with the task"

The refusals in full are on Headless runs.

Model access for command-line runs

A run needs a model credential before it can answer; until one resolves, model requests fail. Sign in to your DataMind server, or save a key on Settings > Models (Set up models and providers). Where Oda looks for a credential, and in which order, is on Stored credentials. A run can use the models your DataMind account offers.

Manage a profile's packages

A profile's packages are managed by the plugin command:

sh
oda plugin --profile <name> add <package>

The same command is walked through on Oda profiles and launchers.

Look at the configuration

Oda can show what a profile will run, without starting anything:

Serve the browser interface

oda --profile web serves the Oda interface to a browser on this computer, prints its address, and opens that address in your default browser. Started over a remote connection, Oda prints the address and skips the handoff.

Starting it and signing in: The Oda web interface; working in the browser: Oda in the browser.

Help without starting

Stop a running profile

Press Ctrl+C to ask Oda to stop: it gets up to five seconds to settle, then stops. If it has not stopped yet, press Ctrl+C again to end it at once; an end you ask for this way reports exit code 130.

Questions, answered

What is a profile?

A named setup of Oda that decides how a run works: which layers Oda stacks and which of your own settings apply. Each profile lives in its own folder under the Oda home folder, and starting the same name again reuses the same setup.

What happens the first time I start a shipped profile?

Oda sets it up from the template it ships and then starts it, so you do not prepare the five shipped names by hand. Any other name is not created by itself: the start stops and points to the command that adds a package to that name.

Can I leave out --profile?

Yes, when the profile name is the first word: oda web means oda --profile web. One word is special: plugin in the first position is the plugin command, so a profile named plugin needs the full form, oda --profile plugin.

Why is the profile name desktop refused?

That name belongs to the desktop app's own profile, and the app manages it. Starting it, inspecting its configuration or managing its packages from a command line is refused, so pick another name for a profile of your own.

How do I stop a command-line Oda?

Press Ctrl+C. Oda gets up to five seconds to settle and then stops; a second Ctrl+C ends it at once. An end you ask for this way reports exit code 130.

Why did my package install ask for a build approval?

Some packages build while they are installed, and the package manager blocks that build until you allow it. The command prints the exact setting to add to the settings file inside the profile's folder; add it, then run the command again.

What does select a profile only once mean?

Oda reads the command line once, and it selects a profile only once: a second --profile is refused with that message. A --patch without a path is refused the same way: error: --patch needs a path. Fix the line and start again.

Why did a flag win over the settings file?

A flag beats the matching value in the settings: --port 8080 serves on port 8080 even when the settings name another port, also when that value is written as an expression. Flags are resolved once, when Oda starts, so a settings reload never resets them.

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

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

Does the schema dump print my values or expressions?

No. --dump-config-schema lists the schemas the configuration declares, with a status per entry (schema, partial, absent, unsupported or error). Values and the sources of expressions are never printed, and nothing is started. Defaults can still be sensitive, so review the output before you share it.

How do I get machine-readable output from a run?

Add --json to a headless run. It writes one event per line to standard output instead of the final answer, opening with a session event that carries the chat's id. Headless runs lists the events and their bounds.

Can I start the web interface without opening a browser?

Yes: add --no-open. Oda still prints the interface's address, so you can open it yourself or copy it to a browser. The Oda web interface covers the printed address.