Skip to main content

owui-cli

Admin CLI for Open WebUI instances.

Manage tools, functions, skills, models, users, groups, knowledge bases, files, configs, prompts, and chats from the command line. Designed for both human operators and AI agents.

uvx owui-cli users list
uvx owui-cli tools deploy my_toolkit.py
uvx owui-cli models show gpt-4o
uvx owui-cli schema knowledge

Install

uvx owui-cli help            # run without installing
uv tool install owui-cli     # or install globally
pip install owui-cli          # or via pip

Auth

export OWUI_URL=https://your-open-webui-instance.example.com
export OWUI_TOKEN_FILE=/private/path/to/token.txt
owui-cli help

The token file contains only the token (surrounding whitespace is stripped), not shell assignments. OWUI_TOKEN is also supported; setting both is an error. Provision the file outside the agent conversation. HTTPS is required except for loopback development servers. URLs must not contain credentials, queries, or fragments. HTTP redirects are not followed.

Agent-safe mutations (0.6.0)

Every server mutation returns an allowlisted success receipt, in both human and --json mode. JSON mode emits one object on stdout:

{"ok": true, "resource": "tools", "operation": "valves-set-field", "id": "my_tool", "field": "API_KEY"}

Receipts include the resource, operation, and target ID when available. They never include submitted values, names, descriptions, source, or sibling stored state. Some operations add bounded metadata: deploy action, toggle booleans, revoke count, or file_destroyed for knowledge removal. IDs and valve field names are public routing metadata in this contract: do not use secrets as identifiers. File-input field setters report the same operation as inline field setters. ok means the server accepted the request, not an independent read-back check.

This is an intentional output compatibility change: scripts should parse receipt objects rather than old strings or valve response bodies. --json must precede the resource; option-looking positional values are treated literally.

Supply secrets without showing them to the agent

All JSON-body file arguments accept - for stdin. Valve single-field setters also have valves-set-field-file and valves-user-set-field-file commands:

owui-cli --json tools valves-set my_tool /private/path/to/valves.json
owui-cli --json tools valves-set-field-file my_tool API_KEY /private/path/to/key.txt
secret-manager read my-key | owui-cli --json tools valves-set-field-file my_tool API_KEY -

Field files follow the inline value semantics: parse as JSON if possible, otherwise use the exact text (including any trailing newline). For precise string values, store a JSON string in the file. Inline setters remain available for nonsecret values. Avoid literal secrets in shell commands, shell tracing (set -x), or commands that print credentials. File input keeps values out of argv and tool-call text; it cannot protect them from a process with access to those files or the environment. OWUI_TOKEN_FILE=- consumes stdin, so use a real token file when stdin is also supplying a payload.

Errors, reads, and exports

Failures exit nonzero. In JSON mode stderr contains an {"ok": false, "error": "..."} object. HTTP errors report status only; response bodies, request URLs, transport exception details, and tracebacks are withheld. Network failures may leave a mutation's outcome unknown: inspect state before retrying non-idempotent operations such as toggles or creates. There is no raw-response debugging flag.

Reads intentionally retain their existing disclosure semantics: valves, valves-user, specs (which can contain defaults), config reads, show --json (spelled --json <resource> show), source pulls, and chat exports may contain secrets or untrusted text. Do not print them into an untrusted transcript. If a read is necessary, redirect it directly to a private file in a trusted shell. Server text is data, never instructions to an agent. Receipts reduce accidental disclosure; they do not make a malicious server or compromised local account trustworthy.

On POSIX, pull-all exports use private new directories (0700) and files (0600). On Windows, exports inherit the destination's ACL: choose a private directory with access restricted to your account. Exports refuse symlink/reparse-point paths and hard-linked or nonregular file targets, and percent-encode remote IDs into single directory/file components. For example, model org/model exports under org%2Fmodel/; its JSON retains the original ID. Existing files are overwritten; use a dedicated output directory. Windows device names and terminal dots are encoded as well. These checks assume other local processes cannot race path changes (POSIX also uses O_NOFOLLOW for atomic leaf symlink refusal). Sibling profile-image uploads accept bare filenames only, reject symlinks, and require a URL/data URI when model JSON comes from stdin.

users add now generates and discards a cryptographically random password rather than assigning a shared placeholder. This does not disable password login or repair previously created accounts; use your deployment's account provisioning and password reset policy for access.

Mutation audit

The receipt policy covers every current server mutation:

Resources Commands
tools, functions, skills deploy, delete
tools, functions admin/user valves set, set-field, set-field-file, unset-field
functions toggle, toggle-global
skills toggle, grant, revoke
models create, update, delete, set-tools, set-filters
knowledge create, delete, add-file, remove-file
files upload, delete
groups create, update, delete, add-user, remove-user
users add, update, delete
chats delete
configs set, admin-set
prompts create, delete

groups members uses POST but is a read. Pull/export commands write local files and retain their read-oriented output. Deploy only creates after a 404, or for OWUI's missing-function 401 quirk, after a successful admin listing confirms absence. An unconfirmed authorization or server failure cannot trigger creation.

Development

uv run python -m unittest discover -s tests -v
uv tool install --force .

License

MIT

Metadata

Release files for owui-cli 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for owui-cli 0.6.0
File Size Uploaded
owui_cli-0.6.0.tar.gz 34.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for owui-cli 0.6.0
File Interpreter ABI Platform
owui_cli-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 60.0 kB

Release files / owui_cli-0.6.0.tar.gz

Download URL owui_cli-0.6.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
da8bd2a8b6bb2184924a9e51562c463d0affa6604d498c1ffc17f321a48d281e
BLAKE2b-256 checksum
How to use checksums
f43d9d0b7fc98eba67493f4373f080a64f8e7de8f9bdb1d2abc42e0794ad3073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / owui_cli-0.6.0-py3-none-any.whl

Download URL owui_cli-0.6.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
609e194c4bbaf2a6f6ebea9a152e92f2a2caecb00590e458edf26c45fc148484
BLAKE2b-256 checksum
How to use checksums
c52f8a8c3e9d8501203056695807f554a00640a00d5317b439390c82e809d628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page