gitstow 0.1.0__py3-none-any.whl

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,306 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitstow
3
+ Version: 0.1.0
4
+ Summary: A git repository library manager — clone, organize, and maintain collections of repos you learn from
5
+ Project-URL: Homepage, https://github.com/rishmadaan/gitstow
6
+ Project-URL: Repository, https://github.com/rishmadaan/gitstow
7
+ Project-URL: Documentation, https://github.com/rishmadaan/gitstow#readme
8
+ Project-URL: Issues, https://github.com/rishmadaan/gitstow/issues
9
+ Project-URL: Changelog, https://github.com/rishmadaan/gitstow/blob/main/CHANGELOG.md
10
+ Author: Rish Madaan
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: cli,developer-tools,git,manager,open-source,repository
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: MacOS
19
+ Classifier: Operating System :: Microsoft :: Windows
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Software Development :: Version Control :: Git
27
+ Requires-Python: >=3.10
28
+ Requires-Dist: beaupy>=3.0
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: rich>=13.0
31
+ Requires-Dist: typer[all]>=0.9
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=8.0; extra == 'dev'
34
+ Requires-Dist: ruff>=0.4; extra == 'dev'
35
+ Provides-Extra: mcp
36
+ Requires-Dist: mcp>=1.0; extra == 'mcp'
37
+ Provides-Extra: tui
38
+ Requires-Dist: textual>=0.50; extra == 'tui'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # gitstow
42
+
43
+ A git repository library manager — clone, organize, and maintain collections of repos you learn from.
44
+
45
+ ## Why?
46
+
47
+ AI-assisted development has created a new relationship with open source. Developers increasingly maintain local clones of repositories they study and reference, not just repos they contribute to. `gitstow` manages this collection as a first-class concern.
48
+
49
+ Existing tools solve parts of this:
50
+ - **[ghq](https://github.com/x-motemen/ghq)** (3.5k stars) auto-organizes repos by `host/owner/repo` — but can't pull, status-check, or run commands across them.
51
+ - **[gita](https://github.com/nosarthur/gita)** (1.8k stars) runs bulk git operations — but doesn't organize or auto-structure anything.
52
+
53
+ `gitstow` combines the best of both: **paste a URL → auto-organized → bulk pull, freeze, tag, and manage your entire collection.** Works across multiple workspaces — open-source collections, active projects, and more.
54
+
55
+ ## Quick Start
56
+
57
+ ```bash
58
+ pipx install gitstow # recommended
59
+ # or: pip install gitstow
60
+
61
+ # First-run setup (optional — works without it)
62
+ gitstow onboard
63
+
64
+ # Add repos (GitHub shorthand or full URLs)
65
+ gitstow add anthropic/claude-code
66
+ gitstow add https://gitlab.com/group/project
67
+
68
+ # Update everything
69
+ gitstow pull
70
+
71
+ # See your collection
72
+ gitstow list
73
+
74
+ # Check git status across all repos
75
+ gitstow status
76
+ ```
77
+
78
+ ## Features
79
+
80
+ ### Workspaces
81
+ ```bash
82
+ # Track open-source repos (structured: owner/repo layout)
83
+ gitstow workspace add ~/oss --label oss --layout structured
84
+
85
+ # Track your active projects (flat: repos directly in folder)
86
+ gitstow workspace add ~/labs/projects --label active --layout flat --auto-tag active
87
+
88
+ # Scan to discover existing repos
89
+ gitstow workspace scan active
90
+ ```
91
+
92
+ ### Auto-Organization
93
+ ```bash
94
+ gitstow add anthropic/claude-code facebook/react torvalds/linux
95
+ ```
96
+ Creates (in a structured workspace):
97
+ ```
98
+ ~/oss/
99
+ ├── anthropic/
100
+ │ └── claude-code/
101
+ ├── facebook/
102
+ │ └── react/
103
+ └── torvalds/
104
+ └── linux/
105
+ ```
106
+
107
+ ### Bulk Operations
108
+ ```bash
109
+ gitstow pull # Update all repos across all workspaces
110
+ gitstow -w oss pull # Only update oss workspace
111
+ gitstow pull --tag ai # Only repos tagged 'ai'
112
+ gitstow pull --exclude-tag stale # Everything except stale repos
113
+ gitstow status # Git status dashboard
114
+ gitstow -w active status --dirty # Dirty repos in active workspace
115
+ ```
116
+
117
+ ### Freeze & Tags
118
+ ```bash
119
+ gitstow repo freeze facebook/react # Skip during pull
120
+ gitstow repo tag anthropic/claude-code ai tools
121
+ gitstow pull --tag ai # Update only AI repos
122
+ gitstow repo tags # List all tags
123
+ ```
124
+
125
+ ### Migrate Existing Repos
126
+ ```bash
127
+ gitstow migrate ~/old-projects/some-repo # Auto-detects owner/repo from remote
128
+ ```
129
+
130
+ ### Any Git Host
131
+ ```bash
132
+ gitstow add anthropic/claude-code # GitHub (default)
133
+ gitstow add https://gitlab.com/group/project # GitLab (nested groups work)
134
+ gitstow add git@bitbucket.org:owner/repo.git # Bitbucket
135
+ gitstow add https://codeberg.org/owner/repo # Codeberg
136
+ ```
137
+
138
+ ### AI Integration
139
+
140
+ gitstow is designed to be used primarily through AI tools. The Claude Code skill is installed automatically during onboarding and auto-updates on version bumps:
141
+
142
+ ```bash
143
+ gitstow install-skill # Or: gitstow onboard (includes this)
144
+ # Then in Claude Code: "add this repo" or "update my repos"
145
+ ```
146
+
147
+ > **MCP server** is also available for non-Claude-Code AI tools (Claude Desktop, Cursor, etc.) via `pip install gitstow[mcp]`. See [docs/user/configuration.md](docs/user/configuration.md#mcp-server-optional) for setup. Note: MCP tools are always loaded into context and cost tokens even when not in use — the skill has zero overhead when inactive.
148
+
149
+ ### Run Commands Across Repos
150
+ ```bash
151
+ gitstow exec -- git log -1 --oneline # Last commit in each repo
152
+ gitstow exec --tag python -- wc -l README.md # Line count in Python repos
153
+ ```
154
+
155
+ ### Search Across Repos
156
+ ```bash
157
+ gitstow search "TODO" # Grep everything
158
+ gitstow search "def main" --glob "*.py" # Only Python files
159
+ gitstow search "error" --tag ai -i # Case-insensitive, AI repos only
160
+ ```
161
+
162
+ ### Share Your Collection
163
+ ```bash
164
+ gitstow collection export -o my-repos.yaml # Export as portable YAML
165
+ gitstow collection import my-repos.yaml # Import on another machine
166
+ gitstow collection export --format urls # Plain URL list
167
+ ```
168
+
169
+ ### Shell Integration
170
+ ```bash
171
+ eval "$(gitstow shell init)" # Add to ~/.zshrc or ~/.bashrc
172
+ gs # cd into a repo (fzf picker)
173
+ gse # Open repo in editor (fzf picker)
174
+ gsp # gitstow pull shorthand
175
+ ```
176
+
177
+ ### Interactive Dashboard
178
+ ```bash
179
+ gitstow tui # Keyboard-driven dashboard with filter, pull, freeze
180
+ ```
181
+
182
+ ### JSON Output
183
+ Every command supports `--json` for scripting and AI consumption:
184
+ ```bash
185
+ gitstow list --json
186
+ gitstow pull --json --quiet
187
+ gitstow status --json
188
+ ```
189
+
190
+ ## Commands
191
+
192
+ | Command | Description |
193
+ |---------|-------------|
194
+ | **Core** | |
195
+ | `gitstow add <url> [urls...]` | Clone repos into organized structure |
196
+ | `gitstow pull` | Bulk update all (or filtered) repos |
197
+ | `gitstow list` | List repos grouped by owner/workspace |
198
+ | `gitstow status` | Git status dashboard |
199
+ | `gitstow remove <repo>` | Remove a repo from tracking |
200
+ | `gitstow migrate <path>` | Adopt existing repos into structure |
201
+ | **Workspaces** | |
202
+ | `gitstow workspace list` | List all configured workspaces |
203
+ | `gitstow workspace add <path>` | Add a new workspace |
204
+ | `gitstow workspace remove <label>` | Remove a workspace |
205
+ | `gitstow workspace scan <label>` | Discover and register repos on disk |
206
+ | **Repo Management** | |
207
+ | `gitstow repo freeze <repo>` | Skip repo during pull |
208
+ | `gitstow repo unfreeze <repo>` | Re-enable pulling |
209
+ | `gitstow repo tag <repo> <tags...>` | Add tags to a repo |
210
+ | `gitstow repo untag <repo> <tag>` | Remove a tag |
211
+ | `gitstow repo tags` | List all tags with counts |
212
+ | `gitstow repo info <repo>` | Detailed repo info |
213
+ | **Power** | |
214
+ | `gitstow exec <command>` | Run a command in every repo |
215
+ | `gitstow search <pattern>` | Grep across all repos (uses ripgrep) |
216
+ | `gitstow open <repo>` | Open in editor, browser, or Finder |
217
+ | `gitstow stats` | Collection statistics and disk usage |
218
+ | **Sharing** | |
219
+ | `gitstow collection export` | Export collection as YAML, JSON, or URLs |
220
+ | `gitstow collection import <file>` | Import a collection from file |
221
+ | **Shell** | |
222
+ | `gitstow shell setup` | Show shell integration instructions |
223
+ | `gitstow shell pick` | fzf-powered repo picker |
224
+ | `gitstow tui` | Interactive terminal dashboard |
225
+ | **Config** | |
226
+ | `gitstow config show` | Show current config and workspaces |
227
+ | `gitstow config set <key> <value>` | Change a setting |
228
+ | `gitstow onboard` | First-run setup wizard |
229
+ | `gitstow doctor` | Health check |
230
+ | `gitstow install-skill` | Install Claude Code skill |
231
+
232
+ All commands accept `-w <label>` to filter to a specific workspace.
233
+
234
+ ## Configuration
235
+
236
+ Config lives at `~/.gitstow/config.yaml`:
237
+
238
+ ```yaml
239
+ workspaces:
240
+ - path: ~/oss
241
+ label: oss
242
+ layout: structured
243
+ - path: ~/labs/projects
244
+ label: active
245
+ layout: flat
246
+ auto_tags: [active]
247
+ default_host: github.com
248
+ prefer_ssh: false
249
+ parallel_limit: 6
250
+ ```
251
+
252
+ Repo metadata at `~/.gitstow/repos.yaml` (nested by workspace):
253
+
254
+ ```yaml
255
+ oss:
256
+ anthropic/claude-code:
257
+ remote_url: https://github.com/anthropic/claude-code.git
258
+ frozen: false
259
+ tags: [ai, tools]
260
+ added: '2026-04-05'
261
+ active:
262
+ gitstow:
263
+ remote_url: https://github.com/rishmadaan/gitstow.git
264
+ tags: [active]
265
+ added: '2026-04-05'
266
+ ```
267
+
268
+ ## How It Works
269
+
270
+ 1. **Workspaces** — Each workspace is a directory with a layout mode (`structured` = owner/repo, `flat` = just repo). Repos are organized across workspaces, tagged, and managed as a unified collection.
271
+ 2. **Folder-as-state** — The directory structure is the primary source of truth. `repos.yaml` supplements with metadata (frozen, tags, timestamps).
272
+ 3. **Error isolation** — One bad repo never stops operations on others. Failures are collected and reported in a summary.
273
+ 4. **Parallel execution** — Bulk operations use `asyncio` with a semaphore (default 6 concurrent) to prevent SSH connection storms.
274
+ 5. **Zero-config start** — `gitstow add owner/repo` works immediately with sensible defaults.
275
+
276
+ ### A note on folder structure
277
+
278
+ Structured workspaces organize repos as `owner/repo/` (e.g., `~/oss/anthropic/claude-code/`). Unlike [ghq](https://github.com/x-motemen/ghq) which includes the host (`root/github.com/owner/repo/`), we omit it for simplicity.
279
+
280
+ Flat workspaces skip the owner directory entirely — repos are just `workspace/repo-name/`. Use flat layout for directories where you already have projects organized your own way.
281
+
282
+ ## Troubleshooting
283
+
284
+ **`gitstow: command not found`** — Make sure the install location is on your PATH. With pipx this is automatic. With pip, you may need `python3 -m gitstow` or add `~/.local/bin` to your PATH.
285
+
286
+ **SSH clone fails with "Permission denied (publickey)"** — Your SSH key isn't configured for the git host. Either add your key (`ssh-add`) or use HTTPS: `gitstow config set prefer_ssh false`.
287
+
288
+ **Workspace directory doesn't exist** — Run `gitstow doctor` to check workspace health. Create missing directories or update the path with `gitstow workspace add`.
289
+
290
+ **`gitstow doctor`** — Run this first when something isn't working. It checks git installation, config files, and workspace integrity.
291
+
292
+ ## Development
293
+
294
+ ```bash
295
+ git clone https://github.com/rishmadaan/gitstow
296
+ cd gitstow
297
+ pip install -e ".[dev]"
298
+ pytest
299
+ ruff check src/
300
+ ```
301
+
302
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
303
+
304
+ ## License
305
+
306
+ MIT
@@ -0,0 +1,43 @@
1
+ gitstow/__init__.py,sha256=xph079dNr3G335VAHKs3jVqUCY63knfLhEtA9WLb_Rs,75
2
+ gitstow/__main__.py,sha256=z0J_37INhn0j_x2hIhgDU1IgDLF7Izv_I_hXY1t6g48,216
3
+ gitstow/cli/__init__.py,sha256=aOn6p9V8EFcRyjWxrA6w-horRYLRnm0fposov9wfQlo,43
4
+ gitstow/cli/add.py,sha256=ffGHmaQVdRFdmWePoB0PqwLx3aG-T65vYP0zcyFE99c,10094
5
+ gitstow/cli/config_cmd.py,sha256=6w2fTXdxxtXE4kt3sZs5cDapOxbywnOsu2SKhH9H40s,7642
6
+ gitstow/cli/doctor.py,sha256=z9pvr8iz4-yNj7xmOsFVd-PINXW-3weFi6UuC8V0KTQ,6122
7
+ gitstow/cli/exec_cmd.py,sha256=P5-s6XgeaaO2u9PVFf3SPeohcnk-3AdvVDQqDLT4U6M,5310
8
+ gitstow/cli/export_cmd.py,sha256=JOATKgdt3w6bE-r4fKqmeWJMPkrSFfP_85HrRUnSEWs,9968
9
+ gitstow/cli/helpers.py,sha256=nhMRSUEKlHrU3Rta1VCL01iDcSjUAChZqBV5h0PJC0s,3545
10
+ gitstow/cli/list_cmd.py,sha256=o8OJs4cniBLMP0BN5zxHLNQjLbzQ7EgcPJ2iJUEU6yg,7094
11
+ gitstow/cli/main.py,sha256=I08WgcglVlajwjRGbTRgv_YTMlutqlMt6PpFHqKBsNg,4276
12
+ gitstow/cli/manage.py,sha256=J4jlZcoGihiaFybkA4yPMfoyKck1uS20Lp3H5jWXQcU,8796
13
+ gitstow/cli/migrate.py,sha256=mzKOKvEh3gXwuP3eDzyRHorqw532TcKt72Zw40q4xys,5281
14
+ gitstow/cli/onboard.py,sha256=L6HKFwBpP7TYPna-B9VXw8YZnVlZEXiqy6UHBMjr8JA,8545
15
+ gitstow/cli/open_cmd.py,sha256=dxQZH2SObEOydC0sWmjLWKjMpmu1JTlVlCi390ht3U0,4571
16
+ gitstow/cli/pull.py,sha256=vWWjuVMTa_vO-hmAGoMlOG_W86JxbN2dUGfPDDGbqo4,9537
17
+ gitstow/cli/remove.py,sha256=1XqQl0jSQYKNijcl25xdCpcF3M8wk2PNP5B0rtGUeKw,2698
18
+ gitstow/cli/search.py,sha256=fJk-V0lF7dc8WSKQCuXQRV-sm8nJF250arCQwdATbI4,6245
19
+ gitstow/cli/setup_ai.py,sha256=-DXByoe5aRd4RqWZX63m7Cdp313YL9Mv59b4ARPdJmY,8981
20
+ gitstow/cli/shell.py,sha256=oVOysvKNjaJ1jiiK2RaJlYcTST99rQVVBstzrX4qgLU,9372
21
+ gitstow/cli/skill_cmd.py,sha256=KyHXAIxZRud9qdHlQbEijnviKtlTxtrecBoo7OY2M50,2006
22
+ gitstow/cli/stats.py,sha256=BpmdoeeycM7m9Gi0u2GvaLpOT5tI73tNtpSwoYrtN6A,4166
23
+ gitstow/cli/status.py,sha256=FtJ5AqjQ7qwp_VDpfTF5yl8mcfQzX6pVHjKX1Eo54zA,7010
24
+ gitstow/cli/tui.py,sha256=b9I439hJ4nw5VvU22VuYf1MT7CZy8B-m_SMOGcujEWg,684
25
+ gitstow/cli/workspace_cmd.py,sha256=JFAXLWSJhs-DF6nNNwPXFQso7ER1i3DKzY9yNTPjttA,6422
26
+ gitstow/core/__init__.py,sha256=Yc5Xfujdd-110F9ErAZnfy9MJYVI3P-sUc-_wwrYc_k,77
27
+ gitstow/core/config.py,sha256=pMDJlDjXUj1aEoUGnXmyN9smNjY6Wsw6xQlHIyEqBHU,4446
28
+ gitstow/core/discovery.py,sha256=CPrniHKBeXvUHHIM_fL3ZP7pRBGUqDf1JOq9aE8P5i0,3443
29
+ gitstow/core/git.py,sha256=BTPN4_NjC0g2zZvPOC7jc7on9rYg17dEXpcHA34NIS0,8101
30
+ gitstow/core/parallel.py,sha256=dfR9LGVJpG5vshxaPXgsvR7QR6ZPpe5xDCkAfU70VcA,2603
31
+ gitstow/core/paths.py,sha256=9BQU8HFjXKxutn9AyvqUMqSCbB54ArQjjvPI0Y5pPhQ,1776
32
+ gitstow/core/repo.py,sha256=WDytmjvxAVFf8PbGZlBfQwNYz1Ls87fdcofaM49euLg,10680
33
+ gitstow/core/url_parser.py,sha256=loo5CnEhwWIMvqmB-svdBr-_0EfNQMCOe6tveDKpFHo,4878
34
+ gitstow/mcp/__init__.py,sha256=kguWR6pSrls1YUbb-QjXU-p-xXE92xAbXcpp8XLU2oU,75
35
+ gitstow/mcp/server.py,sha256=LGoEjYH0Du9QFFC7gESEGbuhhIok9s1NKBwHVGwvx5M,21449
36
+ gitstow/skill/SKILL.md,sha256=c8YjtP7fqVl9DD9L7O9rhOY94SZFqMqr7zgMnJBJ_f8,7210
37
+ gitstow/tui/__init__.py,sha256=tm_LtIWe5H0uwfFF4nol9SQTET_KzgmWJC7Wr-y5Zvs,73
38
+ gitstow/tui/app.py,sha256=STf4_RJVW04vXqjz1EQU9HXmlKdKIXN46exb6ucH4fk,13713
39
+ gitstow-0.1.0.dist-info/METADATA,sha256=lWE8sufKcjGl_p5BuEco4CkFSdAbz77ECThV2rE9mnw,11412
40
+ gitstow-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
41
+ gitstow-0.1.0.dist-info/entry_points.txt,sha256=yEbVxHuXqjwHWzwp76wDoA6zYUxzJLyfLIVq3OEmsQ0,87
42
+ gitstow-0.1.0.dist-info/licenses/LICENSE,sha256=0HBGPEMLmwH9rsg_eJ8WhfSxRdHeN3t2JxnYOVZzlM0,1068
43
+ gitstow-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ gitstow = gitstow.cli.main:app
3
+ gitstow-mcp = gitstow.mcp.server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rish Madaan
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.