{"id":50147765,"url":"https://github.com/tiylabs/tiycode","last_synced_at":"2026-06-07T07:00:56.210Z","repository":{"id":349461672,"uuid":"1179035864","full_name":"tiylabs/tiycode","owner":"tiylabs","description":"TiyCode is an AI-first desktop coding agent. “钛可”是一款践行 AI First 理念的桌面版 Coding Agent","archived":false,"fork":false,"pushed_at":"2026-06-06T05:13:43.000Z","size":19967,"stargazers_count":9,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-06T06:08:40.088Z","etag":null,"topics":["agent","anthropic","claude","gemini","openai","vibe-coding"],"latest_commit_sha":null,"homepage":"https://tiy.ai","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiylabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-11T16:12:00.000Z","updated_at":"2026-06-06T01:33:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tiylabs/tiycode","commit_stats":null,"previous_names":["tiyagents/tiycode","tiylabs/tiycode"],"tags_count":173,"template":false,"template_full_name":null,"purl":"pkg:github/tiylabs/tiycode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiylabs%2Ftiycode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiylabs%2Ftiycode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiylabs%2Ftiycode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiylabs%2Ftiycode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiylabs","download_url":"https://codeload.github.com/tiylabs/tiycode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiylabs%2Ftiycode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34011812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","anthropic","claude","gemini","openai","vibe-coding"],"created_at":"2026-05-24T06:03:24.071Z","updated_at":"2026-06-07T07:00:56.201Z","avatar_url":"https://github.com/tiylabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./public/app-icon.png\" alt=\"TiyCode logo\" width=\"120\" /\u003e\n  \u003ch1\u003eTiyCode\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eAn AI-first desktop coding agent.\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003eDesigned for a new coding collaboration paradigm. Humans express goals, constraints, and feedback through conversation, while agents take the lead in understanding, execution, and forward progress.\u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"./README_zh.md\"\u003e简体中文\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tiylabs/tiycode/ci.yml?branch=master\u0026style=flat-square\u0026label=CI\" alt=\"CI\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/tiylabs/tiycode?style=flat-square\u0026label=Release\" alt=\"Release\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/downloads/tiylabs/tiycode/total?style=flat-square\u0026label=Downloads\" alt=\"Downloads\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/tiylabs/tiycode?style=flat-square\" alt=\"License\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Rust-1.77%2B-orange?style=flat-square\u0026logo=rust\u0026logoColor=white\" alt=\"Rust\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Platform-macOS%20%7C%20Windows%20%7C%20Linux-blue?style=flat-square\u0026logo=tauri\" alt=\"Platform\" /\u003e\n  \u003c/p\u003e\n  \u003cbr /\u003e\n  \u003cimg width=\"1611\" height=\"1032\"  alt=\"TiyCode screenshot\" src=\"https://github.com/user-attachments/assets/d30c016c-8642-43fe-bde9-0dac9feb2148\" /\u003e\n\u003c/div\u003e\n\n## Why TiyCode\n\nTiyCode \u003csub\u003e/taɪ koʊd/\u003c/sub\u003e is built for people who want coding to feel native to the AI era. Conversation is not a companion to the workflow here, but the starting point of it. You define goals, constraints, and feedback. The agent understands context, uses tools, and drives execution forward inside a real workspace.\n\nAround that collaboration model, TiyCode brings together Agent Profiles, workspace-based threads, code review, version control, terminal workflows, and an extensible runtime in one local-first desktop product.\n\n## Highlights\n\n- **AI-first coding collaboration.** TiyCode is designed around the idea that humans express intent through conversation while agents take the lead in execution.\n- **Agent Profiles.** Mix models from different providers, tune response style, language, and custom instructions, and switch profiles flexibly for different kinds of work.\n- **Custom Agents.** Create purpose-built sub-agents in Settings — each with its own name, system prompt, model tier, and allowed tools — then grant per-profile access and delegate work from the composer.\n- **Three-tier model architecture.** Each profile supports a Primary model for core reasoning, an Auxiliary model for helper tasks, and a Lightweight model for fast operations — with automatic fallback chains across tiers.\n- **Multi-provider support.** Connect to 13+ LLM providers out of the box — OpenAI, Anthropic, Google, Ollama, xAI, Groq, OpenRouter, DeepSeek, MiniMax, Kimi, and more — or add any OpenAI-compatible endpoint as a custom provider.\n- **Workspace-centered execution.** Threads stay grounded in the local workspace and connect naturally to code review, version control, repository inspection, Git worktrees, and terminal workflows.\n- **Task-aware execution.** Thread-scoped task boards, plan checkpoints, tool status events, and subagent progress make longer runs easier to follow and review.\n- **Persistent goal management.** Set long-running objectives for agents to pursue across multiple turns, with automatic continuation, budget controls, and progress tracking.\n- **Rich composer inputs.** Prompt input supports text, file/photo attachments, screenshots, slash command structured argument interpolation (`--key=value`, positional args, `{{placeholder}}` templates), and large-paste handling.\n- **Steer \u0026 Queue.** While the agent is running, choose to steer the conversation mid-execution or queue a follow-up message for the next round — keeping you in control without interrupting the workflow.\n- **Real-time execution streaming.** A rich thread stream event system delivers live updates — message deltas, tool calls, requested/active statuses, reasoning steps, subagent progress, and plan updates — all rendered through purpose-built AI Elements components.\n- **Operator-friendly experience.** Slash commands with structured argument parsing, smart conversation titles, context compression controls, commit message generation, external terminal handoff including Ghostty, and compact workbench controls help the product feel fast and practical in day-to-day use.\n- **Thread-level elapsed timer.** Track active execution time per thread, excluding pauses, with persistent tracking across sessions.\n- **Bilingual interface.** Full i18n coverage with English and Simplified Chinese, switchable at any time.\n- **ACP Server support.** TiyCode can run as a headless ACP (Agent Client Protocol) server via `tiycode acp --stdio` or `tiycode acp --http \u003caddr\u003e`, letting external tools and IDE plugins drive the agent runtime through a standard JSON-RPC protocol without the desktop GUI.\n- **IM channel gateway.** Connect TiyCode to WeChat or WeCom so you can chat with the agent directly from your messaging app — scan a QR code to log in, send messages and attachments, and receive streaming responses without opening the desktop GUI.\n- **Extensible by design.** Plugins, MCP servers, and Skills are treated as first-class building blocks through the `Extensions Center`.\n- **Built-in runtime path.** The main execution flow is `Frontend -\u003e Rust Core -\u003e BuiltInAgentRuntime -\u003e tiycore -\u003e LLM`.\n\n## Tech Stack\n\n- **Desktop shell:** Tauri 2\n- **Frontend:** React 19, TypeScript, Vite\n- **Backend / native core:** Rust\n- **AI runtime:** [`tiycore`](https://github.com/tiylabs/tiycore)\n- **UI foundation:** Tailwind CSS v4, shadcn/ui (Radix UI primitives), Vercel AI SDK (UI types), Lucide React icons, Motion animations\n- **Terminal:** xterm.js with addon-fit\n- **Code highlighting:** Shiki\n- **Persistence:** SQLite\n- **Testing:** Vitest with `@vitest/coverage-v8` for frontend units, plus Rust integration tests under Cargo\n- **Desktop integrations:** Tauri plugins for updater, autostart, window state, dialog, opener, and process control\n\n## Quick Start\n\n### Install via Homebrew (macOS)\n\n```bash\nbrew tap tiylabs/tap\nbrew install --cask tiycode\n```\n\nTo upgrade later:\n\n```bash\nbrew upgrade tiycode\n```\n\n### Download from GitHub Releases\n\nPre-built binaries for macOS, Windows, and Linux are available on the [Releases](https://github.com/tiylabs/tiycode/releases) page.\n\n\u003e **macOS requirement:** TiyCode currently requires **macOS 10.15 Catalina or later**. We recommend using a newer supported macOS release for the best compatibility.\n\u003e\n\u003e **Windows requirement:** TiyCode currently requires **Windows 10 version 1809 (build 17763) or later**. We recommend using the latest available version of **Windows 10 or Windows 11** for the best compatibility. The desktop app also depends on the **Microsoft Edge WebView2 Runtime**. On Windows 11 it is typically preinstalled; on supported Windows 10 systems the Tauri installer usually takes care of installing or updating it. In offline environments, you may need to install WebView2 manually before launching the app.\n\n### Build from Source\n\n#### Prerequisites\n\nBefore running the app, make sure your environment has the toolchain needed for a Tauri 2 project:\n\n- Node.js and npm\n- Rust toolchain\n- Platform dependencies required by Tauri\n\n#### Run in development\n\n```bash\nnpm install\nnpm run dev\n```\n\n#### Run the web UI only\n\n```bash\nnpm install\nnpm run dev:web\n```\n\n#### Build\n\n```bash\nnpm run build\n```\n\n#### Type-check the frontend\n\n```bash\nnpm run typecheck\n```\n\n#### Run Rust tests\n\n```bash\ncargo test --manifest-path src-tauri/Cargo.toml\n```\n\n## Architecture at a Glance\n\nTiyCode separates UI rendering, desktop orchestration, and agent execution into distinct layers:\n\n```mermaid\nflowchart LR\n  UI[React + TypeScript UI] --\u003e TAURI[Tauri Rust Core]\n  TAURI --\u003e RUNTIME[BuiltInAgentRuntime]\n  RUNTIME --\u003e CORE[tiycore]\n  TAURI --\u003e TOOLS[Workspace / Git / Worktree / Terminal]\n  TAURI --\u003e TASKS[Task Boards / Plans]\n  TAURI --\u003e CATALOG[Provider Catalog / Model Metadata]\n  TAURI --\u003e EXT[Extension Host]\n  EXT --\u003e PLUGINS[Plugins / MCP / Skills]\n  TAURI --\u003e ACP[ACP Server]\n  ACP --\u003e CLIENT[External Clients / IDE Plugins]\n  CORE --\u003e LLM[LLM Providers]\n  TAURI --\u003e DB[(SQLite)]\n  UI -.-\u003e|Thread Stream| TAURI\n```\n\nAt a high level:\n\n1. The **React UI** handles workbench rendering, thread interactions, and streaming updates. AI Elements components render messages, code blocks, reasoning, tool calls, and plans in a purpose-built thread surface.\n2. The **Rust core** is the source of truth for system access, policy decisions, persistence, and performance-sensitive local operations. Settings, threads, provider configurations, task boards, attachments, workspaces, and Git worktree metadata are persisted through SQLite and focused repository modules.\n3. The **built-in runtime** manages agent sessions, helper orchestration, tool profiles, task-board/plan events, and event folding. The three-tier model plan (Primary / Auxiliary / Lightweight) is resolved from Agent Profiles at run time, with provider catalog metadata used for model capabilities and normalization.\n4. The **extension host** integrates plugin, MCP, and skill capabilities into the desktop product model, governed by tool gateways, policy checks, and approval boundaries.\n\n## Repository Structure\n\n```text\nsrc/\n  app/           app bootstrap, routing, providers (theme, language), and global styles\n  pages/         route-level surfaces such as onboarding and workbench entry points\n  modules/       domain modules: workbench shell, onboarding, settings center, extensions center\n  features/      platform-facing capabilities: terminal (xterm.js), system metadata\n  components/    AI Elements — message, prompt input, code block, reasoning, plan, tool, confirmation, etc.\n  shared/        reusable UI primitives (shadcn/ui), helpers, types, and config\n  services/\n    bridge/      Tauri invoke commands (settings, agents, threads, git, terminal, extensions)\n    thread-stream/  real-time event streaming between Rust core and React UI\n  i18n/          internationalization — English and Simplified Chinese locale files\nsrc-tauri/\n  src/commands/    Rust command modules\n  src/core/        runtime/session orchestration, prompts, subagents, tools, workspaces, worktrees\n  src/acp/         ACP server — transport, session map, protocol handlers, event/permission bridges\n  src/extensions/  extension host, registries, and runtime integration\n  src/ipc/         frontend event/channel bridge\n  bundled-catalog/ provider model catalog snapshots bundled into the app\n  migrations/      database migrations\n  tests/           Rust integration tests\npublic/            static assets\n```\n\n## Development Commands\n\n```bash\nnpm run dev        # Start the full Tauri desktop app\nnpm run dev:web    # Start the Vite frontend only\nnpm run build      # Build the desktop app\nnpm run build:web  # Type-check and bundle web assets\nnpm run typecheck  # Run TypeScript validation\nnpm run test:unit  # Run Vitest unit tests\nnpm run test:unit -- --coverage\ncargo test --locked --manifest-path src-tauri/Cargo.toml\ncargo fmt --check --manifest-path src-tauri/Cargo.toml\n```\n\n## Continuous Integration\n\nPull requests to `master` run GitHub Actions checks for commit message format, frontend type-checking, Vitest unit tests, web asset builds, Rust formatting, and locked Rust tests. An optional PR review workflow can run `TiyAgents/code-review-agent-action` when the required LLM secrets and variables are configured.\n\n## Extensions Model\n\nTiyCode treats extensibility as a first-class part of the desktop workbench.\n\n- **Plugins** provide locally installed extension packages with hooks, tools, commands, and skill packs.\n- **MCP** is modeled as its own extension category and managed by the Rust host, including user/workspace scoped configuration.\n- **Skills** act as reusable agent capability assets and are indexed from builtin, workspace, or plugin sources.\n- **Provider catalogs** are bundled as snapshots and can be normalized or refreshed so model capabilities stay aligned with runtime behavior.\n\nThese capabilities are surfaced through the `Extensions Center`, while runtime access is still governed by the host through tool gateways, policy checks, approvals, and audit boundaries.\n\n## ACP Server\n\nTiyCode can expose its agent runtime as an **ACP (Agent Client Protocol)** server, allowing external tools and IDE plugins to interact with TiyCode's agent capabilities through a standard JSON-RPC protocol — without requiring the desktop GUI.\n\n### Transport modes\n\n| Mode | Command | Description |\n|------|---------|-------------|\n| **stdio** | `tiycode acp --stdio` | Headless server over stdin/stdout. Stdout is reserved for ACP JSON-RPC; logs go to stderr. |\n| **HTTP / WebSocket** | `tiycode acp --http 127.0.0.1:0` | Opt-in HTTP endpoint with WebSocket transport at `GET /acp` and a health check at `GET /health`. |\n\n\u003e The HTTP/WebSocket mode is **disabled by default** and only listens on loopback addresses. It does not perform ACP authentication and is intended only for trusted local processes. Do not expose it to non-loopback interfaces without adding an external authentication layer.\n\n### CLI setup\n\nTo make the `tiycode` command available system-wide, install it to PATH via **Settings → General → ACP Server → CLI in PATH**, or manually:\n\n```bash\n# After installing TiyCode desktop app\nsudo ln -s /Applications/TiyCode.app/Contents/MacOS/TiyCode /usr/local/bin/tiycode\n```\n\nOn macOS/Linux you can also set `TIY_ACP_HTTP_LISTEN=127.0.0.1:0` before launching the desktop app to enable the HTTP/WebSocket ACP endpoint alongside the GUI.\n\n### Key capabilities\n\n- **Local execution.** File operations and terminal commands run inside TiyCode's agent runtime — the ACP client does not need to handle `fs/*` or `terminal/*` requests.\n- **Streaming updates.** Clients receive live assistant messages, tool call status and results, plan updates, and file-change metadata.\n- **Permission delegation.** When the policy engine requires approval, the client receives a `session/request_permission` request with `allow_once` / `reject_once` options. Unanswered requests are auto-rejected after 60 seconds.\n- **Session mapping.** ACP `SessionId` maps to an internal TiyCode thread ID. Creating, loading, listing, prompting, cancelling, and closing sessions all bridge to the existing thread/run managers.\n\nSee [`docs/acp-server.md`](./docs/acp-server.md) for the full protocol and implementation details.\n\n## Troubleshooting \u0026 Debugging\n\nWhen something goes wrong — model requests not being sent, responses not arriving, or behavior not matching expectations — you can use the `RUST_LOG` environment variable to control log verbosity on the Rust / tiycore side.\n\n| `RUST_LOG` value | What you get |\n|---|---|\n| `RUST_LOG=tiycore=debug` | Model request metadata and response content summaries — good for verifying which model is called, what prompt is sent, and whether a response is received. |\n| `RUST_LOG=tiycore=trace` | Full SSE stream data including every chunk — useful when you need to inspect raw streaming payloads or diagnose streaming-level issues. |\n| `RUST_LOG=debug` | Debug-level logs for **all** crates (noisy, but covers the entire stack). |\n| `RUST_LOG=info` | Default level — informational messages only. |\n\n### How to set it\n\n**From source (development):**\n\n```bash\n# macOS / Linux\nRUST_LOG=tiycore=debug npm run dev\n\n# Or export before running\nexport RUST_LOG=tiycore=debug\nnpm run dev\n```\n\n**Installed app (macOS):**\n\n```bash\nRUST_LOG=tiycore=debug /Applications/TiyCode.app/Contents/MacOS/TiyCode\n```\n\n**Windows (PowerShell):**\n\n```powershell\n$env:RUST_LOG=\"tiycore=debug\"\nnpm run dev\n```\n\nLogs are written to stderr / the terminal where the app was launched. For installed builds, you can also check the log file in the TiyCode data directory.\n\n### Common scenarios\n\n- **Model not responding:** Start with `RUST_LOG=tiycore=debug` to confirm the request is being sent and check the status code / error message in the summary.\n- **Streaming looks broken or partial:** Use `RUST_LOG=tiycore=trace` to inspect the raw SSE events and see exactly where the stream stops or diverges.\n- **Something deeper in the Rust core:** Try `RUST_LOG=debug` to capture logs from all crates, then narrow down the relevant module.\n\n## Current Project Status\n\nThe repository already contains a substantial desktop shell, workbench UI, onboarding flow, settings center, built-in runtime path, Git/worktree drawer, task boards, attachments, provider catalog handling, and extension architecture. At the same time, it should still be read as an actively evolving project rather than a polished end-user release with exhaustive product documentation.\n\nThat means the best use cases today are:\n\n1. Evaluating the architecture and product direction.\n2. Running the desktop app locally from source.\n3. Extending the workbench, runtime, or extension system as a contributor.\n\n## License\n\nThis project is licensed under the Apache License 2.0. See `LICENSE` for details.\n\n## Community\n\nJoin our WeChat group to connect with the author and other users!\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"320\" alt=\"WeChat Group\" src=\"https://tiy.ai/images/wechat-qrcode.jpg\" /\u003e\n\u003c/div\u003e\n\n## Acknowledgements\n\nThis project was inspired by the following projects and tools:\n\n- [pi-mono](https://github.com/badlogic/pi-mono)\n- [nanobot](https://github.com/HKUDS/nanobot)\n- [lobe-icons](https://github.com/lobehub/lobe-icons)\n- Codex\n- ClaudeCode\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiylabs%2Ftiycode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiylabs%2Ftiycode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiylabs%2Ftiycode/lists"}