Metadata-Version: 2.5
Name: pmfrancisco-devkit
Version: 0.4.0
Summary: Cross-platform CLI tools to keep many git repos in sync at once: status, pull, push, prune, switch and clean
Project-URL: Repository, https://github.com/PMFrancisco/devkit
License-Expression: MIT
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# devkit (Python)

Command-line tools for working with many git repos at once. They work on Linux, macOS and Windows.
They only need Python ≥ 3.9 and git. No dependencies.

```bash
uv tool install pmfrancisco-devkit    # or: pipx install pmfrancisco-devkit
```

Try without installing: `uvx --from pmfrancisco-devkit pullall`

| Command | What it does |
|---|---|
| `statusall` | Status of every repo: current branch, uncommitted changes, stashes, and which branches have commits to push or pull. Changes nothing. Use `--fetch` to compare against the real remote. |
| `pullall` | fetch + fast-forward of every branch with an upstream. Never makes merges. |
| `pushall` | Pushes branches that have commits to push. Never forces, never publishes new branches or recreates deleted ones. |
| `pruneall` | Deletes branches whose remote is gone (merged PR), only if all their commits are still on the remote. Never the current branch. |
| `switchall <branch>` | Switches every repo to a branch, creating the local one if it only exists on the remote. `--default` goes to each repo's default branch (main, master…). Skips repos with uncommitted changes. |
| `cleanall` | Deletes regenerable dependencies and caches (`node_modules`, `.venv`, `__pycache__`, Rust `target`…) to free disk space. Only those git ignores and that have no tracked files; never `.env` or anything of yours, and it never follows links. `--build` also includes `dist/` and `build/`. |
| `devkit` | `list`, `help [tool]`, `update` and `version` for the collection. |

All of them look for repos in `[folder]` (default: the current one) up to 2 levels deep,
process 8 repos in parallel (`-j N`), accept `-h`, and exit with code 1 if anything
failed. The ones that change something (`pushall`, `pruneall`, `switchall`, `cleanall`) accept `-n`/`--dry-run`.

They are meant to be used together; each one tells you which one comes next:

```text
$ statusall --fetch
=== api === main · 2 uncommitted changes
  ↓ main (3 commits to pull: pullall)
  ↑ feature-x (1 commit to push: pushall)
  - fix-login (remote branch no longer exists: pruneall)

$ switchall --default   # everything to main/master
$ pullall               # pull what is new
$ pushall               # push what is yours
$ pruneall              # clean up branches of merged PRs
$ cleanall -n           # how much disk do the dependencies take?
```

Also available on npm: `npm install -g @pmfrancisco/devkit`.
Code and documentation: https://github.com/PMFrancisco/devkit
