Skip to content

sykuang/Zitong

Repository files navigation

Zitong

Your AI, one shortcut away β€” even above fullscreen apps.

Zitong is a native desktop AI chat client for macOS and Windows. Press a hotkey, select any text in any app, and let AI transform it instantly β€” no context switching required.

Lightweight, private (all data stored locally), and works with 10+ AI providers.


Why Zitong?

Most AI chat apps are browser tabs. Zitong is different:

  • Instant overlay β€” Press βŒ˜β‡§Space to summon a Spotlight-like command palette that floats above everything, including fullscreen apps, across all macOS Spaces.
  • Works on selected text β€” Zitong auto-captures your current selection, runs an AI command on it, and gives you the result ready to paste back. No copy-paste dance.
  • 10+ providers, one app β€” Switch between OpenAI, Claude, Gemini, Copilot, Ollama (local), and more. Mix and match per conversation.
  • 100% local data β€” Conversations, settings, and templates live in a local SQLite database. Nothing leaves your machine except API calls to your chosen provider.

✨ Key Features

🎯 Overlay Command Palette

The headline feature. A Spotlight-style panel you can invoke from anywhere:

  1. Select text in any app (browser, editor, terminal, etc.)
  2. Press the global hotkey (βŒ˜β‡§Space by default)
  3. Pick an AI command β€” Zitong auto-copies your selection, sends it to the LLM with the command's prompt
  4. Act on the result:
    • Replace β€” puts the AI result in your clipboard, ready to paste over the original
    • Insert After β€” appends the result after your original text
    • Open in Chat β€” continues the conversation in the full chat window
    • Shorter / Longer β€” quick refinements without leaving the overlay
    • Follow-up β€” type a custom instruction to iterate on the result

Works above fullscreen apps on macOS via NSPanel. On Windows, the overlay uses a standard always-on-top window.

πŸ’¬ Full Chat Interface

A complete conversation UI when you need more than a quick command:

  • Streaming responses with real-time token display and stop button
  • Markdown + syntax-highlighted code blocks (with one-click copy)
  • Switch provider & model mid-conversation β€” models are fetched live from each provider's API
  • Auto-generated conversation titles after the first exchange
  • Token count per message
  • Multiple chat styles β€” Minimal, Bubble, or Card layout

πŸ€– Custom Assistants

Create AI personas tailored to your workflow:

  • Define a system prompt, emoji icon, and description
  • Override provider, model, temperature (0–2), and max tokens per assistant
  • Set a default assistant that's auto-selected on launch
  • Switch assistants mid-conversation from the chat header

πŸ“ Prompt Templates

Reusable prompts with dynamic variables:

  • Use {{variable}} syntax β€” variables are auto-detected and shown in a visual preview
  • Organize templates by category (General, Coding, Writing, Analysis, Creative)

⚑ AI Commands

Customizable commands that power the overlay palette:

  • Configure each command's behavior (Replace, Insert After, or Open in Chat)
  • Set a system prompt, provider, model, and output language per command
  • Assign keyboard shortcuts for your most-used commands
  • Enable/disable and reorder commands

πŸ”Œ Multi-Provider Support

Connect to any combination of these providers:

Provider Auth Notes
OpenAI API key GPT-4o, GPT-4, etc.
Anthropic API key Claude 3.5, Claude 3, etc.
Google Gemini API key
GitHub Copilot OAuth Full device-flow sign-in
Ollama None Local models, no API key needed
Mistral API key
Groq API key
DeepSeek API key
OpenRouter API key
xAI (Grok) API key
OpenAI-compatible API key + base URL Any compatible endpoint

Each provider supports: enable/disable toggle, live model fetching, set-as-default, and connection testing.

🎨 Appearance & Customization

  • Theme: System, Light, or Dark
  • Accent colors: Violet, Blue, Purple, Green, Orange, Red, Pink, Cyan
  • Font: System Default, Inter, JetBrains Mono, SF Pro (size 12–20px)
  • Code themes: One Dark, GitHub, Dracula, Solarized
  • Compact mode for smaller screens

πŸ–₯️ Native Desktop Experience

  • System tray β€” close the window and Zitong keeps running in the background
  • Launch at login β€” start hidden, ready for your first hotkey press
  • macOS menu bar integration with standard Edit/Window menus
  • Separate settings window β€” changes sync live to the main app

πŸ” Comparison with Alternatives

Feature Zitong BoltAI ChatGPT App Claude App Raycast AI Jan Msty
Overlay above fullscreen apps βœ… βœ… ❌ ❌ βœ… ❌ ❌
Auto-capture selected text βœ… βœ… ❌ ❌ βœ… ❌ ❌
Multi-provider (10+) βœ… βœ… ❌ ❌ ❌ βœ… βœ…
Local models (Ollama) βœ… βœ… ❌ ❌ ❌ βœ… βœ…
GitHub Copilot support βœ… ❌ ❌ ❌ ❌ ❌ ❌
Custom AI commands βœ… βœ… ❌ ❌ βœ… ❌ ❌
Custom assistants βœ… βœ… βœ… ❌ ❌ βœ… βœ…
Prompt templates with variables βœ… βœ… ❌ ❌ ❌ ❌ ❌
Cross-platform βœ… macOS/Win ❌ macOS only βœ… macOS/Win βœ… macOS/Win ❌ macOS only βœ… macOS/Win βœ… macOS/Win
Open source βœ… MIT ❌ ❌ ❌ ❌ βœ… AGPL ❌
100% local data βœ… βœ… ❌ ❌ ❌ βœ… βœ…
Free βœ… ❌ Paid βœ… Free tier βœ… Free tier ❌ Paid βœ… βœ… Free tier

In short: Zitong combines the overlay-driven workflow of BoltAI with cross-platform support, GitHub Copilot integration, and full open-source transparency β€” at no cost.

πŸ› οΈ Tech Stack

Layer Technology
Framework Tauri 2.x (Rust backend + webview frontend)
Frontend React 19 Β· TypeScript Β· Vite Β· Tailwind CSS 4
Database SQLite (via rusqlite, bundled)
HTTP/Streaming reqwest + Tokio async runtime
UI Libraries Lucide icons Β· React Markdown (GFM) Β· React Syntax Highlighter
Tauri Plugins Global Shortcuts Β· Clipboard Manager Β· Dialog Β· Opener Β· Auto-start Β· tauri-nspanel (macOS overlay)

πŸ“‹ Prerequisites

  • Node.js (v20.19+ or v22.12+)
  • npm (package manager, bundled with Node.js)
  • Rust (latest stable)
  • Operating System: macOS 10.15+ or Windows 10+

πŸš€ Installation

From Source

  1. Clone the repository

    git clone https://github.com/sykuang/Zitong.git
    cd Zitong
  2. Install dependencies

    npm install
  3. Run in development mode

    npx tauri dev

Building for Production

  1. Build the application

    npx tauri build
  2. Install the built application

    macOS:

    npm run install:dmg

    This will mount the DMG and copy the app to your Applications folder.

    Windows: The installer will be in src-tauri/target/release/bundle/

macOS: Bypassing Gatekeeper (Unsigned Build)

Release builds are not notarized or code-signed, so macOS Gatekeeper will block the app on first launch. Use one of the methods below to allow it.

Option A β€” Right-click β†’ Open (easiest)

  1. Open Finder β†’ Applications
  2. Right-click (or Control-click) Zitong.app
  3. Select Open from the context menu
  4. In the dialog that appears, click Open

You only need to do this once; subsequent launches work normally.

Option B β€” System Settings

  1. Try opening Zitong normally (it will be blocked)
  2. Go to System Settings β†’ Privacy & Security
  3. Scroll down β€” you'll see "Zitong" was blocked from use because it is not from an identified developer
  4. Click Open Anyway and authenticate

Option C β€” Terminal (xattr)

xattr -cr /Applications/Zitong.app

This strips the quarantine flag. You can then open the app normally.

🎯 Quick Start

1. Set up a provider

Launch Zitong β†’ open Settings (⌘,) β†’ go to Providers β†’ add an API key for at least one provider (or connect GitHub Copilot via OAuth, or point to a local Ollama instance).

2. Chat

Click New Chat in the sidebar or press ⌘N. Pick a model from the dropdown and start talking.

3. Use the overlay

Select text anywhere on your screen β†’ press βŒ˜β‡§Space β†’ pick a command (e.g., "Fix Grammar", "Explain Code", "Translate") β†’ the result is ready to paste.

GitHub Copilot Setup

  1. Settings β†’ Providers β†’ select GitHub Copilot
  2. Click Authenticate with GitHub β€” a device code is shown and auto-copied
  3. Complete the OAuth flow in your browser
  4. Models become available immediately

⌨️ Keyboard Shortcuts

Action macOS Windows
Overlay Command Palette βŒ˜β‡§Space (customizable) Ctrl+Shift+Space
New Chat ⌘N Ctrl+N
Toggle Sidebar ⌘B Ctrl+B
Open Settings ⌘, Ctrl+,
Search Conversations ⌘K Ctrl+K
Focus Chat Input ⌘L Ctrl+L
Delete Conversation βŒ˜β‡§βŒ« Ctrl+Shift+Backspace

The global hotkey is fully customizable in Settings β†’ Shortcuts with a visual key recorder.

πŸ—„οΈ Data Storage

Zitong stores all data locally in a SQLite database:

  • macOS: ~/Library/Application Support/com.primattek.zitong/zitong.db
  • Windows: %APPDATA%\com.primattek.zitong\zitong.db

The database includes:

  • Conversations and messages
  • AI provider configurations
  • Settings and preferences
  • Prompt templates
  • Custom assistants
  • AI commands

πŸ”§ Development

Project Structure

Zitong/
β”œβ”€β”€ src/                    # React frontend
β”‚   β”œβ”€β”€ components/         # UI components
β”‚   β”œβ”€β”€ context/           # React context providers
β”‚   β”œβ”€β”€ commands/          # Tauri IPC wrappers
β”‚   └── types/             # TypeScript types
β”œβ”€β”€ src-tauri/             # Rust backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ commands.rs    # Tauri command handlers
β”‚   β”‚   β”œβ”€β”€ providers.rs   # AI provider implementations
β”‚   β”‚   β”œβ”€β”€ db.rs          # SQLite database layer
β”‚   β”‚   β”œβ”€β”€ panel.rs       # macOS overlay support
β”‚   β”‚   └── lib.rs         # Main entry point
β”‚   └── Cargo.toml         # Rust dependencies
β”œβ”€β”€ package.json           # Node.js dependencies
└── vite.config.ts         # Vite configuration

Running Tests

# Frontend tests
npm run build

# Rust tests
cd src-tauri
cargo test

Code Style

  • Frontend: ESLint + Prettier
  • Backend: rustfmt + clippy
# Format Rust code
cd src-tauri
cargo fmt

# Lint Rust code
cargo clippy

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“§ Contact


Note: This is an early-stage project under active development. Some features may be incomplete or experimental.

About

Native desktop AI chat client with a Spotlight-like overlay. Press a hotkey, select text in any app, and let AI transform it instantly. Supports 10+ providers. macOS, Windows, Linux.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors