Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

cann-cli

Latest version: v0.1.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: hourunze1997
2 Versions

Scan summary

cann-cli was last scanned on 27 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published within 2 days (26 and 27 Nov 2026).
  • Findings: No rules fired in version 0.1.1.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 27 Nov 2026 No rules fired
0.1.0 26 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.


cann doesn't ship a static list of commands. It reads the CANN Infra Discovery Service at runtime and builds its entire command surface dynamically. When a new service ships, cann picks it up automatically — no upgrade required.

Why cann?

cann exists to solve one specific problem: a CLI that talks to many evolving services without multiplying that complexity. Shipping a hand-written client per service per version is exactly the versioning pressure that the Zylos API versioning research warns against — and for AI agent consumers that pressure is acute: a renamed field silently breaks a tool call, a new required parameter crashes an otherwise healthy workflow. cann sidesteps the whole problem by being one client that discovers every service at runtime, so the only thing that has to be versioned is the gateway's OpenAPI spec itself.

  • Zero boilerplate. No copy-pasted OpenAPI clients, no per-service SDKs, no --data to escape, no User-Agent headers to remember.
  • Runtime discovery. The service list you see in cann --help is built from https://api-gateway.osinfra.cn/discovery/apis on every call. New services, new endpoints, and new schema fields show up without an cann upgrade. A 10-minute cache keeps CI bursts cheap; cann cache refresh forces an immediate re-fetch when you know the gateway just shipped.
  • AI-friendly output. Single JSON object on stdout, deterministic exit codes (0 success · 1 user · 2 network · 3 upstream · 4 not found). Logs and progress go to stderr so | jq is always safe.
  • Claude / Cursor ready. Ships with .claude/skills/cann-cli/SKILL.md so agents know how to use it without a custom prompt.
  • MCP-ready. The same three tools reach any MCP client through cann-mcp (npx -y cann-mcp) — install.sh below wires it in one line.

Install

pip install cann-cli

Or in an isolated environment (recommended for CI):

pipx install cann-cli

From source:

git clone -b cann-cli https://gitcode.com/openeuler/oed-cli && cd oed-cli
pip install -e .

Verify:

cann --version       # → cann, version 0.1.0

Quick start: install, then call

pip install cann-cli
cann services                        # see what the cann community exposes
cann mailman <operation> --help      # inspect one operation's flags
Install the Agent Skill

Agent frameworks (Claude Code, Cursor, OpenCode, …) need the bundled Agent Skill installed before they call cann correctly — it is not part of the pip wheel. For Claude Code, copy it into the skills directory:

git clone --depth 1 -b cann-cli https://gitcode.com/openeuler/oed-cli /tmp/cann-cli \
  && mkdir -p ~/.claude/skills \
  && cp -r /tmp/cann-cli/.claude/skills/cann-cli ~/.claude/skills/

Other frameworks: drop it into their skill/rules directory.

(optional) Call an AtomGit operation — store a token once

Operations on the ag (AtomGit) service authenticate via an access_token query parameter. Store a personal access token once, and every cann ag ... call injects it automatically:

cann ag login

That's it. cann discovers the service from the gateway, pulls its OpenAPI spec, derives --<flag> names from the declared parameters, fills WAF-safe browser headers, and ships the request through the production gateway. Output is plain JSON on stdout — pipe straight into jq:

cann <service> <operation> --flag value | jq '.response'
Want to look around first? (optional)
cann info      # gateway snapshot: services_total, cache status, community
cann services  # full service list — pick one to call next
cann <service> --help                       # list that service's operations
cann <service> <operation> --help           # see every flag for one operation
cann <service> <operation> --dry-run --…    # preview the request, no network

The first cann <service> <operation> call after install will pull a fresh discovery feed + that service's OpenAPI spec; subsequent calls within 10 minutes reuse the local cache. Run cann cache refresh to force a re-fetch when you know the gateway just shipped something new.

One-line install: CLI + MCP

The installer does two things: installs the cann CLI (pipx → uv → pip, skipped when cann is already on PATH), then registers the cann-mcp MCP server with your agent client — so any MCP-capable agent can drive every CANN service:

# auto-detect the client, or pick one explicitly
curl -fsSL https://raw.gitcode.com/openeuler/oed-cli/raw/cann-cli/install.sh | bash
curl -fsSL https://raw.gitcode.com/openeuler/oed-cli/raw/cann-cli/install.sh | bash -s cursor

pipx is required — cann installs into an isolated pipx venv: the system Python stays untouched, uninstall is clean, and PEP 668 (Ubuntu 23.04+/Debian 12+ forbid installing with the system pip) doesn't apply; the script installs pipx automatically if missing.

Windows (PowerShell 5.1+ / pwsh) — install.ps1 is a full port of install.sh with the same clients and flags:

powershell -c "irm https://raw.gitcode.com/openeuler/oed-cli/raw/cann-cli/install.ps1 | iex"
# pipe-to-iex cannot take arguments — use a scriptblock to pick a client or uninstall
powershell -c "& ([scriptblock]::Create((irm https://raw.gitcode.com/openeuler/oed-cli/raw/cann-cli/install.ps1))) cursor"
powershell -c "& ([scriptblock]::Create((irm https://raw.gitcode.com/openeuler/oed-cli/raw/cann-cli/install.ps1))) -Uninstall cursor"

Windows differences: the MCP launch command is registered as cmd /c "npx -y cann-mcp" (native clients cannot spawn npx.cmd directly), and the CLI is installed with the cann-cli[os-keyring-windows] keyring backend (DPAPI / Credential Manager — needed by cann ag login to store tokens).

What it does:

  1. Installs the cann CLI and verifies cann --version.
  2. Registers npx -y cann-mcp with the chosen client — merging the client's config in place and backing it up to <file>.cann-backup first. Prefers each client's own CLI when available (claude mcp add, openclaw mcp add, copilot mcp add, pi mcp add, code --add-mcp, dsh plugin add, gemini/qwen extensions install); edits config files directly for the rest (mcp.json for Cursor/Trae/Kimi Code, config.toml for Codex, config.yaml for Hermes Agent, mcp_config.json for Antigravity, tools.mcpServers for Nanobot, ~/.kiro/settings/mcp.json for Kiro).
  3. Is idempotent and reversible: re-running is safe; bash install.sh --uninstall <client> removes only the cann entry.

No secrets are handled. The cann community services (mailman, etherpad) work anonymously; for AtomGit (ag) operations, run cann ag login yourself afterwards — see the auth section below.

Multi-platform support

Platform Status Install Method
Claude Code Shell-install install.sh claude · or claude mcp add -s user cann -- npx -y cann-mcp · or the bundled Agent Skill
Cursor Shell-install install.sh cursor
Trae / Trae 中国版 Shell-install install.sh trae / install.sh trae-cn
Codex CLI Shell-install install.sh codex
Gemini CLI Shell-install install.sh gemini
Qwen Code Native qwen extensions install cann-mcp (npm channel) · or install.sh qwen
dsh Shell-install install.sh dsh
OpenClaw Shell-install install.sh openclaw · or openclaw mcp add cann --command npx --arg -y --arg cann-mcp
Hermes Agent Shell-install install.sh hermes · or add cann under mcp_servers in ~/.hermes/config.yaml
Kimi Code CLI Shell-install install.sh kimi · or add cann to mcpServers in ~/.kimi-code/mcp.json · or /mcp-config in the TUI
VS Code (Copilot Chat) Shell-install install.sh vscode · or code --add-mcp '{"name":"cann","command":"npx","args":["-y","cann-mcp"]}'
Copilot CLI Shell-install install.sh copilot · or copilot mcp add cann -- npx -y cann-mcp
Antigravity Shell-install install.sh antigravity (writes ~/.gemini/antigravity/mcp_config.json)
Pi Shell-install install.sh pi · or pi mcp add cann -- npx -y cann-mcp
Nanobot Shell-install install.sh nanobot (writes tools.mcpServers in ~/.nanobot/config.json)
Kiro CLI / IDE Shell-install install.sh kiro (writes ~/.kiro/settings/mcp.json, shared by both)
Cline / any other MCP client Shell-install add npx -y cann-mcp to its config
Coze (cloud) Native Coze plugin store — search cann

What the statuses mean — status tokens are the same in both the English and Chinese README, not translated.

  • Native — the platform discovers and adds cann through its own mechanisms, no script involved: an in-app store search (Coze — plugin store, search cann) or an official package channel installable by name (Qwen Code — qwen extensions install cann-mcp pulls it from npm, which requires the qwen-extension.json manifest shipped in the npm package).
  • Auto-discover — the platform's catalog indexes cann-mcp on its own, no manual listing: an official crawler (Gemini CLI's extension gallery watches the gemini-cli-extension GitHub topic) or an npm-crawling directory site (Glama below). No agent platform has this working for cann yet — Gemini CLI's gallery hasn't indexed the repo so far; once it does, Gemini CLI moves up to Auto-discover.
  • Shell-install — no catalog on the platform lists cann yet, so one command wires it up: install.sh <client>, or the equivalent manual command in the table. Gemini CLI sits here today — its native extensions install works fine through the script even before the gallery lists us.

MCP needs Node ≥ 18 (npx); the CLI needs Python ≥ 3.10. The MCP server bootstraps the cann CLI automatically on first use, so the client-side setup is the only step.

MCP directories — where cann-mcp is already discoverable. Glama crawled npm on its own (true auto-discover); npm is our own publish; the rest are not listed yet:

Directory Listing How it got there
npm npmjs.com/package/cann-mcp published by us
Glama glama.ai/mcp/servers/Hourunze1997/cann-mcp auto-crawled
Smithery — not listed yet (submission planned)
MCP Registry (official) — not listed yet (submission planned)
Cline marketplace — not listed yet (submission planned)

From npm or either crawled directory, the install is the same one line: npx -y cann-mcp.

"What flags does this operation take?" → --help

Don't guess. Each operation auto-derives its own flags from the OpenAPI schema:

cann <service> <operation> --help
{
  "help_for": "<operation>",
  "operation_id_raw": "<operation>",
  "method": "GET",
  "path": "/<service-path>/...",
  "url": "https://apig.osinfra.cn/...",
  "parameters": [
    {
      "name": "padId",
      "in": "query",
      "required": true,
      "flag": "--pad-id",
      "alt_flag": "--padId",
      "type": "string",
      "description": "..."
    }
  ],
  "usage": "cann <service> <operation> --pad-id <value> [--dry-run]"
}

Same idea at the service level — list every operation with one flag each:

cann <service> --help | jq '.operations | length'

More examples

# Dry-run — preview the request without hitting the network
cann <service> <operation> --flag value --dry-run

# POST JSON body — fields go through --json, not --params
cann <service> <operation> --json '{"key":"value"}'

Run cann services to see the live cann service list (currently mailman and etherpad), then cann <service> --help for the operation list of each.

AtomGit (ag) authentication

AtomGit operations authenticate through the access_token query parameter declared on their spec. Store a personal access token once, and every cann ag ... call uses it automatically:

# Interactive (prompts for the token, never echoes it back)
cann ag login

# Non-interactive — good for CI / scripts
cann ag login --token <pat>

# Skip validating the token against AtomGit before storing
cann ag login --token <pat> --no-verify

# Just report whether a token is configured (no network, no prompt)
cann ag login --status

# Forget the stored token
cann ag logout

Token storage:

  • macOS Keychain / Windows DPAPI / Linux SecretService when an OS keystore is reachable, otherwise a 0600 plaintext fallback file.
  • Lives under a tokens/ subdir of the cache dir (tokens/ag.json when keyring is unavailable); cann cache clear never touches credentials.

Auto-injection on real calls:

  • If the operation declares access_token and you don't pass one, the stored token is filled in automatically — cann ag listAuthenticatedUserIssues just works.
  • An explicit --access-token <pat> always wins over the stored one.
  • If the operation requires a token and none is available anywhere, you get a clear ag_token_missing error with a hint, instead of an opaque gateway 401.
  • --dry-run and request echo views mask the token as <stored> — the real value only ever goes out on the wire.

Local development

Clone and install (editable)
git clone -b cann-cli https://gitcode.com/openeuler/oed-cli && cd oed-cli
pip install -e ".[dev]"

pip install -e . makes source edits take effect on the next cann invocation. Drop it with pip uninstall cann-cli when you're done.

Run the tests (~0.3 s, fully offline)
python -m pytest -q

The suite covers dispatch, the operation-help cheatsheet, per-parameter flag coercion, the API_-prefix alias, the resolve_runtime_gateway no-fallback semantics, every exit code path, and the ag token store + auto-injection. Tests monkeypatch the discovery layer so no gateway access is needed.

Smoke-test against the live gateway

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases cann-cli

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229