codeboard 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Shaoyi Yang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,259 @@
1
+ Metadata-Version: 2.4
2
+ Name: codeboard
3
+ Version: 0.1.0
4
+ Summary: Git repository dashboard for your local codebase
5
+ Author: Shaoyi Yang
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ysyecust/codeboard
8
+ Project-URL: Repository, https://github.com/ysyecust/codeboard
9
+ Project-URL: Issues, https://github.com/ysyecust/codeboard/issues
10
+ Keywords: git,dashboard,cli,repository,devtools
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: MacOS
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Software Development :: Version Control :: Git
19
+ Requires-Python: >=3.11
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: rich>=13.0
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=8.0; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # CodeBoard
28
+
29
+ [![CI](https://github.com/shaoyiyang/codeboard/actions/workflows/ci.yml/badge.svg)](https://github.com/shaoyiyang/codeboard/actions)
30
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
31
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
32
+
33
+ Git repository dashboard for your local codebase. Scans all git repos under a directory and shows status, activity, health — with batch operations and lazygit integration.
34
+
35
+ <p align="center">
36
+ <img src="docs/dashboard.svg" alt="Dashboard" width="700">
37
+ </p>
38
+
39
+ ## Features
40
+
41
+ - **Dashboard** — Overview of all repos: branch, last commit, dirty status, language, remote
42
+ - **Activity** — Cross-repo commit timeline
43
+ - **Health** — Find uncommitted changes, unpushed commits, repos behind remote, inactive repos
44
+ - **Detail** — Deep dive into a single repo: contributors, languages, recent commits
45
+ - **Stats** — Aggregate statistics: language distribution, weekly top, remote distribution
46
+ - **Grep** — Search code across all repos
47
+ - **Batch ops** — Pull all, push all, quick commit, stash
48
+ - **lazygit** — Open repos in lazygit, process dirty repos interactively
49
+ - **Doc** — Generate Obsidian project documentation (optional)
50
+ - **Graph** — Code graph analysis via GitNexus (optional)
51
+
52
+ <details>
53
+ <summary><b>Health Check</b></summary>
54
+ <p align="center"><img src="docs/health.svg" alt="Health" width="700"></p>
55
+ </details>
56
+
57
+ <details>
58
+ <summary><b>Activity Timeline</b></summary>
59
+ <p align="center"><img src="docs/activity.svg" alt="Activity" width="700"></p>
60
+ </details>
61
+
62
+ ## Install
63
+
64
+ ```bash
65
+ pip install .
66
+ ```
67
+
68
+ Or run directly:
69
+
70
+ ```bash
71
+ python codeboard.py
72
+ ```
73
+
74
+ ## Quick Start
75
+
76
+ ```bash
77
+ # Main dashboard
78
+ codeboard
79
+
80
+ # Or use the short alias after pip install
81
+ cb
82
+
83
+ # Filter repos by name
84
+ cb --filter simona
85
+
86
+ # Sort by dirty file count
87
+ cb --sort changes
88
+
89
+ # Cross-repo commit timeline
90
+ cb activity --limit 50
91
+
92
+ # Health check
93
+ cb health
94
+
95
+ # Single repo details
96
+ cb detail myrepo
97
+
98
+ # Summary statistics
99
+ cb stats
100
+
101
+ # Search code across all repos
102
+ cb grep "TODO"
103
+
104
+ # Batch pull all repos
105
+ cb pull
106
+
107
+ # Push all repos with ahead commits
108
+ cb push
109
+
110
+ # Quick commit
111
+ cb commit myrepo -m "feat: something" -y
112
+
113
+ # Stash / unstash
114
+ cb stash myrepo
115
+ cb stash myrepo pop
116
+
117
+ # Open in lazygit
118
+ cb open myrepo log
119
+
120
+ # Process all dirty repos one by one
121
+ cb each
122
+
123
+ # JSON output for piping
124
+ cb --json | jq '.[]'
125
+
126
+ # Auto-refresh every 10 seconds
127
+ cb --watch 10
128
+ ```
129
+
130
+ ## Configuration
131
+
132
+ Config file: `~/.config/codeboard/config.toml`
133
+
134
+ Generate a default config:
135
+
136
+ ```bash
137
+ cb config
138
+ ```
139
+
140
+ ```toml
141
+ # Directory to scan for git repositories
142
+ scan_dir = "~/Code"
143
+
144
+ # Additional individual repos to include (outside scan_dir)
145
+ extra_repos = ["~/Projects/special-repo"]
146
+
147
+ # UI language: "auto", "en", or "zh"
148
+ lang = "auto"
149
+
150
+ # Path to Obsidian vault (for 'doc' command, optional)
151
+ # obsidian_vault = "~/Documents/Obsidian Vault"
152
+
153
+ # Path to gitnexus binary (for 'graph' command, optional)
154
+ # gitnexus_bin = ""
155
+ ```
156
+
157
+ ## Global Options
158
+
159
+ | Flag | Description |
160
+ |------|-------------|
161
+ | `--path <dir>` | Scan directory (default: `~/Code` or config) |
162
+ | `--sort name\|activity\|commits\|changes` | Sort order |
163
+ | `--filter <keyword>` | Filter repos by name |
164
+ | `--json` | JSON output for piping |
165
+ | `--watch N` | Auto-refresh every N seconds |
166
+ | `--lang en\|zh\|auto` | UI language |
167
+ | `--no-color` | Disable colored output |
168
+ | `-V, --version` | Show version |
169
+
170
+ Global options can be placed before or after the subcommand:
171
+
172
+ ```bash
173
+ cb health --filter simona # works
174
+ cb --filter simona health # also works
175
+ ```
176
+
177
+ ## Commands
178
+
179
+ ### View
180
+
181
+ | Command | Description |
182
+ |---------|-------------|
183
+ | `cb` / `cb dashboard` | Main dashboard with repo overview |
184
+ | `cb activity [--limit N]` | Cross-repo commit timeline (default 30) |
185
+ | `cb health` | Health check: uncommitted / unpushed / behind / no remote / inactive |
186
+ | `cb detail <repo>` | Single repo detail: languages, contributors, tags, recent commits |
187
+ | `cb stats` | Aggregate statistics |
188
+ | `cb grep <pattern>` | Search code across all repos (regex) |
189
+
190
+ ### Operations
191
+
192
+ | Command | Description |
193
+ |---------|-------------|
194
+ | `cb pull` | Batch `git pull --ff-only` all repos with remote |
195
+ | `cb push` | Push all repos with ahead commits (requires confirmation) |
196
+ | `cb commit <repo> -m "msg"` | Quick `git add -A && commit` (use `-y` to skip confirmation) |
197
+ | `cb stash <repo> [push\|pop\|list]` | Quick stash operations |
198
+
199
+ ### lazygit Integration
200
+
201
+ | Command | Description |
202
+ |---------|-------------|
203
+ | `cb open <repo> [panel]` | Open repo in lazygit (panel: status/branch/log/stash) |
204
+ | `cb dirty` | List dirty repos, select one to open in lazygit |
205
+ | `cb each` | Process all dirty repos one by one in lazygit |
206
+
207
+ ### Optional
208
+
209
+ | Command | Description | Requires |
210
+ |---------|-------------|----------|
211
+ | `cb doc <repo>` | Generate Obsidian project documentation | Obsidian vault path in config |
212
+ | `cb graph <repo> [action]` | Code graph analysis | [gitnexus](https://github.com/nicolo-ribaudo/gitnexus) |
213
+ | `cb config` | Show or generate config file | — |
214
+ | `cb completions [bash\|zsh\|fish]` | Generate shell completion script | — |
215
+
216
+ ## Shell Completion
217
+
218
+ ```bash
219
+ # Bash (add to ~/.bashrc)
220
+ eval "$(cb completions bash)"
221
+
222
+ # Zsh (add to ~/.zshrc)
223
+ eval "$(cb completions zsh)"
224
+
225
+ # Fish (add to ~/.config/fish/completions/)
226
+ cb completions fish > ~/.config/fish/completions/cb.fish
227
+ ```
228
+
229
+ ## Requirements
230
+
231
+ - Python ≥ 3.11
232
+ - [rich](https://github.com/Textualize/rich) (terminal formatting)
233
+ - git
234
+ - [lazygit](https://github.com/jesseduffield/lazygit) (optional, for `open`/`dirty`/`each`)
235
+ - [gitnexus](https://github.com/nicolo-ribaudo/gitnexus) (optional, for `graph`)
236
+
237
+ **Windows note:** CodeBoard uses `sh -c` for batched git commands. On Windows, this requires [Git for Windows](https://gitforwindows.org/) which includes `sh`. WSL also works.
238
+
239
+ ## Performance
240
+
241
+ - Scans 48 repos in ~1 second
242
+ - Single shell call per repo (6-9 git commands batched into one `sh -c`)
243
+ - 8-way parallel scanning via `ThreadPoolExecutor`
244
+ - Lazy language detection (skipped for commands that don't need it)
245
+
246
+ ## Development
247
+
248
+ ```bash
249
+ git clone https://github.com/shaoyiyang/codeboard.git
250
+ cd codeboard
251
+ pip install -e ".[dev]"
252
+ pytest
253
+ ```
254
+
255
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
256
+
257
+ ## License
258
+
259
+ [MIT](LICENSE)
@@ -0,0 +1,233 @@
1
+ # CodeBoard
2
+
3
+ [![CI](https://github.com/shaoyiyang/codeboard/actions/workflows/ci.yml/badge.svg)](https://github.com/shaoyiyang/codeboard/actions)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
6
+
7
+ Git repository dashboard for your local codebase. Scans all git repos under a directory and shows status, activity, health — with batch operations and lazygit integration.
8
+
9
+ <p align="center">
10
+ <img src="docs/dashboard.svg" alt="Dashboard" width="700">
11
+ </p>
12
+
13
+ ## Features
14
+
15
+ - **Dashboard** — Overview of all repos: branch, last commit, dirty status, language, remote
16
+ - **Activity** — Cross-repo commit timeline
17
+ - **Health** — Find uncommitted changes, unpushed commits, repos behind remote, inactive repos
18
+ - **Detail** — Deep dive into a single repo: contributors, languages, recent commits
19
+ - **Stats** — Aggregate statistics: language distribution, weekly top, remote distribution
20
+ - **Grep** — Search code across all repos
21
+ - **Batch ops** — Pull all, push all, quick commit, stash
22
+ - **lazygit** — Open repos in lazygit, process dirty repos interactively
23
+ - **Doc** — Generate Obsidian project documentation (optional)
24
+ - **Graph** — Code graph analysis via GitNexus (optional)
25
+
26
+ <details>
27
+ <summary><b>Health Check</b></summary>
28
+ <p align="center"><img src="docs/health.svg" alt="Health" width="700"></p>
29
+ </details>
30
+
31
+ <details>
32
+ <summary><b>Activity Timeline</b></summary>
33
+ <p align="center"><img src="docs/activity.svg" alt="Activity" width="700"></p>
34
+ </details>
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ pip install .
40
+ ```
41
+
42
+ Or run directly:
43
+
44
+ ```bash
45
+ python codeboard.py
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ```bash
51
+ # Main dashboard
52
+ codeboard
53
+
54
+ # Or use the short alias after pip install
55
+ cb
56
+
57
+ # Filter repos by name
58
+ cb --filter simona
59
+
60
+ # Sort by dirty file count
61
+ cb --sort changes
62
+
63
+ # Cross-repo commit timeline
64
+ cb activity --limit 50
65
+
66
+ # Health check
67
+ cb health
68
+
69
+ # Single repo details
70
+ cb detail myrepo
71
+
72
+ # Summary statistics
73
+ cb stats
74
+
75
+ # Search code across all repos
76
+ cb grep "TODO"
77
+
78
+ # Batch pull all repos
79
+ cb pull
80
+
81
+ # Push all repos with ahead commits
82
+ cb push
83
+
84
+ # Quick commit
85
+ cb commit myrepo -m "feat: something" -y
86
+
87
+ # Stash / unstash
88
+ cb stash myrepo
89
+ cb stash myrepo pop
90
+
91
+ # Open in lazygit
92
+ cb open myrepo log
93
+
94
+ # Process all dirty repos one by one
95
+ cb each
96
+
97
+ # JSON output for piping
98
+ cb --json | jq '.[]'
99
+
100
+ # Auto-refresh every 10 seconds
101
+ cb --watch 10
102
+ ```
103
+
104
+ ## Configuration
105
+
106
+ Config file: `~/.config/codeboard/config.toml`
107
+
108
+ Generate a default config:
109
+
110
+ ```bash
111
+ cb config
112
+ ```
113
+
114
+ ```toml
115
+ # Directory to scan for git repositories
116
+ scan_dir = "~/Code"
117
+
118
+ # Additional individual repos to include (outside scan_dir)
119
+ extra_repos = ["~/Projects/special-repo"]
120
+
121
+ # UI language: "auto", "en", or "zh"
122
+ lang = "auto"
123
+
124
+ # Path to Obsidian vault (for 'doc' command, optional)
125
+ # obsidian_vault = "~/Documents/Obsidian Vault"
126
+
127
+ # Path to gitnexus binary (for 'graph' command, optional)
128
+ # gitnexus_bin = ""
129
+ ```
130
+
131
+ ## Global Options
132
+
133
+ | Flag | Description |
134
+ |------|-------------|
135
+ | `--path <dir>` | Scan directory (default: `~/Code` or config) |
136
+ | `--sort name\|activity\|commits\|changes` | Sort order |
137
+ | `--filter <keyword>` | Filter repos by name |
138
+ | `--json` | JSON output for piping |
139
+ | `--watch N` | Auto-refresh every N seconds |
140
+ | `--lang en\|zh\|auto` | UI language |
141
+ | `--no-color` | Disable colored output |
142
+ | `-V, --version` | Show version |
143
+
144
+ Global options can be placed before or after the subcommand:
145
+
146
+ ```bash
147
+ cb health --filter simona # works
148
+ cb --filter simona health # also works
149
+ ```
150
+
151
+ ## Commands
152
+
153
+ ### View
154
+
155
+ | Command | Description |
156
+ |---------|-------------|
157
+ | `cb` / `cb dashboard` | Main dashboard with repo overview |
158
+ | `cb activity [--limit N]` | Cross-repo commit timeline (default 30) |
159
+ | `cb health` | Health check: uncommitted / unpushed / behind / no remote / inactive |
160
+ | `cb detail <repo>` | Single repo detail: languages, contributors, tags, recent commits |
161
+ | `cb stats` | Aggregate statistics |
162
+ | `cb grep <pattern>` | Search code across all repos (regex) |
163
+
164
+ ### Operations
165
+
166
+ | Command | Description |
167
+ |---------|-------------|
168
+ | `cb pull` | Batch `git pull --ff-only` all repos with remote |
169
+ | `cb push` | Push all repos with ahead commits (requires confirmation) |
170
+ | `cb commit <repo> -m "msg"` | Quick `git add -A && commit` (use `-y` to skip confirmation) |
171
+ | `cb stash <repo> [push\|pop\|list]` | Quick stash operations |
172
+
173
+ ### lazygit Integration
174
+
175
+ | Command | Description |
176
+ |---------|-------------|
177
+ | `cb open <repo> [panel]` | Open repo in lazygit (panel: status/branch/log/stash) |
178
+ | `cb dirty` | List dirty repos, select one to open in lazygit |
179
+ | `cb each` | Process all dirty repos one by one in lazygit |
180
+
181
+ ### Optional
182
+
183
+ | Command | Description | Requires |
184
+ |---------|-------------|----------|
185
+ | `cb doc <repo>` | Generate Obsidian project documentation | Obsidian vault path in config |
186
+ | `cb graph <repo> [action]` | Code graph analysis | [gitnexus](https://github.com/nicolo-ribaudo/gitnexus) |
187
+ | `cb config` | Show or generate config file | — |
188
+ | `cb completions [bash\|zsh\|fish]` | Generate shell completion script | — |
189
+
190
+ ## Shell Completion
191
+
192
+ ```bash
193
+ # Bash (add to ~/.bashrc)
194
+ eval "$(cb completions bash)"
195
+
196
+ # Zsh (add to ~/.zshrc)
197
+ eval "$(cb completions zsh)"
198
+
199
+ # Fish (add to ~/.config/fish/completions/)
200
+ cb completions fish > ~/.config/fish/completions/cb.fish
201
+ ```
202
+
203
+ ## Requirements
204
+
205
+ - Python ≥ 3.11
206
+ - [rich](https://github.com/Textualize/rich) (terminal formatting)
207
+ - git
208
+ - [lazygit](https://github.com/jesseduffield/lazygit) (optional, for `open`/`dirty`/`each`)
209
+ - [gitnexus](https://github.com/nicolo-ribaudo/gitnexus) (optional, for `graph`)
210
+
211
+ **Windows note:** CodeBoard uses `sh -c` for batched git commands. On Windows, this requires [Git for Windows](https://gitforwindows.org/) which includes `sh`. WSL also works.
212
+
213
+ ## Performance
214
+
215
+ - Scans 48 repos in ~1 second
216
+ - Single shell call per repo (6-9 git commands batched into one `sh -c`)
217
+ - 8-way parallel scanning via `ThreadPoolExecutor`
218
+ - Lazy language detection (skipped for commands that don't need it)
219
+
220
+ ## Development
221
+
222
+ ```bash
223
+ git clone https://github.com/shaoyiyang/codeboard.git
224
+ cd codeboard
225
+ pip install -e ".[dev]"
226
+ pytest
227
+ ```
228
+
229
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
230
+
231
+ ## License
232
+
233
+ [MIT](LICENSE)