@mkhuda/agent-ps 0.1.0 → 0.3.0
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.
- package/CHANGELOG.md +32 -0
- package/README.md +91 -47
- package/agent-ps +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
The detail panel earns its screen.
|
|
6
|
+
|
|
7
|
+
- It is grouped now, in the order the questions arrive: what the session is,
|
|
8
|
+
what it is doing to the machine, what it has cost, and the command line last.
|
|
9
|
+
The agent name takes its colour from the table, a busy status is green, and an
|
|
10
|
+
inferred pairing reads as a warning rather than another grey line.
|
|
11
|
+
- The disk total is broken down. A hundred megabytes of transcript and a hundred
|
|
12
|
+
of file history call for different answers, and the column alone could not
|
|
13
|
+
tell you which you had. Every backend names its own parts, including the two
|
|
14
|
+
that keep sessions in a database and count rows rather than files.
|
|
15
|
+
- The panel keeps up. It redrew on every pass and so looked live, but it held
|
|
16
|
+
the row it was opened with, which left cpu, memory, uptime and the time since
|
|
17
|
+
the last turn frozen at the moment it appeared.
|
|
18
|
+
|
|
19
|
+
## 0.2.0
|
|
20
|
+
|
|
21
|
+
Ways to install it, and a release that publishes itself.
|
|
22
|
+
|
|
23
|
+
- `curl | sh` takes the latest release, checks it against the checksum
|
|
24
|
+
published beside it, and makes sure it runs before keeping it.
|
|
25
|
+
- On PyPI as `agent-ps`, so `uvx agent-ps`, `pipx install agent-ps` and
|
|
26
|
+
`pip install agent-ps` all work.
|
|
27
|
+
- On npm as `@mkhuda/agent-ps`, scoped because the plain name is too close to
|
|
28
|
+
an existing package. The command it installs is still `agent-ps`.
|
|
29
|
+
- Releases are built and published from the tag on a clean runner, which
|
|
30
|
+
refuses to start when the tag, the version in the package and this file
|
|
31
|
+
disagree.
|
|
32
|
+
|
|
33
|
+
The tool itself is unchanged.
|
|
34
|
+
|
|
3
35
|
## 0.1.0
|
|
4
36
|
|
|
5
37
|
First public release.
|
package/README.md
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-screenshot.jpg" width="900"
|
|
4
|
+
alt="agent-ps listing sessions from claude, hermes, codex, opencode, pi, commandcode and copilot side by side, each with its model, uptime, idle time, cpu, memory, disk and working directory, with two hermes background helpers at the bottom">
|
|
5
|
+
|
|
1
6
|
# agent-ps
|
|
2
7
|
|
|
3
|
-
A process table for coding agent sessions, the way `ps` would look if it knew
|
|
4
|
-
what a session was
|
|
8
|
+
**A process table for coding agent sessions, the way `ps` would look if it knew
|
|
9
|
+
what a session was.**
|
|
10
|
+
|
|
11
|
+
[](https://github.com/mkhuda/agent-ps/actions/workflows/ci.yml)
|
|
12
|
+
[](https://pypi.org/project/agent-ps/)
|
|
13
|
+
[](https://www.npmjs.com/package/@mkhuda/agent-ps)
|
|
14
|
+
[](https://github.com/mkhuda/agent-ps/blob/main/LICENSE)
|
|
15
|
+

|
|
16
|
+

|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
[Install](#install) | [Usage](#usage) | [Agents](#agents) |
|
|
20
|
+
[Scripting](#scripting) | [How it works](https://github.com/mkhuda/agent-ps/blob/main/docs/internals.md)
|
|
5
21
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-

|
|
22
|
+
```
|
|
23
|
+
curl -fsSL https://raw.githubusercontent.com/mkhuda/agent-ps/main/install.sh | sh
|
|
24
|
+
```
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
</div>
|
|
13
27
|
|
|
14
28
|
`ps aux | grep claude` gives you PIDs. It will not tell you which one is the
|
|
15
29
|
session you are talking to, what model it is spending on, whether it has been
|
|
@@ -24,16 +38,43 @@ One file, no dependencies, reads local files only.
|
|
|
24
38
|
|
|
25
39
|
## Install
|
|
26
40
|
|
|
41
|
+
### One command
|
|
42
|
+
|
|
27
43
|
```bash
|
|
28
44
|
curl -fsSL https://raw.githubusercontent.com/mkhuda/agent-ps/main/install.sh | sh
|
|
29
45
|
```
|
|
30
46
|
|
|
31
|
-
|
|
32
|
-
makes sure it runs, and
|
|
33
|
-
|
|
47
|
+
Takes the latest release, checks it against the checksum published beside it,
|
|
48
|
+
makes sure it runs, and puts the single file in `~/.local/bin`. Set `BIN_DIR` to
|
|
49
|
+
install elsewhere, or `AGENT_PS_REF=v0.1.0` to pin a version.
|
|
50
|
+
|
|
51
|
+
### With a package runner
|
|
52
|
+
|
|
53
|
+
From [PyPI](https://pypi.org/project/agent-ps/), which installs the program
|
|
54
|
+
itself:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uvx agent-ps # run it once
|
|
58
|
+
pipx install agent-ps # keep it, isolated
|
|
59
|
+
pip install agent-ps # keep it, wherever pip points
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
From [npm](https://www.npmjs.com/package/@mkhuda/agent-ps), which carries the
|
|
63
|
+
same single executable and finds an interpreter for it:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx @mkhuda/agent-ps
|
|
67
|
+
pnpm dlx @mkhuda/agent-ps
|
|
68
|
+
bunx @mkhuda/agent-ps
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The npm package is scoped because the plain name is too close to an existing
|
|
72
|
+
one. Either way the command it gives you is `agent-ps`.
|
|
73
|
+
|
|
74
|
+
### Just the file
|
|
34
75
|
|
|
35
76
|
If you would rather not pipe a script into a shell, the executable is the whole
|
|
36
|
-
program
|
|
77
|
+
program:
|
|
37
78
|
|
|
38
79
|
```bash
|
|
39
80
|
mkdir -p ~/.local/bin
|
|
@@ -43,27 +84,31 @@ chmod +x ~/.local/bin/agent-ps
|
|
|
43
84
|
```
|
|
44
85
|
|
|
45
86
|
Every [release](https://github.com/mkhuda/agent-ps/releases) publishes a
|
|
46
|
-
`SHA256SUMS`
|
|
87
|
+
`SHA256SUMS` next to it.
|
|
47
88
|
|
|
48
|
-
|
|
49
|
-
same Python program either way; the package only finds an interpreter.
|
|
89
|
+
### From a clone
|
|
50
90
|
|
|
51
|
-
|
|
52
|
-
|
|
91
|
+
```bash
|
|
92
|
+
git clone https://github.com/mkhuda/agent-ps && cd agent-ps
|
|
93
|
+
./install.sh
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Builds from the tree rather than downloading, so you install what you are
|
|
97
|
+
looking at.
|
|
53
98
|
|
|
54
|
-
|
|
55
|
-
3.14. macOS and Linux; Windows is out because `curses` is not in its standard
|
|
56
|
-
library. It shells out to `ps`, and on macOS to `lsof`, which is how a process is
|
|
57
|
-
matched to a session everywhere except Claude Code.
|
|
99
|
+
### What it needs, and how to remove it
|
|
58
100
|
|
|
59
|
-
|
|
101
|
+
Python 3.8 or later and nothing from PyPI. Tested on 3.8, 3.9, 3.10 and 3.14.
|
|
102
|
+
macOS and Linux; Windows is out because `curses` is not in its standard library.
|
|
103
|
+
It shells out to `ps`, and on macOS to `lsof`, which is how a process is matched
|
|
104
|
+
to a session everywhere except Claude Code.
|
|
60
105
|
|
|
61
106
|
```bash
|
|
62
107
|
rm -f ~/.local/bin/agent-ps
|
|
63
108
|
```
|
|
64
109
|
|
|
65
|
-
Nothing is written outside that directory
|
|
66
|
-
own files.
|
|
110
|
+
That is the whole uninstall. Nothing is written outside that directory, and
|
|
111
|
+
agent-ps only ever reads the agents' own files.
|
|
67
112
|
|
|
68
113
|
## Agents
|
|
69
114
|
|
|
@@ -123,7 +168,7 @@ something.
|
|
|
123
168
|
Those keys live at the bottom of the screen, under a line naming every agent on
|
|
124
169
|
screen in its own colour and, on the right, what the table is sorted by:
|
|
125
170
|
|
|
126
|
-

|
|
171
|
+

|
|
127
172
|
|
|
128
173
|
That middle line does three jobs. It is the key to the colours in the AGENT
|
|
129
174
|
column, it says the sort order in words so the marked heading is never a guess,
|
|
@@ -158,32 +203,31 @@ ended sessions, then `s` until DISK is marked.
|
|
|
158
203
|
|
|
159
204
|
### The detail panel
|
|
160
205
|
|
|
161
|
-
Enter on a live session opens everything known about it,
|
|
162
|
-
|
|
206
|
+
Enter on a live session opens everything known about it, grouped in the order
|
|
207
|
+
the questions arrive: what the session is, what it is doing to the machine, what
|
|
208
|
+
it has cost, and the command line last, since it is long and rarely the
|
|
209
|
+
question.
|
|
210
|
+
|
|
211
|
+
<img src="https://raw.githubusercontent.com/mkhuda/agent-ps/main/images/agent-ps-detail.jpg" width="620"
|
|
212
|
+
alt="The detail panel for a Claude Code session, in four groups. Session: agent, id, status, model, title and directory. Process: pid with its parent, uptime, and time since the last turn. Usage: cpu, memory, and a 41M disk total broken into 28M of transcript, 11M of subagent logs and 2M of file history. Command: the command line that started it.">
|
|
213
|
+
|
|
214
|
+
The disk total is broken down, because the number on its own is not something
|
|
215
|
+
you can act on. Forty megabytes of transcript and forty of file history call for
|
|
216
|
+
different answers, and until you can see which it is there is nothing to decide.
|
|
217
|
+
|
|
218
|
+
Where the agent counts tokens, they are here too. Hermes and OpenCode report
|
|
219
|
+
cost, Copilot reports the credits a turn spent:
|
|
163
220
|
|
|
164
221
|
```
|
|
165
|
-
session details
|
|
166
|
-
|
|
167
|
-
agent hermes
|
|
168
|
-
session 20260905_005254_2c9f4d
|
|
169
|
-
status idle
|
|
170
|
-
model nemotron-3.5-lightning-free
|
|
171
|
-
directory /Users/rg/projects/agent-ps
|
|
172
|
-
title halo are you hermes?
|
|
173
|
-
pid 21098 (parent 17518)
|
|
174
|
-
uptime 1h17m last turn 1h15m ago
|
|
175
|
-
usage cpu 0.0% memory 11M disk 121K
|
|
176
|
-
paired matched by working directory, not reported
|
|
177
222
|
provider opencode-free
|
|
178
223
|
tokens in 24,608 out 242 reasoning 190
|
|
179
224
|
calls 2 api, 6 messages, 0 tool calls
|
|
180
225
|
cost $0.0000 estimated
|
|
181
|
-
command /usr/bin/python3 /Users/rg/.hermes/hermes-agent/hermes
|
|
182
226
|
```
|
|
183
227
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
228
|
+
A `paired` line appears when the session was matched to the process by working
|
|
229
|
+
directory rather than reported, so you know before pressing `k` that the pairing
|
|
230
|
+
is a guess.
|
|
187
231
|
|
|
188
232
|
Enter on an ended session reopens it in a new terminal tab instead. Copilot
|
|
189
233
|
chats live in the editor, so they have no reopen command and say so.
|
|
@@ -277,7 +321,7 @@ itself can answer. Nothing is invented to fill the gap.
|
|
|
277
321
|
## How it works
|
|
278
322
|
|
|
279
323
|
The parts that are not obvious have their own page:
|
|
280
|
-
[where each agent keeps its sessions](docs/internals.md), how busy and idle are
|
|
324
|
+
[where each agent keeps its sessions](https://github.com/mkhuda/agent-ps/blob/main/docs/internals.md), how busy and idle are
|
|
281
325
|
decided per agent, which processes count as background helpers, how a shim is
|
|
282
326
|
told apart from a real session, and what the DISK column is adding up.
|
|
283
327
|
|
|
@@ -316,12 +360,12 @@ install fetches. The build is reproducible: the same source always produces the
|
|
|
316
360
|
same bytes, so the committed executable can be checked against the tree.
|
|
317
361
|
|
|
318
362
|
```
|
|
319
|
-
|
|
363
|
+
d5f2e2bd6d35e148e461c60c7cb7bd80fce272a15efb462a7dd513955ef5a2b6 agent-ps
|
|
320
364
|
```
|
|
321
365
|
|
|
322
366
|
Adding an agent takes one class and one line in the registry. See
|
|
323
|
-
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
367
|
+
[CONTRIBUTING.md](https://github.com/mkhuda/agent-ps/blob/main/CONTRIBUTING.md).
|
|
324
368
|
|
|
325
369
|
## License
|
|
326
370
|
|
|
327
|
-
MIT. See [LICENSE](LICENSE).
|
|
371
|
+
MIT. See [LICENSE](https://github.com/mkhuda/agent-ps/blob/main/LICENSE).
|
package/agent-ps
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkhuda/agent-ps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A process table for coding agent sessions. Claude Code, Codex, OpenCode, Hermes, Pi, CommandCode and Copilot in one view, with models, idle time, disk use and one key to stop them.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|