Documentation
¶
There is no documentation for this package.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
anthropic-messages
command
Command anthropic-messages hits the Anthropic-compatible /v1/messages endpoint exposed by Z.AI, using the same API key (Bearer auth, not x-api-key).
|
Command anthropic-messages hits the Anthropic-compatible /v1/messages endpoint exposed by Z.AI, using the same API key (Bearer auth, not x-api-key). |
|
async-poll
command
Command async-poll demonstrates the async image flow: submit a request, receive a task id, then block on WaitForResult until the task is terminal.
|
Command async-poll demonstrates the async image flow: submit a request, receive a task id, then block on WaitForResult until the task is terminal. |
|
chat-streaming
command
Command chat-streaming is a minimal example of streaming a chat completion token-by-token with the Z.AI Go client.
|
Command chat-streaming is a minimal example of streaming a chat completion token-by-token with the Z.AI Go client. |
|
internal
|
|
|
accounts
Package accounts persists multiple named Z.AI credentials and tracks which one is active, so the CLI can switch between accounts without hand-editing .env.
|
Package accounts persists multiple named Z.AI credentials and tracks which one is active, so the CLI can switch between accounts without hand-editing .env. |
|
coding
Package coding is a Go port of Z.AI's official @z_ai/coding-helper ("chelper") CLI.
|
Package coding is a Go port of Z.AI's official @z_ai/coding-helper ("chelper") CLI. |
|
fileinput
Package fileinput resolves a user-supplied "file or URL" argument into the value the layout/OCR API expects: an http(s) URL is passed through verbatim, while a local path is read and base64-encoded.
|
Package fileinput resolves a user-supplied "file or URL" argument into the value the layout/OCR API expects: an http(s) URL is passed through verbatim, while a local path is read and base64-encoded. |
|
tui
Package tui implements the zai-client interactive terminal UI: a Bubble Tea v2 program with one tab per existing CLI command group, all wired to the same pkg/client, pkg/accounts, and pkg/coding services the non-interactive commands already use.
|
Package tui implements the zai-client interactive terminal UI: a Bubble Tea v2 program with one tab per existing CLI command group, all wired to the same pkg/client, pkg/accounts, and pkg/coding services the non-interactive commands already use. |
|
tui/accounts
Package accounts implements the TUI's Accounts tab: list, add, switch, and remove stored Z.AI account credentials via pkg/accounts.Store, the same store the "zai-client accounts" commands use.
|
Package accounts implements the TUI's Accounts tab: list, add, switch, and remove stored Z.AI account credentials via pkg/accounts.Store, the same store the "zai-client accounts" commands use. |
|
tui/chat
Package chat implements the TUI's Chat tab: a streaming conversation over pkg/client's ChatService, the same service "zai-client chat" uses.
|
Package chat implements the TUI's Chat tab: a streaming conversation over pkg/client's ChatService, the same service "zai-client chat" uses. |
|
tui/coding
Package coding implements the TUI's Coding tab: install/config status, auth, load, and unload for supported coding-agent tools (Claude Code, OpenCode, Crush, Factory Droid), backed by pkg/coding — the same package the "zai-client coding" commands use.
|
Package coding implements the TUI's Coding tab: install/config status, auth, load, and unload for supported coding-agent tools (Claude Code, OpenCode, Crush, Factory Droid), backed by pkg/coding — the same package the "zai-client coding" commands use. |
|
tui/media
Package media implements the TUI's Media tab: image generation, video generation, audio transcription, and OCR/layout parsing over pkg/client's ImagesService/VideosService/AudioService/LayoutService — the same services the "zai-client image/video/audio/ocr" commands use.
|
Package media implements the TUI's Media tab: image generation, video generation, audio transcription, and OCR/layout parsing over pkg/client's ImagesService/VideosService/AudioService/LayoutService — the same services the "zai-client image/video/audio/ocr" commands use. |
|
tui/models
Package models implements the TUI's Models tab: a browsable table of available Z.AI models, backed by the same ModelsService the "zai-client models" commands already use.
|
Package models implements the TUI's Models tab: a browsable table of available Z.AI models, backed by the same ModelsService the "zai-client models" commands already use. |
|
tui/tools
Package tools implements the TUI's Tools tab: three independent request/response forms (web search, web reader, tokenizer) over pkg/client's ToolsService, the same service the "zai-client tools" commands use.
|
Package tools implements the TUI's Tools tab: three independent request/response forms (web search, web reader, tokenizer) over pkg/client's ToolsService, the same service the "zai-client tools" commands use. |
|
tui/uimsg
Package uimsg holds tea.Msg types shared between the TUI root model and every screen subpackage.
|
Package uimsg holds tea.Msg types shared between the TUI root model and every screen subpackage. |
|
tui/uistyle
Package uistyle holds the shared lipgloss style vocabulary used by the root chrome and every screen subpackage, so pill/border/toast colors stay consistent without pkg/tui's screens importing pkg/tui itself (which would create an import cycle, since pkg/tui imports every screen).
|
Package uistyle holds the shared lipgloss style vocabulary used by the root chrome and every screen subpackage, so pill/border/toast colors stay consistent without pkg/tui's screens importing pkg/tui itself (which would create an import cycle, since pkg/tui imports every screen). |
|
tui/usage
Package usage implements the TUI's Usage tab: a live quota + token/tool usage dashboard, backed by the same QuotaService/UsageService the "zai-client usage"/"accounts quota"/"accounts usage" commands use.
|
Package usage implements the TUI's Usage tab: a live quota + token/tool usage dashboard, backed by the same QuotaService/UsageService the "zai-client usage"/"accounts quota"/"accounts usage" commands use. |
|
usageview
Package usageview holds pure, presentation-only helpers for rendering usage/quota data (time windows, relative timestamps, compact counters, and a density-heatmap ramp).
|
Package usageview holds pure, presentation-only helpers for rendering usage/quota data (time windows, relative timestamps, compact counters, and a density-heatmap ramp). |
|
pkg
|
|
Click to show internal directories.
Click to hide internal directories.