SDK CLI Reference
15 min
litmus sdk cli is a command line interface installed with the litmussdk package it exposes every public sdk function without writing python useful for ai agents, ci pipelines, and interactive exploration setup 1\ configure a connection \# direct connection (oauth2) litmus sdk cli config set \\ \ edge url https //\<device ip> \\ \ edge api client id \<client id> \\ \ edge api client secret \<client secret> \# lem bridge litmus sdk cli config set \\ \ edge manager url https //\<lem url> \\ \ edge api token \<token> \\ \ edge manager project id \<project id> \\ \ edge manager device id \<device id> \\ \ use lem bridge true profiles are saved to / litmus/\<profile> json the default profile is named default to use multiple devices, pass profile \<name> to any command for full env var details and the three connection modes, see managing connections docid\ vwtfo9sxcmrbfx9cafenw 2\ (optional) enable tab completion \# bash eval "$(litmus sdk cli completion bash)" \# zsh eval "$(litmus sdk cli completion zsh)" add the eval line to / bashrc or / zshrc to persist across sessions commands litmus sdk cli list browse modules and functions \# all top level service groups with function counts litmus sdk cli list \# functions in a specific module, with signatures and docstrings litmus sdk cli list devicehub devices litmus sdk cli list digital twins litmus sdk cli list lem lifecycle applications this is the canonical way to discover what the sdk can do 540 functions across all modules litmus sdk cli run call any sdk function by its dotted path result is json on stdout litmus sdk cli run \<dotted path to function> \[ args '{}'] \[ output json|quiet] \[ profile name] examples \# no arguments litmus sdk cli run devicehub devices list devices \# with arguments (json object of kwargs) litmus sdk cli run devicehub tags list all tags args '{"limit" 50}' \# quiet mode, suppresses output (useful in ci) litmus sdk cli run devicehub devices list devices output quiet \# named profile litmus sdk cli run devicehub devices list devices profile staging exit codes 0 success, 1 runtime/auth error, 2 bad input environment variables take precedence over profiles set edge url , edge api client id , edge api client secret (or the lem equivalents) in the shell to override any saved profile litmus sdk cli config manage saved connection profiles \# save or update a profile litmus sdk cli config set edge url https //10 0 0 1 edge api client id id edge api client secret secret \# show a saved profile (secrets masked) litmus sdk cli config show litmus sdk cli config show profile staging supported keys for config set flag description edge url litmus edge device url edge api client id oauth 2 0 client id edge api client secret oauth 2 0 client secret edge manager url litmus edge manager url edge manager admin url lem admin url (optional) edge api token lem api token (used by direct lem and lem bridge) edge manager project id lem project id (for bridge mode) edge manager device id lem device id (for bridge mode) use lem bridge true to route le calls through lem validate certificate false to disable tls verification timeout seconds request timeout in seconds litmus sdk cli completion print the shell completion script litmus sdk cli completion bash litmus sdk cli completion zsh using with ai agents litmus sdk cli is designed for use by ai agents key properties structured output results are always json on stdout, errors on stderr discoverable litmus sdk cli list enumerates every public function across all modules self describing litmus sdk cli list \<module> shows signatures and docstrings composable output quiet suppresses output for fire and forget calls; pipe json output to jq or any other tool typical agent workflow \# 1 discover what's available litmus sdk cli list \# 2 inspect a module litmus sdk cli list devicehub devices \# 3 call a function and parse the json result litmus sdk cli run devicehub devices list devices | jq ' \[0] id' \# 4 pass arguments litmus sdk cli run devicehub tags list registers from single device \\ \ args '{"device" {"id" "\<device id>"}}' the full agent guide (with module mappings and patterns) lives at api litmus io/sdk agents md https //api litmus io/sdk agents md devicehub driver records if a function raises an error about a missing driver record, the cli will automatically download and cache the correct record for your device's firmware version, then retry no manual intervention needed you can manage driver records manually download dh record # download for current edge url version list dh versions # list available cached versions get dh cache dir # show where records are cached these commands are installed alongside litmus sdk cli license copyright (c) litmus automation inc