workmap 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.
- workmap/__init__.py +30 -0
- workmap/__main__.py +15 -0
- workmap/actions.py +350 -0
- workmap/audit.py +153 -0
- workmap/cli.py +789 -0
- workmap/config.py +589 -0
- workmap/demo.py +94 -0
- workmap/drivers/__init__.py +93 -0
- workmap/drivers/apple_terminal.py +578 -0
- workmap/layout.py +64 -0
- workmap/model.py +719 -0
- workmap/multiplexer.py +201 -0
- workmap/procs.py +504 -0
- workmap/scan.py +413 -0
- workmap/setup.py +400 -0
- workmap/shell.py +117 -0
- workmap/terminal.py +50 -0
- workmap/themes.py +45 -0
- workmap/tui/__init__.py +6 -0
- workmap/tui/app.py +1090 -0
- workmap/tui/onboarding.py +266 -0
- workmap/tui/text.py +156 -0
- workmap/tui/widgets.py +189 -0
- workmap-0.1.0.dist-info/METADATA +258 -0
- workmap-0.1.0.dist-info/RECORD +28 -0
- workmap-0.1.0.dist-info/WHEEL +4 -0
- workmap-0.1.0.dist-info/entry_points.txt +2 -0
- workmap-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: workmap
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A desk map for the Terminal windows you already have: projects, RAM, and one key to clean up.
|
|
5
|
+
Project-URL: Homepage, https://github.com/athledev-labs/workmap
|
|
6
|
+
Project-URL: Issues, https://github.com/athledev-labs/workmap/issues
|
|
7
|
+
Project-URL: Source, https://github.com/athledev-labs/workmap
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 athledev-labs
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Keywords: developer-tools,macos,memory,terminal,tui
|
|
31
|
+
Classifier: Environment :: Console
|
|
32
|
+
Classifier: Environment :: MacOS X
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
36
|
+
Classifier: Programming Language :: Python :: 3
|
|
37
|
+
Classifier: Topic :: Utilities
|
|
38
|
+
Requires-Python: >=3.9
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# workmap
|
|
42
|
+
|
|
43
|
+
**Manage your coding agents across projects, in Terminal.**
|
|
44
|
+
|
|
45
|
+
`macOS` · `Terminal.app` · `Python 3.9+, no dependencies to run`
|
|
46
|
+
|
|
47
|
+
Two commands.
|
|
48
|
+
|
|
49
|
+
### `work` starts a session
|
|
50
|
+
|
|
51
|
+
Pick a project from the list, or name one: `work myproject`. Either way it
|
|
52
|
+
puts you in that directory, colours and titles the tab, and launches the agent
|
|
53
|
+
you pick.
|
|
54
|
+
|
|
55
|
+
<img src="docs/work.gif" alt="running work, picking a project and an agent from a numbered list" width="367">
|
|
56
|
+
|
|
57
|
+
### `workmap` shows you everything you have open
|
|
58
|
+
|
|
59
|
+
Grouped by project, with what each one is using in RAM.
|
|
60
|
+
|
|
61
|
+
<img src="docs/desk.gif" alt="the workmap desk: sessions grouped by project, selecting one, quitting its orphaned processes and watching the memory come back" width="611">
|
|
62
|
+
|
|
63
|
+
Rows marked **orphaned** are dev servers and agents still running with no
|
|
64
|
+
Terminal window left to close. `k` quits them, and names them before it does,
|
|
65
|
+
five at a time; `workmap kill -n` lists them all without quitting anything:
|
|
66
|
+
|
|
67
|
+
<img src="docs/confirm.svg" alt="the confirmation prompt naming the processes it will quit, by pid" width="592">
|
|
68
|
+
|
|
69
|
+
It doesn't own your sessions. No tmux, no wrapper, no new way to open a
|
|
70
|
+
terminal. It reads the windows you already have.
|
|
71
|
+
|
|
72
|
+
## Install
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
git clone https://github.com/athledev-labs/workmap.git
|
|
76
|
+
cd workmap
|
|
77
|
+
./install.sh
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
That is the whole thing, and it works on a Mac with nothing installed on it
|
|
81
|
+
beyond what Apple ships.
|
|
82
|
+
|
|
83
|
+
If the last line says `permission denied`, run `sh install.sh` instead. That
|
|
84
|
+
happens when the files arrived as a downloaded ZIP rather than a clone, which
|
|
85
|
+
drops the flag that marks a script runnable.
|
|
86
|
+
|
|
87
|
+
If you already have `uv` or `pipx`, either does it in one line without a
|
|
88
|
+
clone:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
uv tool install git+https://github.com/athledev-labs/workmap.git
|
|
92
|
+
pipx install git+https://github.com/athledev-labs/workmap.git
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Those two are offered rather than led with, because neither `uv` nor `pipx` is
|
|
96
|
+
on a Mac until you put it there, and installing a package manager in order to
|
|
97
|
+
install a package manager's package is a worse first step than cloning.
|
|
98
|
+
|
|
99
|
+
You need a Mac with the Xcode command line tools, which is what gives you
|
|
100
|
+
`git` and `python3`, and a working connection to `pypi.org` for the length of
|
|
101
|
+
the install. workmap itself downloads nothing and depends on nothing, but pip
|
|
102
|
+
fetches the package it builds the wheel with, so an offline machine cannot
|
|
103
|
+
install it. Nothing else is needed and no version of anything has to be
|
|
104
|
+
matched.
|
|
105
|
+
|
|
106
|
+
`install.sh` uses `uv` or `pipx` when either is on PATH, and otherwise a
|
|
107
|
+
private virtualenv under `~/.local/share/workmap/venv`. To try a prefix
|
|
108
|
+
without touching the real install:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
WORKMAP_PREFIX=/tmp/workmap-prefix ./install.sh
|
|
112
|
+
/tmp/workmap-prefix/bin/workmap --version
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Then:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
workmap setup
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
It asks where your projects are, shows which agents you actually have
|
|
122
|
+
installed, and offers to add one line to your shell. Nothing is written
|
|
123
|
+
without asking, and it's safe to re-run. `workmap demo` runs that same first
|
|
124
|
+
run against a fake machine in a temp directory if you'd rather look first.
|
|
125
|
+
|
|
126
|
+
If `~/.local/bin` isn't on your PATH yet, `python3 -m workmap` runs the same
|
|
127
|
+
thing until you've added it.
|
|
128
|
+
|
|
129
|
+
The first launch asks for Automation permission, because reading your windows
|
|
130
|
+
means talking to Terminal. Decline it and workmap says so rather than showing
|
|
131
|
+
you an empty desk.
|
|
132
|
+
|
|
133
|
+
The first time it names a window, it also turns "custom title" on for each of
|
|
134
|
+
Terminal's built-in profiles, and turns off the two bits Terminal adds around
|
|
135
|
+
it, "window size" and "shell path". Otherwise the name workmap gives a window
|
|
136
|
+
is either not shown at all or lost between the shell path and `80x24`. It's
|
|
137
|
+
the one thing workmap changes outside its own files, it happens once per run,
|
|
138
|
+
and any of it goes back in Terminal > Settings > Profiles > Window. workmap
|
|
139
|
+
says so on screen the first time it does it, so you do not have to have read
|
|
140
|
+
this paragraph to find out.
|
|
141
|
+
|
|
142
|
+
## Use
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
workmap # the map above
|
|
146
|
+
workmap list # the same thing as text
|
|
147
|
+
workmap kill -n # name what it would quit, without quitting it
|
|
148
|
+
workmap kill # quit them
|
|
149
|
+
workmap log # the last 20 things workmap quit
|
|
150
|
+
workmap log 100 # more of them
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`workmap --help` has the rest, with your own project names in the examples.
|
|
154
|
+
|
|
155
|
+
Every signal is written to `~/.local/state/workmap/kills.jsonl` before it's
|
|
156
|
+
sent and the outcome after, so a kill that surprises you can be read back. The
|
|
157
|
+
file is trimmed to the newest 5000 records once it passes 4 MB, so it is a
|
|
158
|
+
long memory rather than a permanent one.
|
|
159
|
+
|
|
160
|
+
## `work`
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
work # pick a project, then an agent
|
|
164
|
+
work <project> # that project, ask which agent
|
|
165
|
+
work <project> claude # no questions
|
|
166
|
+
work <project> "npm test" # anything unrecognised is run literally
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Only your own shell can change its own directory, so `work` is a shell
|
|
170
|
+
function workmap prints and your shell evaluates, the same arrangement
|
|
171
|
+
`zoxide init` and `direnv hook` use. `workmap setup` offers to add it:
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
eval "$(workmap shell-init zsh)" # ~/.zshrc, or bash in ~/.bashrc
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Already have a `work` command? `workmap setup` notices and calls its one `wm`
|
|
178
|
+
instead, leaving yours alone. `--name proj` picks any other name yourself.
|
|
179
|
+
|
|
180
|
+
## Configure
|
|
181
|
+
|
|
182
|
+
**A project is the first directory _under_ a root**, so a root is the
|
|
183
|
+
directory that *contains* your projects. If your work is in
|
|
184
|
+
`~/dev/Company/api` and `~/dev/Company/web`, the root is `~/dev/Company`;
|
|
185
|
+
pointing at `~/dev` would name every project "Company". It's the one setting
|
|
186
|
+
worth getting right, and `workmap setup` asks about it.
|
|
187
|
+
|
|
188
|
+
To edit directly, `~/.config/workmap/projects.json`:
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"roots": ["~/dev/Company", "~/oss"],
|
|
193
|
+
"profiles": { "api": "Ocean", "web": "Grass" },
|
|
194
|
+
"agents": { "claude": "claude --dangerously-skip-permissions" },
|
|
195
|
+
"default_agent": "claude"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
`profiles` gives a project a Terminal colour so its windows are recognisable
|
|
200
|
+
at a glance; `c` in the map changes it, and anything you haven't picked gets a
|
|
201
|
+
colour derived from its name. Set an agent to `""` to take it off the list.
|
|
202
|
+
`WORKMAP_ROOTS="$HOME/dev/Company:$HOME/oss"` overrides the file.
|
|
203
|
+
|
|
204
|
+
## Known limits
|
|
205
|
+
|
|
206
|
+
- **macOS only, and not by accident.** Three separate dependencies: the
|
|
207
|
+
AppleScript that reads Terminal, the memory figures (`top -l 1` for
|
|
208
|
+
phys_footprint, `vm_stat`, `sysctl vm.swapusage`), and the `.app` bundle
|
|
209
|
+
rule that stops the sweep force-quitting a running application. Only the
|
|
210
|
+
first is behind a seam. Elsewhere, workmap says so and exits rather than
|
|
211
|
+
reporting an empty desk.
|
|
212
|
+
- Terminal.app only, within macOS. Drivers are pluggable and the contract has
|
|
213
|
+
a conformance suite, but one driver exists, so the seam is untested.
|
|
214
|
+
- Some background processes are not classified, `node .../bin/daemon.mjs`
|
|
215
|
+
among them. Naming them from their path is what once had workmap SIGKILLing
|
|
216
|
+
a running app's helpers in a loop, so it's deliberately left alone. The cost
|
|
217
|
+
is a missed orphan.
|
|
218
|
+
- A process whose executable is inside a `.app` bundle is assumed to belong to
|
|
219
|
+
a running application and is never swept, unless it's an interpreter (every
|
|
220
|
+
macOS Python lives inside a `Python.app`).
|
|
221
|
+
- `w` can't close a window whose foreground process has already exited, the
|
|
222
|
+
ones showing `[Process completed]`; Terminal ignores the request without
|
|
223
|
+
reporting an error. workmap counts what actually closed and tells you the
|
|
224
|
+
difference rather than claiming them.
|
|
225
|
+
- `o`, `O` and `organize` can't move a window macOS is tiling. Dragging a
|
|
226
|
+
window to the edge of the screen puts it in a tile group, and after that
|
|
227
|
+
Terminal accepts the request to move it and discards it, again without an
|
|
228
|
+
error. Measured on a real desk: the window reported the same position before
|
|
229
|
+
and after. workmap counts what actually moved and names tiling as the
|
|
230
|
+
reason, rather than reporting a layout that did not happen. Drag the window
|
|
231
|
+
out of its tile, or turn tiling off in System Settings, under Desktop and
|
|
232
|
+
Dock.
|
|
233
|
+
- Of the eight agents offered, only claude, codex and cursor-agent have been
|
|
234
|
+
confirmed to exist under those names. `shutil.which` gates all of them.
|
|
235
|
+
- A pane inside `tmux` or `screen` is a live session the emulator cannot see.
|
|
236
|
+
workmap asks tmux which panes it has and leaves those alone, attached or
|
|
237
|
+
not, so a session you can still `tmux attach` to is never on the kill list.
|
|
238
|
+
Anything it cannot ask keeps everything under it: `screen` always, because
|
|
239
|
+
the version macOS ships cannot answer, and tmux when the query fails. Either
|
|
240
|
+
way the desk says so instead of looking like a quiet machine.
|
|
241
|
+
- `s` asks a separate tool called `devstack` to bring a project's servers
|
|
242
|
+
down before quitting its orphans. workmap does not ship it and does not
|
|
243
|
+
need it: without it, `s` quits the orphans and says so.
|
|
244
|
+
- Verified against one machine: ~1000 processes, one roots layout, one user.
|
|
245
|
+
|
|
246
|
+
## Contributing
|
|
247
|
+
|
|
248
|
+
[ARCHITECTURE.md](ARCHITECTURE.md) has the layering, the rules worth knowing
|
|
249
|
+
before changing anything, the contract a second terminal driver has to meet,
|
|
250
|
+
and how to run the tests. The pictures above are composed from real frames by
|
|
251
|
+
`tools/render_svg.py` and `tools/render_gif.py`, so none of them can show a
|
|
252
|
+
layout the tool does not have. A test regenerates the still and fails if it has
|
|
253
|
+
drifted; the animations go through Chrome and ffmpeg, whose output is not
|
|
254
|
+
byte-stable, so those are re-run by hand.
|
|
255
|
+
|
|
256
|
+
## Licence
|
|
257
|
+
|
|
258
|
+
MIT
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
workmap/__init__.py,sha256=aHacRIpjES-teaxd73lRqb55DeHPdfHh8Vk2YcaqSBM,956
|
|
2
|
+
workmap/__main__.py,sha256=tzwmJ-IezKOJWK8TisrCIf6F3cUXBPyjaCPYVZcbvD4,478
|
|
3
|
+
workmap/actions.py,sha256=VEpog_coELwiWaXz989t5B9p2KusGUJwBGe9ZCzDnM8,13732
|
|
4
|
+
workmap/audit.py,sha256=N9auwkO6DdFvUnYgRbFjwK9NDlqAQWIOHEc0WnYp6t8,5313
|
|
5
|
+
workmap/cli.py,sha256=1PrH0MaKOEwVI8z_DK7vsUcDlqDhJtQkvqx5w6_2StE,33658
|
|
6
|
+
workmap/config.py,sha256=Fi9L3n6bQJRLwZeU9lj4RyQmR9V4p5FrwhhMFpOkirg,24988
|
|
7
|
+
workmap/demo.py,sha256=qYYvkgNirR_DAeeTbaAshSC-b3G5l_IARRB7XOP5jnw,3591
|
|
8
|
+
workmap/layout.py,sha256=9MDwPNUVIS6v_GcGoxyCMET2w-oiWNiPOg7NZ2sLMNU,1920
|
|
9
|
+
workmap/model.py,sha256=6Oi0JYF0XgjJ7yfyDz6vq7ntw6rgUkAPiNk4OXv44M4,29362
|
|
10
|
+
workmap/multiplexer.py,sha256=IQ9wNqZWQZDthNMGaSs4vWaptwf5D3jktbTZO1j-r4c,9550
|
|
11
|
+
workmap/procs.py,sha256=dMqUe4Yt767gSgO2zLacDCVipY-QTsBh-MfU_b7-3rw,19686
|
|
12
|
+
workmap/scan.py,sha256=R08fNhLCUj_RNfrMeMnhKrl6V95Rh2MunCw868oYFL4,19796
|
|
13
|
+
workmap/setup.py,sha256=zlyxo1toSNL5poyfBbCDRTJPdUDdUejC86hnDLDwezs,16012
|
|
14
|
+
workmap/shell.py,sha256=JUe8A3pRXYdeWwPXBnDta2fmzGfRIH14ZeO8ukkZ6Qs,4629
|
|
15
|
+
workmap/terminal.py,sha256=UJgLDUtP579jiHqOA7DexRPe-vNdm-yvHXqh6O_DTY8,2089
|
|
16
|
+
workmap/themes.py,sha256=TBXT_YFunQhwo3DTdbI8ShQlzS_-Oc96wSt03EBIwsM,1770
|
|
17
|
+
workmap/drivers/__init__.py,sha256=Js8ixjFaOSIYveKiG49ox9UL1EuQrOtDeslb6RIkQtQ,4410
|
|
18
|
+
workmap/drivers/apple_terminal.py,sha256=JGmf1e9JFhRAI5c0HJmlSJTvVj2UcEshwBlHcqhT3jk,23465
|
|
19
|
+
workmap/tui/__init__.py,sha256=kgJDBsTO1aaWoxOZxAWaS9zOkmo3_T95nzYTZ2a9FlQ,229
|
|
20
|
+
workmap/tui/app.py,sha256=Lk88tKcrEXAmycsyvYE3Nhvu0yUorxrYBaCrtM-QVCM,48018
|
|
21
|
+
workmap/tui/onboarding.py,sha256=lKjZTLP0aeKSMZH8_UsjzpCldnAjYj81ut38-wAGv0E,8917
|
|
22
|
+
workmap/tui/text.py,sha256=QKkhGgLMIpUnVDT6jLbpXVqqrjYqVbWU0WVWSsy8I5c,4372
|
|
23
|
+
workmap/tui/widgets.py,sha256=T-0TnLZWI8csol27fcX3d_wEoFFAYT2yweIrVMG2fM8,6694
|
|
24
|
+
workmap-0.1.0.dist-info/METADATA,sha256=dnd_Ga2MnnvqTPZmhGmWa_ithdSozE_fTP3Uuj1vZUQ,11436
|
|
25
|
+
workmap-0.1.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
26
|
+
workmap-0.1.0.dist-info/entry_points.txt,sha256=2o1wJ2dcf6wkNpvCjHq3_iHPlHLQ4Ivpmr5IDqjt-34,45
|
|
27
|
+
workmap-0.1.0.dist-info/licenses/LICENSE,sha256=XkE-8A-0pf7vbfyXp0nm8H3eOWU1V_r01b6EkzEegkM,1070
|
|
28
|
+
workmap-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 athledev-labs
|
|
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.
|