https://github.com/olo-dot-io/Uni-CLI
The universal interface between AI agents and the world's software. CLI-native discovery, execution, verification, and self-repair across web, desktop, local tools, and external CLIs.
https://github.com/olo-dot-io/Uni-CLI
agent-infrastructure ai-agents ai-tools automation browser-automation cdp chrome cli developer-tools mcp nodejs self-repair typescript web-scraping yaml
Last synced: about 2 months ago
JSON representation
The universal interface between AI agents and the world's software. CLI-native discovery, execution, verification, and self-repair across web, desktop, local tools, and external CLIs.
- Host: GitHub
- URL: https://github.com/olo-dot-io/Uni-CLI
- Owner: olo-dot-io
- License: apache-2.0
- Created: 2026-04-04T06:04:36.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-26T14:53:36.000Z (about 2 months ago)
- Last Synced: 2026-04-26T15:12:49.577Z (about 2 months ago)
- Topics: agent-infrastructure, ai-agents, ai-tools, automation, browser-automation, cdp, chrome, cli, developer-tools, mcp, nodejs, self-repair, typescript, web-scraping, yaml
- Language: TypeScript
- Homepage: https://olo-dot-io.github.io/Uni-CLI/
- Size: 5.16 MB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Governance: GOVERNANCE.md
- Roadmap: docs/ROADMAP.md
- Agents: AGENTS.md
- Cla: CLA.md
Awesome Lists containing this project
- awesome-mcp-zh - olo-dot-io/Uni-CLI - 2.0;目录规模与每次调用 token 预算见仓库 [README](https://github.com/olo-dot-io/Uni-CLI#readme) 与 [`docs/BENCHMARK.md`](https://github.com/olo-dot-io/Uni-CLI/blob/main/docs/BENCHMARK.md)。 | (MCP 服务器精选列表 / 🖥️ 命令行与 Shell 交互)
- awesome-harness-engineering - Uni-CLI - Universal CLI hub connecting agents to 134 sites and desktop apps via 711 declarative YAML pipelines. Ships an 8-phase Karpathy-style self-repair loop, eval harness with a starter catalog, per-call cost ledger, hardcoded sensitive-path deny list, and `unicli mcp serve` that auto-registers one MCP tool per adapter. ~80 tokens per invocation. (Runtimes, Harnesses & Reference Implementations)
- Awesome-AI-Agents - Uni-CLI - Universal CLI for AI agents — 756 commands across 167 sites (web, desktop, Electron apps). Self-repairing 20-line YAML adapters, auto-JSON output, ~80 tokens per call. TypeScript, Apache-2.0.  (Applications / Tools)
- awesome-harness-engineering - Uni-CLI - Universal CLI hub connecting agents to 134 sites and desktop apps via 711 declarative YAML pipelines. Ships an 8-phase Karpathy-style self-repair loop, eval harness with a starter catalog, per-call cost ledger, hardcoded sensitive-path deny list, and `unicli mcp serve` that auto-registers one MCP tool per adapter. ~80 tokens per invocation. (Runtimes, Harnesses & Reference Implementations)
- awesome-mcp-servers - **olo-dot-io/Uni-CLI** - Self-repairing CLI catalog that exposes web, desktop apps, Electron apps, and bridge CLIs as deterministic commands through one MCP server. Declarative YAML adapters with structured error envelopes let agents fix failing adapters and retry. Live catalog size and per-call token budget tracked in the repo's README and docs/BENCHMARK.md. `web` `http` `ai` `ml` `git` (🔧 Utilities)
README
Uni-CLI
The agent execution substrate for the world's software.
Docs
·
Sites catalog
·
llms.txt
Search by intent, execute governed commands across web, apps, local tools, and system capabilities, then return evidence-rich AgentEnvelopes that agents can inspect and repair.
235 sites · 1450 commands · 59 pipeline steps · 7591 tests
Web / Social / Knowledge
Agent / IDE / Coding Surfaces
Desktop / Media / DevOps / Cloud
```bash
npm install -g @zenalexa/unicli
unicli search "hacker news frontpage"
unicli hackernews top -f json
```
## What It Does
Uni-CLI sits under agent applications and turns software surfaces into commands that agents can discover, execute, record, and repair.
| Surface | What you get |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Websites and APIs | Declarative adapters for public, cookie, header, and browser-intercept workflows |
| Browser automation | CDP steps for navigate, click, type, intercept, snapshot, extract, wait, and related browser work |
| Desktop and macOS | System commands, app adapters, real-time Shortcuts/App Intent discovery, screenshots, clipboard, calendar, brightness, and local tools |
| External CLIs | 58 registered pass-through bridges with install/status discovery |
| Agent backends | Route matrix for native CLI, JSON stream, MCP, ACP, HTTP API, OpenAI-compatible, and bridge routes |
| Operation policy | `open`, `confirm`, and `locked` profiles with effect/risk scopes, local deny rules, `--yes`, and persisted approval memory |
| Evidence | Run traces with environment snapshots, probe/replay/compare scores, structured gate results, browser session leases with tab/auth posture, render-aware evidence, movement checks, and stale-ref details |
| Output | v2 `AgentEnvelope` in Markdown, JSON, YAML, CSV, or compact format |
| Repair | Structured errors with `adapter_path`, failing `step`, retryability, suggestions, and alternatives |
## For Agents
Use search first, then run the smallest matching command.
```bash
unicli search "connect slack messages" --limit 5
unicli slack search "deploy incident" -f json
unicli macos app-actions --app WhatsApp -f json
unicli macos automation-smoke -f json
unicli repair slack search
```
Output defaults to structured Markdown for non-TTY and agent-user-agent runs. Force a machine format when you need one:
```bash
UNICLI_OUTPUT=json unicli reddit hot --limit 10
unicli hackernews top --limit 5 -f yaml
unicli --record --permission-profile confirm twitter search "coding agents" -f json
unicli runs list -f json
unicli runs show -f json
unicli runs probe -f json
unicli runs replay --permission-profile confirm --yes --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
unicli runs compare -f json
unicli runs compare --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
unicli --permission-profile locked --yes --remember-approval word set-font "Inter"
unicli approvals list -f json
unicli approvals revoke -f json
unicli browser evidence --render-aware --expect-domain example.com -f json
```
Protocol entry points:
```bash
npx @zenalexa/unicli mcp serve
npx @zenalexa/unicli mcp serve --transport streamable --port 19826
unicli acp
unicli agents recommend codex
unicli agents matrix
```
ACP is supported for editors and bridge tooling. The primary runtime path stays native CLI, JSON stream, or MCP when those routes are available.
## Coverage
The catalog is intentionally broad. Every command is discoverable, typed, and repairable.
| Area | Examples |
| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| Chinese platforms | xiaohongshu, zhihu, bilibili, douyin, douban, v2ex, jike, linux-do |
| International platforms | twitter, reddit, instagram, tiktok, discord, slack, hackernews, lesswrong |
| AI and developer tools | Claude, ChatGPT, Gemini, Codex, Cursor, VS Code, Docker Desktop, Postman |
| Finance and news | xueqiu, eastmoney, yahoo-finance, bloomberg, reuters, bbc, 36kr |
| Desktop apps | Blender, FreeCAD, GIMP, Audacity, Figma, Docker, ImageMagick, ffmpeg |
| Agent CLIs | Claude Code, Codex, OpenCode, Gemini CLI, Qwen Code, Aider, Goose, Cursor Agent, Kiro, OpenHands, SWE-agent |
See the live catalog:
```bash
unicli list
unicli list --site macos
unicli ext list
unicli ext list --tag agent
```
Browse the same generated catalog on the docs site:
## Output Contract
Every normal command returns a v2 envelope. `mcp serve` and `acp` are protocol servers and keep their raw stdio protocol.
```yaml
ok: true
schema_version: "2"
command: "twitter.search"
meta:
duration_ms: 412
count: 20
surface: web
data:
- { id: "...", text: "...", author: "..." }
error: null
```
Errors are meant to be acted on:
```yaml
ok: false
schema_version: "2"
command: "twitter.search"
meta:
duration_ms: 91
data: null
error:
code: auth_required
message: "401 Unauthorized"
adapter_path: "src/adapters/twitter/search.yaml"
step: 1
suggestion: "Run: unicli auth setup twitter"
retryable: false
alternatives: ["twitter.timeline", "twitter.profile"]
```
Exit codes: `0` ok, `66` empty, `69` unavailable, `75` temporary failure, `77` auth, `78` config.
## Self-Repair
Adapters are small YAML files by default. A failed command gives an agent enough context to patch the broken part without waiting for a package release.
```text
1. Run the command.
2. Read the error envelope.
3. Open error.adapter_path.
4. Patch the failing step.
5. Save the override in ~/.unicli/adapters//.yaml.
6. Verify with unicli repair .
```
Local overrides survive npm updates.
## Write An Adapter
```yaml
site: example
name: search
description: "Search example.com"
transport: http
strategy: public
capabilities: [fetch, select, map, limit]
minimum_capability: http.fetch
trust: public
confidentiality: public
quarantine: false
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]
```
Docs:
- [Documentation site](https://olo-dot-io.github.io/Uni-CLI/)
- [Getting started](docs/guide/getting-started.md)
- [Integrations](docs/guide/integrations.md)
- [Adapter format](docs/ADAPTER-FORMAT.md)
- [Pipeline reference](docs/reference/pipeline.md)
- [Exit codes](docs/reference/exit-codes.md)
## Trust And Limits
- Auth-required sites use local cookie files under `~/.unicli/cookies/.json`.
- Browser adapters require a reachable Chrome/CDP session.
- Permission profiles are user-selected runtime policy. The default is `open`;
stricter `confirm` and `locked` profiles require `--yes` or `UNICLI_APPROVE=1`
for blocked operations. Add `--remember-approval` with `--yes` to store the
same command capability and resource scope under `~/.unicli/approvals.jsonl`.
Resource scope covers stable metadata such as domain, account surface, app,
process family, and path argument slots. Use
`unicli approvals list`, `revoke`, and `clear` to inspect or remove remembered
scopes. The file stores scope metadata; runtime args stay out of approval
memory.
- Local deny rules live at `~/.unicli/permission-rules.json`, or at
`UNICLI_PERMISSION_RULES_PATH`. They match site, command, effect, capability
dimensions, and resource metadata, then block before `--yes` and remembered
approvals. Runtime guards also check fetched domains, browser navigation
targets, download and output paths, and subprocess executables before the
request, write, or process spawn happens.
- Run recording is opt-in. Use `--record` or `UNICLI_RECORD_RUN=1` when you need
append-only evidence under `~/.unicli/runs`.
- CUA routes require a configured real backend. Declared-but-unavailable providers fail closed with structured errors.
- User adapters and repairs live in `~/.unicli/adapters/`; committed adapters remain the package baseline.
- If a site blocks automation or changes a private API, Uni-CLI returns a clear failure envelope.
## Development
```bash
pnpm install
pnpm typecheck
pnpm lint
npm run verify
```
## License
[Apache-2.0](./LICENSE)
v0.217.2 — Apollo · Swigert