Zai banner
dotcommander dotcommander

Zai

AI community

Description

CLI for Z.AI GLM models — chat, search, vision, image, audio, video, TTS, embeddings

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ZAI

A fast, feature-rich CLI for [Z.AI](https://z.ai) GLM models.

![ZAI CLI](docs/screenshot.png)

Features

  • Chat - Interactive REPL with conversation context
  • Web Search - Search the web and get AI-summarized results
  • Web Reader - Fetch and analyze web content
  • Image Generation - AI-enhanced prompts with auto-download
  • Vision - Analyze images and extract text
  • Audio - Transcribe audio files and YouTube videos
  • TTS - Text-to-speech synthesis with multiple voices
  • Embeddings - Generate text embedding vectors
  • Video - Generate videos from text or images
  • Pipes - Full stdin/stdout support for scripting

Installation

go install github.com/dotcommander/zai@latest

Or build from source:

git clone https://github.com/dotcommander/zai.git
cd zai
go build -o bin/zai .

Configuration

Set your API key:

export ZAI_API_KEY="your_api_key"

Or create `~/.config/zai/config.yaml`:

api:
  key: "your-api-key"
  model: "glm-4.7"        # default model
  coding_plan: true       # use Coding API endpoint

Usage

Chat

# One-shot
zai "What is the meaning of life?"

# With file context
zai -f main.go "Review this code"

# Interactive REPL
zai chat

# With reasoning mode
zai --think "Solve this step by step"

# Web search augmented
zai --search "Latest news on AI"

Pipes

cat error.log | zai "What's wrong?"
git diff | zai "Write a commit message"
pbpaste | zai "Summarize this"

Web

# Search
zai search "golang best practices"
zai search "AI news" -c 5 -r oneWeek

# Read web pages
zai reader https://example.com
zai "Summarize https://example.com/article"  # auto-detected

Image Generation

zai image "a wizard in a library"
zai image "sunset" --size 1024x1024
zai image "logo" -o logo.png --no-enhance

Images are automatically enhanced with professional photography prompts and saved locally.

Vision

z