Sandbox
@olo-dot-io/Uni-CLI

CLI for agents across web, browser, desktop, and MCP

Uni-CLI is a command-line interface for discovering and running operations across multiple real-world surfaces. It picks an execution path for the task, then returns structured output you can feed into another agent or tool. It supports web requests, browser automation, desktop control, local subprocesses, and MCP delivery, with repair and evolution commands for owned adapters.

271 stars2 forksTypeScriptUpdated 10d ago
Who it's for

Builders who want their agent to search, act, and inspect real software from one command.

What it delivers

You can use one interface to reach many apps and services without stitching together separate browser, desktop, and API tools.

What it does

Surface routing

Chooses between structured API, local runtime, browser protocol, accessibility, or visual computer use based on the task.

Structured receipts

Returns success and failure results in a stable schema with errors, exit codes, and repair hints.

MCP delivery

Runs as an MCP server so agents can call Uni-CLI tools through `npx -y @zenalexa/unicli mcp serve`.

Desktop and browser actions

Supports browser navigation, CDP-style interaction, and local desktop control through accessibility references.

Adapter repair

Provides `unicli repair <site> <command>` to re-run and verify a broken adapter boundary.

Catalog and evolution tools

Includes a generated operation catalog plus `evolve adapter` flows for testing candidate repairs against validation and held-out cases.

How to get it

  1. 1Uni-CLI turns intent into a selected operation and a structured receipt across web,…
    npm install -g @zenalexa/unicli
    unicli search "list the top Hacker News stories"
    unicli hackernews top --limit 3 -f json
  2. 2Check releases or open an interactive Y/N update choice.
    unicli upgrade --check -f json
    unicli upgrade
  3. 3The catalog handles discovery and operation contracts. Execution then selects the…
    unicli search "export my saved posts"     # discover and rank
    unicli list --site reddit                  # inspect one surface
    unicli browser doctor --json               # inspect browser delivery state
    unicli repair reddit saved                 # verify a supported drift path
  4. 4The public model stays compact.
    intent → candidate operations → explicit selection → policy → substrate → receipt
  5. 5The generated operation catalog is the authoritative inventory.
    unicli search "download the latest arXiv paper on computer use" -f json
    unicli arxiv search "computer use agents" --limit 5 -f json
    unicli --auth-retry openreview conference "ICML.cc/2026/Conference" --rpm 20 -f json
    unicli extract https://example.com --max-chars 1200
  6. 6Equivalent command
    npx -y @zenalexa/unicli mcp serve

README

Uni-CLI otter mascot

Uni-CLI

Give agents every interface
Install once. Search, run, inspect, repair.

Website   Operations   npm   简体中文

npm version Apache 2.0 license Node 22.19 or newer

Uni-CLI green observatory hero with one-click npm and agent prompt copy

Uni-CLI turns intent into a selected operation and a structured receipt across web, browser, desktop, local, and MCP surfaces.

npm install -g @zenalexa/unicli
unicli search "list the top Hacker News stories"
unicli hackernews top --limit 3 -f json

Check releases or open an interactive Y/N update choice.

unicli upgrade --check -f json
unicli upgrade

Persistent non-interactive Agent installations update in a detached worker by default. Structured output reports progress through meta.update.automatic_update. Interactive terminals keep the Y/N choice, and unicli upgrade --no-auto-update switches a machine back to explicit approval.

Route By Task

The catalog handles discovery and operation contracts. Execution then selects the strongest operator with the smallest effective scope. One provider runs; a failed path keeps its original cause and repair command.

Task boundaryExecution operatorWhy
Public data or stable service contractStructured APITyped fields, explicit auth, stable provenance
Files, system state, local toolsLocal runtimeDirect process and OS boundaries without browser state
Authenticated or private web contractBrowser protocolExplicit profile, cookie session, or network contract
Page-only web flowSemantic browserDOM and CDP semantics with an explicit target and session
Native desktop applicationAccessibilityStructured AX, UIA, or AT-SPI control trees
Pixel-only or unstructured interfaceVisual computer useCoordinate and visual observation when no stronger interface exists
unicli search "export my saved posts"     # discover and rank
unicli list --site reddit                  # inspect one surface
unicli browser doctor --json               # inspect browser delivery state
unicli repair reddit saved                 # verify a supported drift path

The Operation Contract

The public model stays compact.

intent → candidate operations → explicit selection → policy → substrate → receipt
StageRuntime behavior
DiscoverCompiled intent and bilingual retrieval return a small ranked set with selection evidence
SelectThe caller chooses one operation with a declared strategy and substrate
Governopen, confirm, and locked profiles evaluate effect and capability scope
ActThe selected adapter, core command, browser, desktop, or protocol path executes
ObserveEvery normal command returns a stable success or error envelope
RepairOwned drift paths expose their source, failed boundary, and bounded verification command
EvolveRecorded failures become isolated candidates that must pass paired and held-out evaluation

Uni-CLI supplies the interface runtime. The model, planner, agent loop, and sandbox remain independent choices.

Surfaces

SurfaceCurrent runtime
WebPublic data, cookies, headers, downloads, uploads, publishing, search, and Chinese platforms
BrowserCDP navigation, semantic action, network, snapshots, screenshots, and post-action evidence
DesktopNative controls, macOS services, design tools, Office, and media applications
LocalSubprocess bridges, files, PDF and paper workflows, media transforms, and developer CLIs
ProtocolsNative CLI, MCP stdio, MCP Streamable HTTP, ACP, generated configs, and agent skills
PolicyPermission profiles, deny rules, scoped approvals, recordings, replay, and evidence

Static catalog

  • 338 sites
  • 1891 registered commands
  • 1268 adapters
  • 113 pipeline actions
  • 10389 tests

Fixed core and host-discovered commands join at runtime.

SurfaceSitesOperationsExamples
social33396twitter, zhihu, instagram, reddit
video875tiktok, youtube, bilibili, douyin
news1145hackernews, bloomberg, bbc, 36kr
finance1067eastmoney, xueqiu, binance, coingecko
shopping1347amazon, jd, taobao, 1688
dev37185codex, cursor, gh, stackoverflow
ai25215chatgpt, antigravity, chatwise, notebooklm
scholarly30105openreview, zotero, pubmed, arxiv
patent1742epo, espacenet, cipo, cnipa
reference1247marxists-cn, anilist, bangumi, imdb
audio446spotify, netease-music, xiaoyuzhou, apple-podcasts
content1690lesswrong, danbooru, dlsite, weread
productivity1078notion-app, ones, obsidian, quark
jobs642nowcoder, boss, 51job, linkedin
desktop25201macos, freecad, blender, gimp
games17steam
utility729linear, bitwarden, todoist, qweather
other72123slay-the-spire-ii, xiaoe, archive, ke
travel14ctrip

The generated operation catalog is the authoritative inventory.

Use It From An Agent

Native CLI

unicli search "download the latest arXiv paper on computer use" -f json
unicli arxiv search "computer use agents" --limit 5 -f json
unicli --auth-retry openreview conference "ICML.cc/2026/Conference" --rpm 20 -f json
unicli extract https://example.com --max-chars 1200

Piped output defaults to Markdown. Use -f json, yaml, csv, or compact when the next step needs a stable machine format. The OpenReview archive guide covers authenticated, resumable conference and multi-year research archives.

MCP

{
  "mcpServers": {
    "unicli": {
      "command": "npx",
      "args": ["-y", "@zenalexa/unicli-mcp"]
    }
  }
}

Equivalent command

npx -y @zenalexa/unicli mcp serve

The default profile exposes four meta-tools. Deferred and expanded profiles project adapter operations when the host needs tool-level discovery. Inspect the live projection with unicli mcp health -f json.

Local Computer

unicli compute apps --format compact
unicli compute snapshot --app Calculator --format compact
unicli compute find --app Calculator --role AXButton --title "7"
unicli compute click --ref <ref-from-find>

Desktop actions prefer accessibility references. Visual routes require an explicitly selected backend and never appear as a hidden fallback.

Results That Explain Themselves

Success

ok: true
schema_version: "2"
command: "hackernews.top"
meta:
  duration_ms: 412
  count: 3
  surface: web
data:
  - { rank: "1", title: "...", url: "...", author: "..." }
error: null

Failure

ok: false
schema_version: "2"
command: "reddit.saved"
data: null
error:
  code: auth_required
  adapter_path: "src/adapters/reddit/saved.yaml"
  step: 1
  suggestion: "Run: unicli auth setup reddit"
  retryable: false

Exit codes distinguish success, empty results, unavailable dependencies, temporary failures, auth, and configuration. See the output and exit-code reference.

Repair Drift At The Owned Boundary

Adapters stay agent-readable and locally replaceable.

run → read error.adapter_path → patch the owned step → save override → verify once
unicli repair <site> <command>

repair does not edit source or Git state. It reruns the original command as a bounded subprocess and succeeds only when the target returns ok: true with exit code 0. Local overrides under ~/.unicli/adapters/ survive npm updates.

For repeated failures, evolve adapter keeps proposal evidence, validation, and held-out cases separate. The agent supplies one isolated YAML candidate and a falsifiable prediction. Uni-CLI runs paired baseline and candidate evaluations, records prediction misses and regressions, and installs a user override only after the promotion gate passes.

unicli evolve adapter <site> <command> \
  --run <proposal-run> \
  --candidate <candidate.yaml> \
  --hypothesis "<expected mechanism>" \
  --expect <validation-case-id> \
  --risk <held-out-case-id> \
  --validation <validation-eval.yaml> \
  --held-out <held-out-eval.yaml> \
  --promote

Without --candidate, the command creates an editable draft. Every verification preserves its candidate snapshot, patch, and report as one hash-checked attempt. evolve verify --promote reuses the latest eligible attempt when the candidate is unchanged. Promotion and rollback recover after an interrupted write and serialize competing Agent processes. evolve inspect returns the complete attempt history, reports corrupt sessions, and evolve rollback restores the exact pre-promotion overlay.

The first evolution scope keeps the operation identity, input and output contracts, pipeline action topology, request methods and headers, and existing subprocess invocations fixed. Same-origin endpoint and extraction repairs remain editable. A replacement network origin requires an explicit --allow-origin <origin> declaration when the session is created.

A minimal YAML adapter follows.

site: example
name: search
description: Search example.com
transport: http
strategy: public
pipeline:
  - fetch: { url: "https://api.example.com/search?q=${{ args.query }}" }
  - select: data.results
  - map: { title: "${{ item.title }}", url: "${{ item.url }}" }
  - limit: "${{ args.limit }}"
args:
  - { name: query, type: string, required: true, positional: true }
  - { name: limit, type: int, default: 20 }
columns: [title, url]

Read the adapter format, pipeline reference, and self-repair guide.

Trust Boundaries

  • Live browser cookies remain in process memory unless the user explicitly runs auth import or browser cookies.
  • Browser automation uses Uni-CLI-owned profiles under ~/.unicli/. Chrome 136+ does not support remote debugging on its default user-data directory.
  • unicli browser doctor --json reports the available delivery path and exact repair command without starting a browser provider.
  • Permission rules authorize before browser, file, clipboard, subprocess, or desktop side effects. Explicit malformed policies fail closed.
  • Visual routes require a real configured backend. Missing providers return a structured error.
  • Invocation diagnostics exclude arguments, content, URLs, credentials, and raw errors; users can disable new events with UNICLI_NO_LOG=1.

The detailed behavior and storage paths live in Trust, Auth, and Limits.

Development

npm install
npm run typecheck
npm run lint
npm test
npm run verify   # full E2E and adapter coverage; required before release

Requires Node.js 22.19 or newer. See CONTRIBUTING.md for adapter and engine conventions.

Browse every published version on the generated release history. The same data is available to Agents through docs/public/release-history.json.

v1.2.1 — Artemis · Wiseman

License

Apache-2.0

Files in the repo

Repository payload53 top-level entries
  • .changeset
  • .claude
  • .codex
  • .github
  • assets
  • bench
  • bin
  • contributing
  • crates
  • docs
  • evals
  • examples
  • extension
  • packages
  • scripts
  • skills
  • src
  • tests
  • .editorconfig
  • .gitattributes
  • .gitignore
  • .nvmrc
  • .prettierignore
  • acceptance_ledger.md
  • AGENTS.md
  • Cargo.lock
  • Cargo.toml
  • CHANGELOG.md
  • CLA.md
  • CODE_OF_CONDUCT.md
  • CODEOWNERS
  • CONTRIBUTING.md
  • decisions.md
  • DESIGN.md
  • findings.md
  • GOVERNANCE.md
  • lefthook.yml
  • LICENSE
  • package-lock.json
  • package.json
  • PRIVACY.md
  • progress.md
  • README.md
  • README.zh-CN.md
  • registry.json
  • rust-toolchain.toml
  • SECURITY.md
  • server.json
  • stats.json
  • TESTING.md
  • tsconfig.extension.json
  • tsconfig.json
  • vitest.config.ts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k