MCPcopy Index your code
hub / github.com/ZMGID/kivio

github.com/ZMGID/kivio @v2.7.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.7.6 ↗ · + Follow
5,957 symbols 19,035 edges 355 files 1,097 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kivio

Kivio

A screen-level AI assistant for macOS and Windows: an agentic AI client, plus instant translation, screenshot OCR, and visual Q&A — all one hotkey away, all on your own API keys.

Latest Release macOS (Apple Silicon) Windows 10/11 Tauri v2 GPL-3.0

Download  ·  Features  ·  Hotkeys  ·  Quick Start  ·  中文  ·  QQ Group: 1104450740


What is Kivio?

Kivio lives in your tray / menu bar and works at the level of your screen, not just inside its own window. Press a hotkey anywhere to translate what you typed, translate what you selected, translate what you see, or capture any region and ask AI about it. Open the AI client from the tray and you get a full agentic chat app: tool calls, sub-agents, Skills, MCP servers, a knowledge base, a Python sandbox, and side-by-side multi-model answers.

Design principles, as implemented in code:

  • Bring your own keys. Every AI call goes to providers you configure — OpenAI-compatible, Anthropic, and Google Gemini native protocols. No account, no middleman server.
  • Local and quiet. No telemetry or analytics of any kind; the only background network call is the GitHub release check for updates. Settings and conversations stay on disk on your machine.
  • Light when idle. Windows are created on demand and destroyed on close (not hidden), so the idle process keeps a small footprint.

The AI Client

Kivio AI client

A provider-agnostic agent runtime with a real tool loop, not a thin chat wrapper.

Ask many models at once. Fan one question out to multiple models and compare the answers in tabs or side-by-side columns. Each answer streams independently; one model failing never blocks the rest, and you choose which answer the conversation continues from.

Native tools (each individually toggleable, file/shell tools ask for per-conversation consent):

Group Tools
Web web_search, web_fetch
Files read (files, directories, images), grep, glob, write, edit
Shell bash with tracked background jobs (bash_output, kill_background)
Python run_python — offline Pyodide sandbox, bundled with numpy, pandas, matplotlib, pillow, micropip
Knowledge knowledge_search with [n] citations
Memory memory_read / memory_modify / memory_search long-term memory
Agent agent (sub-agents), todo_write, ask_user, image generation

Sub-agents. Built-in personas — general-purpose, researcher, coder, reviewer — each with its own tool allow-list; the model can dispatch several in parallel from a single message. You can add your own as markdown files.

Skills. Markdown-defined skills, activated mid-conversation. Bundled: pdf, docx, xlsx, diagram, doc-coauthoring, frontend-design, mcp-builder, skill-creator, himalaya (email). Import your own from folders or ZIPs.

MCP. Connect external Model Context Protocol servers over stdio or streamable HTTP, with persistent sessions, JSON import, and live connection status.

Knowledge base (RAG). Multi-library document retrieval: hybrid search (sqlite-vec vectors + FTS5 BM25, fused by Reciprocal Rank Fusion) with an optional reranker. Ingests txt / csv / markdown / html / docx / xlsx / pdf (text layer), plus images via OCR and web pages via URL import. Answers cite sources as clickable [n] markers.

Connectors. Obsidian (vault injection), Email (IMAP/SMTP via Himalaya), Notion, GitHub, Linear, Sentry, Atlassian, Composio — token or OAuth 2.1 + PKCE.

External CLI agents. Hand a conversation over to an installed terminal agent — Claude Code, codex, cursor, opencode, gemini, kimi, pi, or hermes — with detection, streaming, and session management built in.

Long conversations that keep working. Context compaction runs inside the loop: a cheap "microcompact" pass degrades old tool results first, and an LLM summary kicks in only when needed, with a visible compaction timeline in the UI.

And the rest: projects and sets for organizing conversations, full-text conversation search, file/image attachments, an assistant builder, plan/orchestrate mode with approval policies, agent todo lists, generated-file cards (~/Kivio/outputs/), and per-call token usage statistics.

Screen Tools

Lens — capture and ask

Lens formula extraction

One hotkey freezes the screen. Drag a region (or, on macOS, click a window), optionally draw red arrows to point at things, then ask. Answers stream in with reasoning shown in a collapsible thinking block, LaTeX rendered by KaTeX, and up to 20 capture+Q&A entries kept in history. Lens can also plan its own web searches (Tavily / Exa / Exa MCP / Ollama / Grok — Exa MCP works keyless at low quota) and show the sources it used. One click sends the screenshot — or the entire multi-turn exchange — into the AI client to continue.

Lens text Q&A

Capture text on screen and work with it in place.

Translation, four ways

Screenshot translation

  • Quick translator — a small input popup at your cursor; results appear as you type (600 ms debounce), Enter copies the translation and can auto-paste it back into the app you came from.
  • Selected-text translation — grabs the current selection via Accessibility APIs (with a clipboard fallback) and shows a floating, draggable translation card. Nothing pops up if nothing is selected.
  • Screenshot translation — capture a region or window; the translation streams into a card next to the selection, with the recognized original underneath.
  • Replace translation — capture a region and the translation is painted over the original text on a canvas, line by line, with background color sampled from the screenshot so it blends in. Uses RapidOCR for line positions.

Prompts for each mode are editable ({lang} / {text} placeholders), card width is adjustable, and streaming can be toggled.

OCR engines

Screenshot translation can recognize text three ways, selectable in Settings:

  • Cloud vision model (default) — one multimodal call does OCR + translation together.
  • System OCR — Apple Vision on macOS (via a bundled Swift sidecar) or Windows.Media.Ocr on Windows.
  • RapidOCR — fully offline PaddleOCR (PP-OCRv5) ONNX pipeline; a one-click, user-initiated download (~15 MB models + ONNX Runtime). Replace translation always uses this engine.

Models & Providers

  • Four native wire protocols: OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and Google Gemini generateContent — each a first-class adapter, so no feature is lost to a compatibility layer.
  • Presets for DeepSeek, OpenRouter, SiliconFlow, GLM, and Ollama Cloud, each with a "get API key" link; any OpenAI-compatible endpoint works via custom provider.
  • Per-feature routing: the translator, screenshot translation, Lens, and each chat conversation can each use a different provider and model; separate default slots exist for vision, title summarization, compaction, and image generation.
  • Multi-key failover: each provider holds a pool of API keys. Auth errors (401/402/403) switch keys immediately; rate limits (429) retry with backoff and only switch after a threshold; failed keys cool down for 60 s. Server errors back off without burning backup keys.
  • Per-model overrides (context window, max output, capabilities, pricing) and a per-provider gzip request-body toggle for WAF-fussy gateways.

Settings

Kivio settings

Settings live inside the AI client window: General, Translate, Screenshot, Lens, Chat, Memory, default-model routing, Kivio Code, external agents, MCP, Skills, Web Search, Connectors, Knowledge Base, Usage, Providers, and About. Highlights: a first-run wizard (provider → web search → hotkeys), settings export/import backup, theme color presets with dark mode, bilingual UI (中文/English), autostart, and a request debug panel that records recent provider calls in memory only — keys masked, copy-as-cURL.

Kivio Code

The repo also ships kivio-code, a terminal coding agent (Rust CLI/TUI) built on the same runtime — also reachable as kivio code from the main binary, with its own sessions, MCP setup, and skill staging.

Hotkeys

Action macOS Windows
Quick translator ⌘⌥T Ctrl+Alt+T
Screenshot translation ⌘⇧A Ctrl+Shift+A
Selected-text translation ⌘⇧T Ctrl+Shift+T
Replace translation ⌘⇧R Ctrl+Shift+R
Lens capture & ask ⌘⇧G Ctrl+Shift+G

All hotkeys act as toggles and are remappable in Settings (with conflict detection). The tray menu has: Open AI Client · Show Translator · Settings · Quit.

Quick Start

  1. Download the latest release — macOS: Apple Silicon .dmg · Windows: NSIS -setup.exe.
  2. Install and launch. The DMG is unsigned; on first launch right-click → Open, or run: bash xattr -cr /Applications/Kivio.app macOS will ask for Accessibility (hotkeys, selected-text capture, paste-back) and Screen Recording (capture) permissions. Screen capture uses ScreenCaptureKit. On Windows, launching manually opens the AI client.
  3. Follow the first-run wizard — add a provider, optionally set up web search, confirm hotkeys.
  4. Go. Tray → Open AI Client for chat, tools, and documents; or press a hotkey anywhere for translation and Lens.

Kivio checks GitHub Releases for updates shortly after launch (can be disabled) and can download and install the update in-app.

What's New — v2.7.6

  • Conversation branching — fork a new conversation from any message; the source stays untouched and attachments are copied.
  • Accurate context metering — context usage is now anchored to real provider-reported token counts (aligned with pi), with a conservative floor so it never under-reports.
  • Model favorites — star models to pin them at the top of the selector.
  • Windows: fnm / nvm node support — Kivio loads your PowerShell profile PATH at startup, so node and CLIs installed via fnm or nvm are found without manual env injection.
  • Windows: run_command via PowerShell — shell commands run through PowerShell (pwsh → powershell) with correct quoting and UTF-8 output.
  • Obsidian connector — built-in Obsidian skills (markdown / bases / canvas / CLI), gated until you configure a vault.
  • Leaner system prompt — aligned with opencode: more concise with clearer work discipline, applied across chat and sub-agents.
  • Reliability — conversation index self-heal (no more lost history when starting a new chat), image preview keeps composer attachments, streaming tool-call id fix (SenseNova), auto-retry when an endpoint rejects the cache key, and a GitHub update-check fallback.

Full history: GitHub Releases.

Development

Layer Stack
Backend Rust · Tauri v2
Frontend React 18 · TypeScript · Vite · TailwindCSS v4
OCR Apple Vision (Swift sidecar) · Windows.Media.Ocr · RapidOCR (ONNX)
Python sandbox Pyodide, bundled offline
npm install
npm run dev          # full app: Rust backend + Vite UI (builds Swift sidecar on macOS)
npm run dev:ui       # Vite UI only, no Rust compile

npm run lint         # ESLint, zero warnings allowed
npm run typecheck    # tsc --noEmit
npm test             # Vitest frontend suite
cargo test --manifest-path src-tauri/Cargo.toml   # Rust tests

Architecture notes: CLAUDE.md and docs/. Release flow (docs/RELEASE_PACKAGING.md): GitHub Actions builds the macOS Apple Silicon DMG on v* tags; the Windows NSIS .exe is built locally and uploaded to the same release.

License

GPL-3.0-or-later © ZM. See LICENSE.

Community


Kivio · 中文

macOS / Windows 屏幕级 AI 助手:一个 Agentic AI 客户端,加上即时翻译、截图 OCR、视觉问答 —— 全部一键呼出,全部用你自己的 API Key。

下载  ·  功能  ·  热键  ·  快速开始  ·  English  ·  QQ 群:1104450740


Kivio 是什么?

Kivio 常驻托盘 / 菜单栏,工作在整个屏幕层面,而

Extension points exported contracts — how you extend this code

Component (Interface)
所有 UI 组件实现本 trait。`render` 返回每行一个 ANSI 字符串(可见列 ≤ width)。 [13 implementers]
src-tauri/src/kivio_code/tui/render.rs
StreamCoarse (Interface)
(no doc)
src/chat/streamingStore.ts
ScreenshotTranslationSettingsProps (Interface)
(no doc)
src/settings/ScreenshotTranslationSettings.tsx
NoConsoleWindow (Interface)
Extension trait applied to both `std::process::Command` and `tokio::process::Command` so callers can write `cmd.no_conso [4 …
src-tauri/src/proc.rs
ProjectDialogProps (Interface)
(no doc)
src/chat/ProjectDialog.tsx
ModelPairSelectProps (Interface)
(no doc)
src/settings/ModelPairSelect.tsx
ToolExecutor (Interface)
(no doc) [8 implementers]
src-tauri/src/chat/agent/execute.rs
AgentTodoIndicatorProps (Interface)
(no doc)
src/chat/AgentTodoIndicator.tsx

Core symbols most depended-on inside this repo

get
called by 1170
src-tauri/src/chat/sub_agent.rs
is_empty
called by 1164
src-tauri/src/kivio_code/tui/kill_ring.rs
push
called by 880
src-tauri/src/kivio_code/tui/kill_ring.rs
len
called by 568
src-tauri/src/kivio_code/tui/kill_ring.rs
as_str
called by 465
src-tauri/src/chat/model/types.rs
find
called by 327
src-tauri/src/skills/types.rs
write
called by 133
src-tauri/src/kivio_code/project_context.rs
take
called by 107
src-tauri/src/kivio_code/tui/terminal.rs

Shape

Function 4,609
Method 775
Class 381
Interface 110
Enum 82

Languages

Rust78%
TypeScript21%
Python1%

Modules by API surface

src-tauri/src/chat/commands.rs287 symbols
src-tauri/src/kivio_code/interactive/app.rs220 symbols
src-tauri/src/settings.rs175 symbols
src-tauri/src/chat/agent/compaction.rs116 symbols
src-tauri/src/kivio_code/tui/components/editor.rs103 symbols
src-tauri/src/kivio_code/interactive/mod.rs99 symbols
src-tauri/src/chat/agent/loop_tests.rs85 symbols
src-tauri/src/chat/sub_agent.rs80 symbols
src-tauri/src/kivio_code/interactive/tool_card.rs76 symbols
src-tauri/src/native_tools/files.rs75 symbols
src-tauri/src/api.rs75 symbols
src-tauri/src/chat/storage.rs73 symbols

For agents

$ claude mcp add kivio \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page