Files
u-tabs/README.md

105 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# u-tabs
TUI 工作空间启动器 — 在终端快速选择项目,一键启动 Claude Code。
## 功能
- YAML 配置驱动,分组管理工作空间
- 左右布局:列表 + 详情面板
- 一键启动 Windows Terminal + Claude Code
- 多选批量启动、编号快捷跳转
- HISTORY Tab浏览历史会话一键恢复
- AI 摘要:自动为历史会话生成摘要
- 自动更新:启动检查新版本,`u` 键一键自升级
- 跨平台Windows / Linux / macOS
- Tokyo Night 主题CJK 字符安全渲染
## 安装
```bash
# 下载
curl -LO https://c.1216.top/u-tabs/download/u-tabs-linux-amd64
chmod +x u-tabs-linux-amd64 && mv u-tabs-linux-amd64 /usr/local/bin/u-tabs
# 或从源码编译
git clone https://gitea.1216.top/lxy/u-tabs.git
cd u-tabs && go build .
```
Windows 用户下载 [u-tabs-windows-amd64.exe](https://c.1216.top/u-tabs/download/u-tabs-windows-amd64.exe),重命名为 `u-tabs.exe` 使用。
macOS 用户下载 [darwin-arm64](https://c.1216.top/u-tabs/download/u-tabs-darwin-arm64)Apple Silicon或 [darwin-amd64](https://c.1216.top/u-tabs/download/u-tabs-darwin-amd64)Intel重命名为 `u-tabs``chmod +x` 使用。
## 配置
首次运行读取 `~/.u-tabs/config.yaml`,参考 [config.example.yaml](./config.example.yaml)。
```yaml
groups:
- label: CORE
desc: 核心业务
base: 10
items:
- title: my-project
prompt: 项目描述
tech: Go/Gin
deploy: 本地开发
dir: "E:\\projects\\my-project"
```
### 字段说明
**分组 (Group)**
| 字段 | 必填 | 说明 |
|------|------|------|
| `label` | 是 | 分组标识,显示在 Tab 栏(如 CORE、LAB |
| `desc` | 否 | 分组描述 |
| `base` | 是 | 编号起始值,组内项目编号 = base + 序号(如 base=10第一个项目编号 10 |
**工作空间 (Item)**
| 字段 | 必填 | 说明 |
|------|------|------|
| `title` | 是 | 项目名称,显示在列表和启动标题 |
| `prompt` | 否 | 项目描述,列表中 title 后显示 |
| `tech` | 否 | 技术栈,详情面板展示 |
| `deploy` | 否 | 部署信息,详情面板展示 |
| `dir` | 是 | 项目目录路径,支持 `~` 展开 |
**配置加载优先级**: `~/.u-tabs/config.yaml` > exe 同目录 `config.yaml`
## 快捷键
### Workspace Tab
| 按键 | 功能 |
|------|------|
| j/k | 上下选择 |
| Tab | 切换分组 |
| Enter | 启动选中项 |
| Space | 多选标记 |
| 0-9 | 编号输入 |
| q | 退出 |
### HISTORY Tab
| 按键 | 功能 |
|------|------|
| j/k | 上下选择 |
| Tab | 左右面板切换 |
| Enter | 恢复会话 |
| n | 新建会话 |
| r/F5 | 刷新扫描 |
| q | 退出 |
**全局**: `u` 更新到新版本(任何 Tab 可用)
## 自动更新
启动时后台检查版本,发现新版本时底部提示 `v{new} available [u]update`。按 `u` 键下载替换并校验 SHA256失败自动回滚旧版本。更新后重启生效。
## 技术栈
Go 1.26 / Bubbletea v2 / Lipgloss v2