JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 182
  • Score
    100M100P100Q72289F
  • License MIT

CLI for Z.AI capabilities: vision analysis, web search, web reader, and GitHub repo exploration

Package Exports

  • zai-cli
  • zai-cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zai-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Z.AI Logo

ZAI CLI

MCP-native command line interface for Z.AI capabilities: vision analysis, web search, web reader, and GitHub repo exploration.

npm version License: MIT

Found this useful? Follow @nummanali for more AI tooling!


Features

  • Vision - Analyze images, screenshots, diagrams, charts, videos using GLM-4.6V
  • Search - Real-time web search with domain and recency filtering
  • Reader - Fetch and parse web pages to markdown
  • Repo - Search and read GitHub repository code via ZRead
  • Tools - MCP tool discovery, schemas, and raw calls
  • Code Mode - TypeScript tool chaining for agent automation

Quick Start

export Z_AI_API_KEY="your-api-key"

npx zai-cli --help
npx zai-cli vision analyze ./screenshot.png "What errors do you see?"
npx zai-cli search "React 19 new features" --count 5

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

Installation

As an Agent Skill

OpenSkills (universal - works with any AI coding agent):

npx openskills install numman-ali/zai-cli

Claude Code (native skill marketplace):

claude skill install numman-ali/zai-cli --skill zai-cli

As a CLI Tool

npm i -g zai-cli
zai-cli --help

Or use directly with npx:

npx zai-cli --help

Usage

The CLI is self-documenting. Use --help at any level:

zai-cli --help              # All commands
zai-cli vision --help       # Vision commands
zai-cli search --help       # Search options
zai-cli repo --help         # GitHub repo commands

Examples

# Vision - analyze images
zai-cli vision analyze ./image.png "Describe this"
zai-cli vision ui-to-code ./design.png --output code
zai-cli vision extract-text ./screenshot.png --language python
zai-cli vision diagnose-error ./error.png

# Search - web search
zai-cli search "TypeScript best practices" --count 10
zai-cli search "security news" --recency oneDay

# Reader - fetch web content
zai-cli read https://docs.example.com/api
zai-cli read https://blog.example.com --format text

# Repo - GitHub exploration
zai-cli repo tree facebook/react
zai-cli repo search vercel/next.js "app router"
zai-cli repo read anthropics/anthropic-sdk-python README.md

# Doctor - check setup
zai-cli doctor

Output Format

Default output is data-only for token efficiency. Use --output-format json for structured responses:

{
  "success": true,
  "data": "...",
  "timestamp": 1234567890
}

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT - see LICENSE.