oomniv0.3.0

reference

Reference

Commands, configuration, exit codes, environment, service modules and development, for omni 0.3.0.

Commands

Every command takes --json (machine-readable envelopes), --target NAME and --config PATH. omni command --help lists the rest.

CommandMain optionsDoes
send cmd--adb --serial --dry-run --relay --device --token --daemon --require-deliveryOne command: text, key, combo, scroll or event
cast--frame line|char|ndjson --adb --serial --dry-run --daemon --tokenStream standard input
run file|-the targets of send, and --dry-runA macro file with wait delays
serve--listen (default 127.0.0.1:8765) --tokenThe relay hub
daemon--listen (default 127.0.0.1:8766) --backend --relay --device --token --dry-run --print-service --install-service --userInject locally, optionally registered to a hub
listen, get--daemon (default 127.0.0.1:8766) --events --tokenStream, or take one, received command
devices--relay --token --jsonDevice ids on a hub
config--target --example --schemaResolved targets, a starter file, or the JSON Schema
doctor--probe --jsonRead-only health checks
status, updateVersion and capabilities; self-update
mcp stdio, mcp toolsThe MCP server, or its tool list
completions shellbash, zsh, fish, powershell or elvish

Configuration

Read from --config, else $OMNI_CONFIG, else ~/.config/omni/config.yaml. default_target names the target used when --target is omitted. Each entry under targets has an optional description and exactly one of transport or group (a list of other target names).

transport.typeFieldsReaches
adb-broadcastserial, sender_package (both optional)The omni keyboard on an adb-attached Android device
termuxThe keyboard on the same device, when omni runs on Android
tcphost, portA listener that accepts NDJSON over TCP, such as an Android command server or a desktop daemon
relayurl, device, token_envA device connected to a relay hub; token_env names the variable that holds the token

Exit codes

CodeMeans
0Success, including warnings from doctor
1A delivery or check failed
2Invalid usage or an unparseable command
3With --require-delivery: the relay confirmed no device received the cast

Environment

VariableUsed for
OMNI_CONFIGThe configuration file
OMNI_RELAY_TOKENThe shared relay and daemon token, when --token is not given
FEEDBACK_WEBHOOK_BASE_URL, FEEDBACK_WEBHOOK_URL, FEEDBACK_WEBHOOK_TOKEN_ENV, FEEDBACK_COMPONENT, FEEDBACK_PROJECTFeedback routing (see Agents)
COMPLETESet by a shell's dynamic completer

Service modules

The flake exports nixosModules.omni (a systemd user service) and darwinModules.omni (a launchd agent). The daemon and the hub are independent, so a machine can be either or both.

imports = [ inputs.omni-cli.nixosModules.omni ];services.omni = {  enable = true;  backend = "auto";  relay = "hub.example:8765";   # also register with a hub  device = "quill";  tokenFile = "/run/secrets/omni-relay-token";  serve.enable = false;         # true to run a hub here};
OptionDefaultMeans
enablefalseRun omni daemon
listen127.0.0.1:8766The daemon's address for senders and subscribers
backendautoauto, xdotool, wtype, ydotool, osascript or log
relay, devicenullAlso register with a hub, as this device id (default: the host name)
tokenFilenullA file holding the token, exported as OMNI_RELAY_TOKEN to the daemon and the hub
tokenWaitSeconds60How long to wait at boot for the token file to appear
tokennullAn inline token; readable in the Nix store, so prefer tokenFile
configFile%h/.config/omni/config.yamlThe configuration file
preferLocalBinarytrueUse a self-updated ~/.local/bin/omni when present
extraArgs[]Appended to omni daemon
serve.enablefalseRun the hub, omni serve
serve.listen127.0.0.1:8765The hub's address; set a reachable one for devices
serve.extraArgs[]Appended to omni serve

Development

CommandDoes
nix developA shell with the pinned Rust toolchain
cargo test --workspaceCLI and SDK unit tests
nix run .#preflightFormat, Clippy with warnings as errors, and tests, as CI runs them
nix run .#testBuild and smoke-test the CLI
nix run .#relay-testAn end-to-end relay round trip: hub, daemon and sender
nix run .#doctorCheck the repository's conventions
nix run .#release -- patchCut a release tag; assets build on self-hosted runners

The Rust API documentation is generated at publish time and served under api/. This site is built from site/ by scripts/site/build.py and checked by scripts/check-site.py.