A lightweight TUI to scan, search, and manage local git repositories
Project description
Blink
轻量级终端 TUI 工具,用于扫描、搜索和管理本地 git 仓库。
使用
安装
pip install blink-repo
首次运行
首次启动时,Blink 会扫描主目录下的 git 仓库并在终端显示进度。扫描完成后自动打开 TUI。后续启动直接使用缓存数据,同时自动清理失效条目。
CLI 命令
blink # 启动 TUI
blink -R # 强制重新扫描后启动
blink -v # 显示版本号
blink run # 执行 tasks.yaml 中的任务
blink run -s # 查看任务状态
blink edit # 编辑任务文件
blink edit --add [path] # 添加任务并打开编辑器
blink commit -p . # 自动提交变更
blink log [N] # 查看任务日志
blink review <branch> # AI code review
blink review <branch> -d # 仅 diff 模式
blink review -l # 列出 review 报告
blink review <branch> -a develop # 指定 base 分支
blink review -i # 创建 review-rules.md 模板
自动提交和 Code Review 功能需要已安装 Claude CLI。
布局
Blink 采用双栏联动布局:左侧仓库列表,右侧详情面板。光标移动时右侧实时更新。
┌───────────────────────┬──────────────────────────────────────────┐
│ ── Repos ────────── │ ── Detail ────────────────────────────── │
│ ▸ ★ name [tag] │ Name repo-name │
│ /path/to/repo │ Path /path/to/repo │
│ │ Status main ● │
│ │ ───────────────────────────────────────── │
│ │ ▸ IDE Open with IDE [Shift+I]│
│ │ Commit Auto Commit [Shift+C]│
│ │ Review AI Code Review [Shift+V]│
│ │ ───────────────────────────────────────── │
│ │ ▸ Pinned No │
│ │ Tags [python] [api] │
└───────────────────────┴──────────────────────────────────────────┘
快捷键
| 按键 | 功能 |
|---|---|
↑ / ↓ |
导航 |
Enter |
打开 IDE(列表)/ 执行操作(详情) |
/ |
搜索(任何焦点下) |
Tab / → |
焦点移至详情面板 |
Esc / ← |
焦点移回列表 |
Shift+I |
用 IDE 打开 |
Shift+O |
系统默认打开(Finder) |
Shift+P |
复制仓库路径 |
Shift+R |
重新扫描 |
Shift+C |
自动提交(AI 生成 commit message) |
Shift+G |
浏览器打开远程仓库 |
Shift+T |
添加 Todo 任务 |
Shift+V |
AI Code Review |
Shift+L |
打开最近 review 报告 |
Shift+U |
拉取最新代码 |
Ctrl+C ×2 |
退出(2秒内按两次) |
搜索
按 / 展开搜索框,实时过滤仓库(搜索范围:名称、别名、描述、路径、远程 URL、标签)。Enter 隐藏搜索框保留结果,Esc 清空恢复全部。
详情面板操作
Tab 移至右侧,↑/↓ 选择行,Enter 执行:
- Actions 区:IDE / Git(浏览器)/ Commit / Task / Finder / Review / Path
- Local Markers 区:Pinned(切换置顶)/ Alias(编辑别名)/ Tags(管理标签)/ Description(编辑描述)
配置
首次运行在 ~/.blink/config.json 创建默认配置:
{
"scan_paths": ["~"],
"exclude_dirs": [".Trash", ".cache", ".npm", ".docker", "Library", "node_modules"],
"editor": "code",
"preferred_ide": null,
"auto_sync_days": 0,
"nerd_fonts": false
}
| 字段 | 说明 |
|---|---|
scan_paths |
扫描 git 仓库的根目录列表 |
exclude_dirs |
扫描时跳过的目录名 |
editor |
默认编辑器 |
preferred_ide |
首选 IDE(v VSCode / u Cursor / a Antigravity) |
auto_sync_days |
自动重新扫描间隔(0 禁用) |
nerd_fonts |
启用 Nerd Font 图标 |
数据存储在 ~/.blink/:config.json、blink.db(SQLite)、loop/(任务数据)、logs/(应用日志)。
开发调试
环境要求
- Python 3.9+
- uv
- git
- Claude CLI(可选,用于自动提交和 Code Review)
初始化
git clone <repo-url> blink && cd blink
uv sync
运行
uv run blink # 启动 TUI
uv run blink -R # 强制重新扫描
测试
uv run pytest # 全部测试
uv run pytest tests/test_scanner.py # 单文件
uv run pytest -k test_scan_paths_finds_git_repos # 单测试
调试
在源码任意位置插入 breakpoint(),运行 uv run blink,程序会在断点处进入 pdb。
构建
uv build # 构建分发包
许可证
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blink_repo-1.1.3.tar.gz.
File metadata
- Download URL: blink_repo-1.1.3.tar.gz
- Upload date:
- Size: 79.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7442c628c5e110a5fd7aacb359ac12b356a566e131be1fda690740aa657b5733
|
|
| MD5 |
004ffa24bcdd297679c158e539eec14f
|
|
| BLAKE2b-256 |
5f4a6c8d245d3c6bf9902c3fc9a132a935a275942eab1c82701be593aea863da
|
File details
Details for the file blink_repo-1.1.3-py3-none-any.whl.
File metadata
- Download URL: blink_repo-1.1.3-py3-none-any.whl
- Upload date:
- Size: 69.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a07d6df5616ff4d97612ee167671e1a55acaa655dabbf2d239bcb32d8dea979c
|
|
| MD5 |
48fb4dea9dc08b8bf97c52042413b641
|
|
| BLAKE2b-256 |
74acb0086dcf0ac65b5bc985c9afe0b5060a0fec6bd86237de1d7f8425e9d68a
|