personal-project-manager 0.2.0__py3-none-win_amd64.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,286 @@
1
+ Metadata-Version: 2.4
2
+ Name: personal-project-manager
3
+ Version: 0.2.0
4
+ Classifier: License :: OSI Approved :: MIT License
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: Environment :: Console
7
+ Classifier: Topic :: Software Development
8
+ License-File: LICENSE
9
+ License-File: LICENSE-zoxide
10
+ Summary: Terminal browser for your project directories, GitHub repositories and pull requests, scripted in Luau
11
+ Keywords: git,github,zoxide,tui,luau
12
+ Author-email: Ville Vainio <vivainio@gmail.com>
13
+ License: MIT
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
16
+ Project-URL: Issues, https://github.com/vivainio/personal-project-manager/issues
17
+ Project-URL: Repository, https://github.com/vivainio/personal-project-manager
18
+
19
+ # ppm
20
+
21
+ Terminal browser for your [zoxide](https://github.com/ajeetdsouza/zoxide) directories and their
22
+ git state, your GitHub repositories and your pull requests. Reads the zoxide database directly
23
+ (`db.txt`, or the older `db.zo`) and never writes it. It is a small windowing core in Rust; what it
24
+ shows and does is scripted in [Luau](https://luau.org).
25
+
26
+ ppm keeps its own state in `~/.local/share/ppm/ppm.db` (SQLite): pins, the directories you act on
27
+ or cd to (added to zoxide's ranking, and enough to be useful without zoxide), the GitHub list
28
+ cache and values scripts store with `ppm.set`.
29
+
30
+ ```sh
31
+ uv tool install personal-project-manager # or: pip install personal-project-manager
32
+ cargo install --path . # from a checkout
33
+ ```
34
+
35
+ Either installs a `ppm` command, on Linux, macOS and Windows. It uses `git`, and `gh` for the `repos` and `prs` views.
36
+
37
+ Shell function that cds to the chosen directory:
38
+
39
+ ```sh
40
+ p() { local d; d="$(ppm "$@")" && [ -n "$d" ] && cd -- "$d"; }
41
+ ```
42
+
43
+ Or in PowerShell:
44
+
45
+ ```powershell
46
+ function p { $d = ppm @args; if ($d) { Set-Location $d } }
47
+ ```
48
+
49
+ `ppm [--db PATH] [--view NAME] [--init-config] [--print-defaults] [FILTER...]`
50
+
51
+ ## Views
52
+
53
+ Every screen has the same layout: tabs, a filterable list on the left, and on the right sections
54
+ about the selected item. Click a tab, press `f1`-`f3`, or `^g` to cycle.
55
+
56
+ | View | List | Sections |
57
+ | --- | --- | --- |
58
+ | `dirs` | zoxide directories, pins and clones | status, branches, changed files |
59
+ | `repos` | your GitHub repositories, and where they are cloned | about, pull requests |
60
+ | `prs` | open pull requests in your repositories and your orgs' | about, checks, description |
61
+
62
+ `repos` and `prs` use `gh`; this takes over the browsing parts of the Python
63
+ [personal-project-manager](https://github.com/vivainio/personal-project-manager).
64
+
65
+ * In `repos`, `enter` shows the local clone in `dirs`, or offers to clone. `tab` loads the open
66
+ pull requests, and again moves into them. `^f` shows forks.
67
+ * In `repos` and `prs`, type `@name` to narrow to a project.
68
+ * Clones are found by their `origin` remote, up to three levels below `repos_root`, so there is
69
+ nothing to register. `repos_root`, `orgs` and `projects` are set with `ppm.setup`.
70
+ * The repository list is cached and refreshed when older than a day, or with `^r`.
71
+
72
+ ## Finding files
73
+
74
+ `^f` on a directory (or `f` in its action menu) fuzzy-searches the files below it, best match first.
75
+ `enter` opens the file in `$VISUAL` or `$EDITOR`; `space` shows what else can be done with it, and
76
+ `esc` closes. In a repository ignored files are left out; elsewhere hidden files and `node_modules`
77
+ are. The entries of a file (also for changed files) are the actions with `on = "file"`.
78
+
79
+ ## Pins
80
+
81
+ `^t` pins or unpins the selected directory. Pins stay at the top of the list in the order you added
82
+ them. Before you have typed anything, `1`-`9` opens that pin's action menu, so `1` `w` goes to its
83
+ workspace. While filtering, matching pins still come first. Unpin and pin again to move one to the end.
84
+
85
+ ## Keys
86
+
87
+ | Where | Keys |
88
+ | --- | --- |
89
+ | lists | type to fuzzy filter, `enter` open, `tab` into the sections, `space` or `^a` actions, `esc` clear or back |
90
+ | sections | `j`/`k` move, `/` filter, `a` actions, `o` cd, `r` reload, `tab` next, `esc` back, `q` quit |
91
+ | directories | `^f` find a file below, `^t` pin |
92
+ | branches | `enter` log, `s` switch, `y` copy name |
93
+ | changed files | `enter` diff, `y` copy path |
94
+ | anywhere | arrows or `^n`/`^p` move, `^g` next view, `^o` cd, `^c` quit |
95
+
96
+ `^y` copies the directory (`dirs`) or URL (`repos`, `prs`), and `^r` reloads. `enter` on a directory
97
+ that isn't a repository cds to it.
98
+
99
+ Filters use fzf syntax: `'exact`, `^prefix`, `suffix$`, `!exclude`, smart case. Results keep their
100
+ order. Space-separated terms work in section filters and in the words given on the command line; in
101
+ lists `space` opens the actions (`ppm.bind("list", "space", false)` makes it type instead).
102
+
103
+ List markers: branch, `●` changed files, `↑` ahead, `↓` behind.
104
+
105
+ ## Mouse
106
+
107
+ Click to select, double-click to activate, right-click for the action menu (in a log or diff it
108
+ goes back), and scroll with the wheel. The tabs and the buttons at the bottom are clickable. While
109
+ ppm runs, most terminals need `shift` or `option` held to select text.
110
+
111
+ ## Scripting
112
+
113
+ The views, actions and keys are the Luau files in [`lua/`](lua), also shown by
114
+ `ppm --print-defaults`. `~/.config/ppm/init.luau` runs after them and can add to, replace or remove
115
+ anything; `ppm --init-config` writes a starter with examples.
116
+
117
+ To keep views and actions in files of their own, put them in `~/.config/ppm/plugins/*.luau`. They
118
+ are loaded in name order after the built-ins and before `init.luau`, which therefore has the last
119
+ word. Each view gets a tab, in the order the views were defined. For example `plugins/notes.luau`:
120
+
121
+ ```lua
122
+ local root = ppm.expand("~/notes")
123
+
124
+ ppm.view("notes", {
125
+ load = function(view)
126
+ ppm.spawn({ "find", ".", "-name", "*.md" }, function(_, out)
127
+ local items = {}
128
+ for path in out:gmatch("%./([^\n]+)") do
129
+ -- A "file" item gets the file actions: edit, open, copy path.
130
+ table.insert(items, { id = path, kind = "file", file = path, cwd = root })
131
+ end
132
+ view:set(items)
133
+ end, { cwd = root })
134
+ end,
135
+ row = function(item) return { { text = item.file, match = true } } end,
136
+ detail = function(item)
137
+ local ok, text = ppm.try({ "head", "-n", "40", item.file })
138
+ return { { title = item.file, lines = ok and ppm.lib.lines(text) or {} } }
139
+ end,
140
+ -- Without this, enter would try to cd.
141
+ open = function()
142
+ ppm.command("actions")
143
+ return true
144
+ end,
145
+ })
146
+ ppm.bind("global", "f4", "view:notes")
147
+ ```
148
+
149
+ Command strings (`run = "..."`, `ppm.sh`) go to `sh`, or to `cmd` on Windows, where the variables
150
+ are written `%PPM_DIR%`; check `ppm.windows` to tell them apart. Quote them in both: names can contain
151
+ characters the shell would act on, and `cmd` is the easier one to trick, so prefer `ppm.run` with
152
+ arguments. Paths in scripts use `/` on every system.
153
+
154
+ Luau has no `io` library or `os.execute`; use the functions below. `require("./name")` loads a
155
+ module relative to the file asking, so shared code can sit outside `plugins/`.
156
+
157
+ ### Actions
158
+
159
+ `space` (or `^a`) opens a menu of actions on the selection. Press an entry's key, or `/` to filter the entries
160
+ and `enter` to run one. The built-ins start Claude Code through Herdr.
161
+
162
+ Entries can be grouped, to any depth. A group's key (or `enter`, `→`) opens it and `esc` (or `←`,
163
+ backspace) goes back; filtering also finds entries inside groups. A group is an action with `actions`
164
+ instead of `run`:
165
+
166
+ ```lua
167
+ ppm.action({ on = "dir", key = "g", label = "git", actions = {
168
+ { key = "f", label = "fetch", run = "git fetch", pause = true },
169
+ { key = "l", label = "log", run = "git log" },
170
+ } })
171
+ ```
172
+
173
+ Declaring a group that already exists adds to it, replacing entries with the same key.
174
+ `ppm.remove("dir", "ct")` removes entry `t` of group `c`.
175
+
176
+ | Function | |
177
+ | --- | --- |
178
+ | `ppm.action{on=, key=, label=, run= or actions=, when=, pause=, quit=, inline=}` | add an entry; same key replaces |
179
+ | `ppm.provider(on, function(ctx) return {entries} end)` | entries computed when the menu opens |
180
+ | `ppm.remove(on, key)`, `ppm.clear(on?)` | drop entries |
181
+
182
+ `on` is the item's `kind`: `"dir"`, `"branch"`, `"file"`, `"repo"`, `"pr"`, or one of your own.
183
+ `key` is optional. `run` is a `sh` command or a function; returning `false` or raising an error
184
+ counts as failure. `when(ctx)` decides whether to show it. `pause` waits for enter; `quit` leaves
185
+ ppm on success. `inline` runs a function with the screen still up, for entries that only drive ppm.
186
+
187
+ `ctx` is the selected item's table: for example `dir`, `name`, `root`, `branch`, `file`, `repo`,
188
+ `url`, `cloned`, `number`. In a section it also has the fields of the list item it belongs to.
189
+ Commands run in `ctx.cwd` or `ctx.dir`, with `$PPM_DIR`, `$PPM_NAME`, `$PPM_ROOT`, `$PPM_BRANCH`,
190
+ `$PPM_REPO`, `$PPM_URL` and `$PPM_FILE`.
191
+
192
+ Branch names and the like can contain shell characters, so pass `ctx` values to programs as
193
+ arguments, or use the quoted variables; don't concatenate them into a `sh` script.
194
+
195
+ ### Views
196
+
197
+ ```lua
198
+ ppm.view("name", {
199
+ load = function(view) ... view:set(items) end, -- when first shown
200
+ row = function(item) return { cell, ... } end, -- one cell per column
201
+ detail = function(item) return { section, ... } end,
202
+ filter = function(item) return "text to match" end, -- default: the row's text
203
+ open = function(item) return true end, -- enter; false for the default
204
+ reload = function(view, item) ... end, -- ^r; default: load again
205
+ after = function(view, item) ... end, -- after an action
206
+ columns = { "fill", 4, "30%" }, split = 40, -- list columns and width (%)
207
+ title = "tab label",
208
+ })
209
+ ```
210
+
211
+ * An item is any table; `id` (else `dir`) keeps the selection in place across updates, and `kind`
212
+ picks its actions.
213
+ * A cell is a string, a span `{ text=, fg=, bold=, dim=, match=, shorten= }`, or a list of those.
214
+ `match` highlights what the filter hit; `shorten` cuts from the left when a single column is
215
+ too narrow.
216
+ * A section is `{ title=, lines = { cell, ... } }`, or a selectable list
217
+ `{ id=, title=, columns=, rows = { { id=, cells=, item=, filter= }, ... } }`.
218
+ * `view:set(items)` replaces the list; `view:refresh(id?)` rebuilds rows and the detail, for data
219
+ that arrives later. `view.items` holds the current items.
220
+ * `ppm.views.<name>` is the table above, so a built-in view's functions can be wrapped or replaced.
221
+
222
+ `row`, `detail` and the rest run while the screen is up: start slow things with `ppm.spawn` and
223
+ refresh when they finish.
224
+
225
+ ### Programs and data
226
+
227
+ | Function | |
228
+ | --- | --- |
229
+ | `ppm.spawn(argv, function(ok, stdout, stderr), {key=, urgent=, cwd=})` | run in the background; a queued job with the same `key` is dropped |
230
+ | `ppm.capture(argv)`, `ppm.try(argv)` | run and wait: the output, or `ok, stdout, stderr` |
231
+ | `ppm.run(argv)`, `ppm.sh(script)`, `ppm.prompt(label)` | use the terminal (actions, or bindings with `terminal`) |
232
+ | `ppm.json(text)`, `ppm.to_json(value)` | JSON |
233
+ | `ppm.dirs()` | zoxide's and ppm's directories `{path, score}`, best first |
234
+ | `ppm.pins()`, `ppm.toggle_pin(path)` | pins |
235
+ | `ppm.get(key)`, `ppm.set(key, value)` | strings kept across runs; `nil` deletes |
236
+ | `ppm.find_repos(root, depth?)`, `ppm.walk(dir, limit?)`, `ppm.exists(path)`, `ppm.is_dir(path)`, `ppm.expand(path)` | files |
237
+ | `ppm.windows`, `ppm.getenv(name)` | the system |
238
+ | `ppm.now()`, `ppm.parse_time(iso8601)` | seconds since 1970 |
239
+ | `ppm.show(view)`, `ppm.select(view, id)`, `ppm.filter()` | move around |
240
+ | `ppm.pick{title=, lines=, item=function(line), enter=}` | fuzzy-pick a line; its item gets the actions of its `kind`, and `enter` runs the entry with those keys |
241
+ | `ppm.copy(text)`, `ppm.message(text)`, `ppm.pager(title, text, {diff=})` | clipboard, status line, full screen |
242
+ | `ppm.command(name)`, `ppm.cd(path)`, `ppm.quit()` | built-in commands, cd on exit, leave |
243
+ | `ppm.setup{repos_root=, orgs=, projects=}`, `ppm.settings` | settings |
244
+
245
+ `ppm.lib` (see [`lua/lib.luau`](lua/lib.luau)) has what the built-in views share: git status, clone
246
+ discovery, ages, path shortening.
247
+
248
+ ### Binding keys
249
+
250
+ ```lua
251
+ ppm.bind(mode, key, target, options)
252
+ ```
253
+
254
+ * `mode` is one or a list of: a view (`dirs`, `repos`, `prs`) for its list; `view.section`
255
+ (`dirs.branches`, `dirs.changes`, `repos.pulls`); `list` or `sections` for all of either;
256
+ `global` for both; `picker`, `pager`, `menu`, `menu_filter`, `section_filter`. The narrowest wins.
257
+ * `key` is a character, `enter`, `esc`, `tab`, `shift-tab`, `space`, arrows, `pageup`, `pagedown`,
258
+ `home`, `end`, `f1`-`f12`, `ctrl-x`, `alt-x`, `doubleclick` or `rightclick`.
259
+ * `target` is a command, a function of `ctx`, `"entry:w"` (run that menu entry directly; `"entry:cb"` for one in a group) or `false`
260
+ to unbind. A function returning `"pass"` lets a typed character through to the filter.
261
+ * `options`: `button` (footer button label), `help` (footer hint), and for functions `terminal`
262
+ (suspend the UI, needed for `run`, `sh` and `prompt`), `pause` and `quit`.
263
+
264
+ Commands: `up` `down` `page_up` `page_down` `top` `bottom` `back` `quit` `confirm` `actions` `open`
265
+ `next_pane` `prev_pane` `filter` `clear_filter` `next_view` `reload` `cd`, and `view:<name>`.
266
+
267
+ ## Coming from ppm 0.1
268
+
269
+ ppm 0.1 was a Python command line tool. This is a different program under the same name: it is
270
+ interactive, and none of the subcommands remain.
271
+
272
+ | 0.1 | Now |
273
+ | --- | --- |
274
+ | `ppm repos`, `ppm clone` | the `repos` view |
275
+ | `ppm pr <project>` | the `prs` view, then type `@project` |
276
+ | `ppm here` | not needed: clones are found by their `origin` remote under `repos_root` |
277
+ | `config.yaml` | `ppm.setup` in `init.luau`; the old file is not read |
278
+ | `ppm tickets`, `specs`, `memo`, `mv`, `projects`; switching `gh` accounts | gone |
279
+
280
+ Stay on the old version with `uv tool install personal-project-manager==0.1.0`. Its source is on
281
+ the [`attic`](https://github.com/vivainio/personal-project-manager/tree/attic) branch.
282
+
283
+ ## License
284
+
285
+ MIT, see `LICENSE`. `src/zoxide.rs` is adapted from zoxide (MIT, see `LICENSE-zoxide`).
286
+
@@ -0,0 +1,7 @@
1
+ personal_project_manager-0.2.0.data/scripts/ppm.exe,sha256=iEbuxUeg6U5s19H0In_LPRN8tYwPSovFmEXc5w1XPX8,5321216
2
+ personal_project_manager-0.2.0.dist-info/METADATA,sha256=hAZWqu91c5jp_3BwFUZ1lyzE9RD41yCnh2fQfmufE34,14271
3
+ personal_project_manager-0.2.0.dist-info/WHEEL,sha256=Uvw7WSmy7Kj2FBk8Va4L_dq4MDW8X5Ynby-pOX3ZNS0,94
4
+ personal_project_manager-0.2.0.dist-info/licenses/LICENSE,sha256=oY7eE-vyRqg2Ucthj0g1xyE9fF2lnoCS-A3Pz2iL6Wo,1092
5
+ personal_project_manager-0.2.0.dist-info/licenses/LICENSE-zoxide,sha256=4N7LG7hivsZHRoDrjwo8_yuj8YM0zBHJgLd5G1vt7Ek,1060
6
+ personal_project_manager-0.2.0.dist-info/sboms/ppm.cyclonedx.json,sha256=OheJFa5xmwnFD8wmZwwKT9m5N56du09bKj2w9vRw2gw,209969
7
+ personal_project_manager-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.16.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ville M. Vainio
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,7 @@
1
+ Copyright 2020 Ajeet D'Souza
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.