Skip to content
yangxijia111Public

About

Local development cockpit with Repository Inventory — discover local Git repositories and verify they are safely synced to GitHub.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CodeDeck logo

CodeDeck

本地开发驾驶舱 —— 项目管理、Git 仓库清单与 GitHub 远端验证,尽在一个桌面应用。

中文 | English

💡 不知道这个应用怎么用? 界面支持中文:应用内右上角 ⚙ 设置 → General → Language → 中文 即可切换。 完整的图文操作指南见 《CodeDeck 使用手册》。

CI status License Tauri 2 React 19 TypeScript 5.8


简介

CodeDeck 是一个本地优先(local-first)的桌面应用,把分散在项目文件夹、终端、编辑器、Git 工具和浏览器标签页中的开发工作流,整合到一个可搜索的桌面面板中。

本项目基于开源项目 JadnK/CodeDeck(MIT 协议,v1.3.1 基线)进行二次开发,新增了 Repository Inventory(仓库清单) 功能域:发现本机磁盘上的 Git 仓库,检查本地跟踪状态(分支、ahead/behind、工作区脏状态),并验证已配置的 GitHub 远端的可访问性。

CodeDeck 无需账号、无需服务器,所有配置数据都保存在本机。

功能特性

基础功能(来自上游 CodeDeck)

功能 说明
项目面板 搜索、收藏、归档、扫描和整理本地开发项目。
项目创建 添加文件夹、克隆 HTTPS/SSH/本地 Git 仓库,或从内置与自定义模板创建项目。
IDE 与终端启动器 用每个项目偏好的 IDE、终端或系统文件管理器打开项目。
构建与运行 保存命令、工作目录、环境变量、build/run 动作与开发端口。
实时进程 跟踪 stdout/stderr、查看命令状态、停止活动进程,可选桌面通知。
Git 工作台 查看 diff、管理分支、暂存文件、提交、fetch、pull、push,并处理文本合并冲突。
启动集合(Launch sets) 并行或按顺序启动多个项目、命令、终端、IDE、文件夹和 URL。
项目待办 维护轻量的项目级任务,支持状态、优先级和手动排序。
本地配置 导入/导出设置,浅色/深色/跟随系统主题,支持最小化到系统托盘。
多语言界面 应用界面支持德语和英语切换。

Repository Inventory(本项目新增)

功能 说明
多根目录扫描 配置多个扫描根目录(可设深度、是否跟随符号链接、是否包含隐藏目录),实时流式上报进度,可随时取消。
仓库发现 识别标准仓库、worktree、submodule 和 bare 仓库。
Git 状态聚合 汇总分支、工作区脏状态、已暂存/未暂存/未跟踪文件数量、ahead/behind 计数与最后提交时间。
同步状态判定 自动判定 SYNCED / LOCAL_AHEAD / REMOTE_AHEAD / DIVERGED / NO_UPSTREAM / NO_REMOTE。
GitHub 远端验证 解析 remote 归一化为 owner/repo,调用 GitHub API 验证远端仓库的可访问性(404 不等于已删除——私有仓库无权限时同样返回 404)。
持久化清单 扫描结果存入独立 SQLite 数据库(<appData>/inventory.sqlite3),跨会话保留。
风险过滤视图 按 已同步 / 待推送 / 仅本地 / 落后远端 / 已分叉 / 远端异常 / 错误 快速过滤。
排除规则 按模式排除不需要关注的目录。

项目截图

项目面板
项目面板
项目详情与开发动作
项目详情
Git 管理
Git 管理
启动集合配置
启动集合

截图展示 CodeDeck 主功能界面。Repository Inventory 页面的截图将随版本更新补充。

环境要求

从源码运行需要:

Windows 需要 WebView2;Linux 需要 webkit2gtk 等库;macOS 需要 Xcode Command Line Tools。详见 Tauri 官方前置条件页面。

安装与配置

git clone https://github.com/yangxijia111/CodeDeck.git
cd CodeDeck

pnpm install --frozen-lockfile

使用方法

桌面应用模式(完整功能)

pnpm tauri:dev

仅前端模式(界面开发)

pnpm dev

仅前端模式适合界面开发。文件对话框、进程执行、IDE 启动、系统托盘等原生能力需要完整的 Tauri 应用。

典型使用流程

  1. 启动 CodeDeck,添加已有项目文件夹、扫描项目目录、克隆仓库或从模板创建项目。
  2. 在 Repository Inventory 中配置扫描根目录,执行扫描,查看各仓库的同步状态。
  3. 对 待推送、已分叉 或 远端异常 的仓库,直接跳转 Git 工作台完成提交与推送。
  4. 为多项目工作流创建启动集合,一键拉起完整开发环境。

分页面的完整使用指南见 docs/README.md:

项目目录结构

CodeDeck/
├── src/                                  # React + TypeScript 前端
│   ├── app/                              # 应用状态与动作
│   ├── features/                         # 功能面板
│   │   ├── projects/                     #   项目管理
│   │   ├── git/、github/                 #   Git 工作台与 GitHub 面板
│   │   ├── processes/                    #   进程监控
│   │   ├── workspaces/                   #   启动集合
│   │   ├── repository-inventory/         #   仓库清单(本项目新增)
│   │   └── settings/、onboarding/、updates/
│   └── shared/                           # 共享组件、类型、存储与 Tauri 桥接
├── src-tauri/                            # Rust 后端与原生集成
│   ├── src/
│   │   ├── commands/                     # Tauri IPC 命令
│   │   ├── git/                          # Git CLI 封装与输出解析
│   │   ├── inventory/                    # 仓库清单域:扫描、检查、分类、SQLite(本项目新增)
│   │   ├── process/                      # 进程管理
│   │   ├── projects/                     # 项目检查、模板、校验
│   │   └── platform/                     # 启动器与系统通知
│   ├── capabilities/                     # Tauri 权限配置
│   └── tauri.conf.json
├── docs/                                 # 用户文档与截图
├── .github/workflows/                    # CI 与发布工作流
├── CHANGELOG.md
├── CONTRIBUTING.md
└── NOTICE.md                             # 上游声明与第三方组件

核心功能说明:Repository Inventory

Repository Inventory 回答一个具体的问题:这台机器上有哪些 Git 开发仓库,它们各自的本地状态如何,已配置的 GitHub 远端现在是否可访问?

工作方式:

  1. 发现:按配置的扫描根目录递归查找 Git 仓库(深度上限可调),通过 .git 目录类型区分标准仓库、worktree、submodule 与 bare 仓库;相对 gitdir: 指针相对仓库目录解析,与进程工作目录无关。
  2. 检查:对每个仓库执行只读的 Git 检查(git status、git log、git remote 等,由持续排空输出并强制超时的独立执行器运行),聚合出分支、脏状态、文件计数、ahead/behind 等本地状态。
  3. 验证:将 remote URL 归一化为 GitHub owner/repo(URL 中嵌入的 credential 在进入数据库/界面前被剥离),用应用内已配置的 GitHub token 调用 GitHub API,验证远端仓库的可访问性,得到 VERIFIED / NOT_FOUND_OR_INACCESSIBLE / UNAUTHENTICATED / RATE_LIMITED / UNAVAILABLE 等结论。
  4. 判定:结合本地 ahead/behind 与远端验证结果,输出同步结论:已同步、待推送、落后远端、已分叉、无上游、无远端。
  5. 沉淀:结果写入 SQLite,重复扫描按稳定 ID 增量更新;只扫描部分根时不会误标其他根下的仓库,仓库从已扫描的根下消失后才标记缺失。

设计原则:扫描只读,不会移动、修改或执行被扫描项目中的任何代码;不自动执行克隆仓库里的脚本。

注意:404 并不代表远端仓库已删除——GitHub 对当前凭据无权访问的私有仓库同样返回 404,因此该状态表达为"不可用且原因不确定"。识别"曾上传到 GitHub 但远端已丢失"的仓库(Missing Remote Reconciliation)属于尚未开发的后续里程碑。

构建与发布

质量检查

pnpm build                                        # tsc 类型检查 + vite 构建
cargo check --manifest-path src-tauri/Cargo.toml  # Rust 检查

生产构建

pnpm tauri:build

生成的平台安装包位于:

src-tauri/target/release/bundle/

版本与发布

  • 版本一致性检查:pnpm version:check
  • 发布流程:pnpm release(脚本 scripts/release.mjs),详见 docs/releasing.md
  • 更新器配置:见 docs/updater-setup.md。注意:本仓库的 tauri.conf.json 中应用内更新器 endpoint 仍指向上游 JadnK/CodeDeck 的 release,衍生维护者如需自建更新源,请按该文档替换为自己的 endpoint 与签名公钥。

开源协议

本项目基于 MIT 协议 发布。

本项目包含基于 JadnK/CodeDeck(MIT)的代码,上游声明与新增第三方组件清单见 NOTICE.md。

贡献说明

欢迎贡献!请在提交 Pull Request 前阅读 CONTRIBUTING.md,并遵守 CODE_OF_CONDUCT.md。

提交前请确保以下检查通过:

pnpm build
cargo check --manifest-path src-tauri/Cargo.toml

更新计划

当前关注方向:

  • Repository Inventory 的 GitHub 账号仓库清单对账(发现 remote 丢失的本地仓库并匹配候选远端)
  • 应用数据迁移到 SQLite 存储
  • Docker Compose 控制
  • 更丰富的端口与进程总览
  • 可复用的启动集合模板
  • 命令面板

欢迎通过 GitHub Issues 提出想法和缺陷报告。

致谢

  • JadnK/CodeDeck —— 本项目基于该优秀项目(MIT)构建,基础功能与架构均来自上游。
  • Tauri、React、Rust、Vite 及所有开源依赖的作者。

Overview

CodeDeck is a local-first desktop app that brings a development workflow usually spread across project folders, terminals, editors, Git tools, and browser tabs into one searchable desktop dashboard.

This repository is built on top of the open-source project JadnK/CodeDeck (MIT licensed, v1.3.1 baseline) and adds a new Repository Inventory feature domain: it discovers local Git repositories, inspects their local tracking state (branch, ahead/behind, working-tree status), and verifies the accessibility of their configured GitHub remotes.

CodeDeck requires no account and no server; all configuration stays on your machine.

Features

Core features (from upstream CodeDeck)

Feature Description
Project dashboard Search, favorite, archive, scan, and organize local development projects.
Project creation Add folders, clone HTTPS/SSH/local Git repositories, or create projects from built-in and custom templates.
IDE and terminal launchers Open each project in its preferred IDE, terminal, or system file manager.
Build and run Save commands, working directories, environment variables, build/run actions, and development ports.
Live processes Follow stdout and stderr, inspect command status, stop active processes, and receive optional desktop notifications.
Git workbench View diffs, manage branches, stage files, commit, fetch, pull, push, and resolve text merge conflicts.
Launch sets Start several projects, commands, terminals, IDEs, folders, and URLs in parallel or sequence.
Project todos Keep lightweight project-specific tasks with status, priority, and manual ordering.
Local configuration Import and export settings, light/dark/system themes, and system tray integration.
Multilingual UI Switch the application interface between German and English.

Repository Inventory (added in this repository)

Feature Description
Multi-root scanning Configure multiple scan roots (max depth, symlink following, hidden directories), stream progress live, and cancel at any time.
Repository discovery Detects standard repositories, worktrees, submodules, and bare repositories.
Git state aggregation Branch, dirty state, staged/unstaged/untracked counts, ahead/behind counters, and last commit time.
Sync state classification Automatically classified as SYNCED / LOCAL_AHEAD / REMOTE_AHEAD / DIVERGED / NO_UPSTREAM / NO_REMOTE.
GitHub remote verification Normalizes remotes to owner/repo and calls the GitHub API to verify remote accessibility (a 404 does not mean deleted — private repositories without permission also return 404).
Persistent inventory Scan results are stored in a dedicated SQLite database (<appData>/inventory.sqlite3) and survive restarts.
Risk-focused views Filter quickly by synced / needs-push / local-only / behind / diverged / broken remote / errors.
Exclusion rules Exclude directories by pattern.

Screenshots

Project dashboard
Project dashboard
Project details and development actions
Project details
Git management
Git management
Launch set configuration
Launch sets

The screenshots show the core CodeDeck interface. Screenshots of the Repository Inventory page will be added with a future release.

Requirements

To run from source you need:

Windows requires WebView2; Linux requires webkit2gtk and related libraries; macOS requires the Xcode Command Line Tools. See the Tauri prerequisites page for details.

Installation

git clone https://github.com/yangxijia111/CodeDeck.git
cd CodeDeck

pnpm install --frozen-lockfile

Usage

Desktop application mode (full features)

pnpm tauri:dev

Frontend-only mode (interface work)

pnpm dev

The frontend-only mode is useful for interface work. Filesystem dialogs, process execution, IDE launching, system tray integration, and other native features require the full Tauri application.

Typical workflow

  1. Start CodeDeck and add an existing project folder, scan a projects directory, clone a repository, or create a project from a template.
  2. Configure scan roots in Repository Inventory, run a scan, and review each repository's sync state.
  3. For repositories marked needs-push, diverged, or with a broken remote, jump straight into the Git workbench to commit and push.
  4. Create launch sets for multi-project workflows and bring up a complete development environment in one click.

The complete page-by-page guide is available in docs/README.md:

Project Structure

CodeDeck/
├── src/                                  # React + TypeScript frontend
│   ├── app/                              # Application state and actions
│   ├── features/                         # Feature panels
│   │   ├── projects/                     #   Project management
│   │   ├── git/, github/                 #   Git workbench and GitHub panel
│   │   ├── processes/                    #   Process monitoring
│   │   ├── workspaces/                   #   Launch sets
│   │   ├── repository-inventory/         #   Repository Inventory (added here)
│   │   └── settings/, onboarding/, updates/
│   └── shared/                           # Shared components, types, storage, and Tauri bridge
├── src-tauri/                            # Rust backend and native integrations
│   ├── src/
│   │   ├── commands/                     # Tauri IPC commands
│   │   ├── git/                          # Git CLI wrapper and output parsing
│   │   ├── inventory/                    # Inventory domain: scanner, inspector, classifier, SQLite (added here)
│   │   ├── process/                      # Process management
│   │   ├── projects/                     # Project inspection, templates, validation
│   │   └── platform/                     # Launchers and system notifications
│   ├── capabilities/                     # Tauri capability configuration
│   └── tauri.conf.json
├── docs/                                 # User documentation and screenshots
├── .github/workflows/                    # CI and release workflows
├── CHANGELOG.md
├── CONTRIBUTING.md
└── NOTICE.md                             # Upstream notice and third-party components

Core Feature: Repository Inventory

Repository Inventory answers one concrete question: which Git development repositories exist on this machine, what is their local state, and are their configured GitHub remotes currently accessible?

How it works:

  1. Discover: recursively find Git repositories under the configured scan roots (depth limits adjustable), distinguishing standard repositories, worktrees, submodules, and bare repositories by their .git entries; relative gitdir: pointers resolve against the repository directory, independent of the process working directory.
  2. Inspect: run read-only Git checks per repository (git status, git log, git remote, etc.) through a dedicated executor that drains output continuously while enforcing timeouts, aggregating branch, dirty state, file counts, and ahead/behind into a local state.
  3. Verify: normalize remote URLs to a GitHub owner/repo slug (credentials embedded in URLs are stripped before anything reaches the database or UI) and call the GitHub API with the token already configured in the app to verify remote accessibility, yielding VERIFIED / NOT_FOUND_OR_INACCESSIBLE / UNAUTHENTICATED / RATE_LIMITED / UNAVAILABLE conclusions.
  4. Classify: combine local ahead/behind with remote verification into a sync verdict: synced, needs push, behind, diverged, no upstream, or no remote.
  5. Persist: results are written to SQLite and updated incrementally on repeated scans under stable repository IDs; scanning a subset of roots never marks repositories under other roots missing, and a repository is only marked missing after it disappears from a root that was actually scanned.

Design principle: scanning is read-only. It never moves, modifies, or executes anything inside the scanned projects, and it never runs scripts from cloned repositories.

Note: a 404 does not prove the remote repository was deleted — GitHub also returns 404 for private repositories the current credentials cannot access, so the state is reported as "unavailable with uncertain cause". Detecting repositories whose remote was lost after being uploaded to GitHub (Missing Remote Reconciliation) is a future milestone that has not been developed yet.

Build and Release

Quality checks

pnpm build                                        # tsc type check + vite build
cargo check --manifest-path src-tauri/Cargo.toml  # Rust checks

Production build

pnpm tauri:build

Generated platform packages are written to:

src-tauri/target/release/bundle/

Versioning and release

  • Version consistency check: pnpm version:check
  • Release flow: pnpm release (script scripts/release.mjs), see docs/releasing.md
  • Updater configuration: see docs/updater-setup.md. Note that the in-app updater endpoint in this repository's tauri.conf.json still points to the upstream JadnK/CodeDeck release. Derivative maintainers who want their own update channel should replace the endpoint and signing public key as described in that document.

License

This project is released under the MIT License.

This repository includes code based on JadnK/CodeDeck (MIT). See NOTICE.md for the upstream notice and third-party components added by this repository.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request and follow the CODE_OF_CONDUCT.md.

Before submitting changes, make sure the following checks pass:

pnpm build
cargo check --manifest-path src-tauri/Cargo.toml

Roadmap

Current areas of interest:

  • GitHub account repository reconciliation for Repository Inventory (discovering local repositories whose remote was lost and matching candidate remotes)
  • SQLite-backed application storage
  • Docker Compose controls
  • A richer port and process overview
  • Reusable launch-set templates
  • A command palette

Ideas and bug reports are welcome in GitHub Issues.

Acknowledgements

  • JadnK/CodeDeck — this project is built on that excellent project (MIT); the core features and architecture come from upstream.
  • The authors of Tauri, React, Rust, Vite, and every open-source dependency.

Built for developers who want less setup and more time inside their projects.

About

Local development cockpit with Repository Inventory — discover local Git repositories and verify they are safely synced to GitHub.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages