mcpField
Z
zai-cli

zai-cli

github.com/numman-aliAgent workflows1.1k48 installsUpdated 7w ago
Repository

About zai-cli

zai-cli is a command-line interface for accessing Z.AI capabilities, intended for users who want image and video analysis, web research, or GitHub code lookup. It also supports direct MCP tool inspection and invocation, plus TypeScript tool chaining.

Key features

  1. 01Image, screenshot, and video analysis
  2. 02Real-time web search
  3. 03Fetch web pages as Markdown
  4. 04Search and read GitHub code
  5. 05Inspect and invoke MCP tools
  6. 06Chain tools with TypeScript

Use cases

  1. 01Inspect errors in a screenshot
  2. 02Find current information on the web
  3. 03Convert a documentation page to Markdown
  4. 04Search a GitHub repository

MCP support

It lists available MCP tools, displays tool schemas, and invokes tools directly. TypeScript code can chain tools.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/numman-ali/n-skills --skill zai-cli

After installing, type/zai-cliin Claude Code to confirm it loaded.

Bundled filesreferences/advanced.md

Details

From the project README

ZAI CLI

Access Z.AI capabilities via npx zai-cli. The CLI is self-documenting - use --help at any level.

Setup

export Z_AI_API_KEY="your-api-key"

Get a key at: https://z.ai/manage-apikey/apikey-list

Commands

CommandPurposeHelp
visionAnalyze images, screenshots, videos--help for 8 subcommands
searchReal-time web search--help for filtering options
readFetch web pages as markdown--help for format options
repoGitHub code search and reading--help for tree/search/read
toolsList available MCP tools
toolShow tool schema
callRaw MCP tool invocation
codeTypeScript tool chaining
doctorCheck setup and connectivity

Quick Start

# Analyze an image
npx zai-cli vision analyze ./screenshot.png "What errors do you see?"

# Search the web
npx zai-cli search "React 19 new features" --count 5

# Read a web page
npx zai-cli read https://docs.example.com/api
npx zai-cli read https://docs.example.com/api --with-images-summary --no-gfm

# Explore a GitHub repo
npx zai-cli repo search facebook/react "server components"
npx zai-cli repo search openai/codex "config" --language en
npx zai-cli repo tree openai/codex --path codex-rs --depth 2

# Check setup
npx zai-cli doctor

Output

Default: data-only (raw output for token efficiency). Use --output-format json for { success, data, timestamp } wrapping.

Advanced

For raw MCP tool calls (tools, tool, call), Code Mode, and performance tuning (cache/retries), see references/advanced.md.

Comments

Markdown supported