Z.AI CLI - Multimodal Analysis & Search

VerifiedSafe

CLI tool for multimodal analysis (vision, OCR, UI-to-code, error diagnosis), real-time web search with domain/recency filters, web page to markdown extraction, and GitHub code search/reading. Helps with visual content analysis, web research, and codebase exploration.

Sby Skills Guide Bot
DevelopmentIntermediate
706/2/2026
Claude CodeCursorWindsurfCopilotCodex
#zai-cli#ai-tools#vision-analysis#web-search#github-exploration

Recommended for

Our review

A powerful CLI tool for analyzing images, performing web searches, extracting web pages, and exploring GitHub repositories using Z.AI capabilities.

Strengths

  • Advanced visual analysis (images, videos, OCR, UI-to-code conversion)
  • Real-time web search with domain and recency filtering
  • Web page extraction to Markdown, ideal for LLM ingestion
  • GitHub code exploration with tree browsing and search

Limitations

  • Requires a Z.AI API key, adding external dependency
  • Advanced features (MCP, Code Mode) are documented separately, slowing onboarding
  • Default output is data-only, which may confuse new users
When to use it

Best for developers needing to analyze screenshots, search real-time info, or browse source code quickly from the terminal.

When not to use it

Avoid if no Z.AI API key is available or if you need a non-CLI integration (prefer direct API).

Security analysis

Safe
Quality score85/100

The skill is a documentation reference for the ZAI CLI tool. It does not contain any destructive, exfiltrating, or obfuscated instructions. It simply describes how to use the CLI with an API key and various subcommands. No dangerous payloads or unsafe directives are present.

No concerns found

Examples

Analyze an image for errors
Analyze the screenshot at ./screenshot.png for any errors or issues using npx zai-cli vision analyze.
Search the web for React 19 features
Search the web for the latest React 19 features with npx zai-cli search 'React 19 new features' --count 5.
Explore a GitHub repository structure
Explore the directory structure of the openai/codex repo up to depth 2 using npx zai-cli repo tree openai/codex --depth 2.

name: zai-cli description: | Z.AI CLI providing:

  • Vision: image/video analysis, OCR, UI-to-code, error diagnosis (GLM-4.6V)
  • Search: real-time web search with domain/recency filtering
  • Reader: web page to markdown extraction
  • Repo: GitHub code search and reading via ZRead
  • Tools: MCP tool discovery and raw calls
  • Code: TypeScript tool chaining Use for visual content analysis, web search, page reading, or GitHub exploration. Requires Z_AI_API_KEY.

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

| Command | Purpose | Help | |---------|---------|------| | vision | Analyze images, screenshots, videos | --help for 8 subcommands | | search | Real-time web search | --help for filtering options | | read | Fetch web pages as markdown | --help for format options | | repo | GitHub code search and reading | --help for tree/search/read | | tools | List available MCP tools | | | tool | Show tool schema | | | call | Raw MCP tool invocation | | | code | TypeScript tool chaining | | | doctor | Check 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.

Related skills