Project 04 / 04
dev
The interface I wish my workstation had.
Context
Why it exists
dev replaces scattered shell scripts with one consistent command. It is personal on purpose: a feature is only added when it removes friction I hit repeatedly, and existing tools like Git are wrapped rather than replaced.
Its data commands can emit JSON as well as styled tables. That is groundwork for a planned integration with my Hyprland desktop shell, so the terminal and the desktop can share one implementation.
Architecture
Layering
- 01
Commands
Thin Cobra commands: project, git, ports, config
- 02
Domain
Project detection, sweep plans, socket and process lookup in internal/
- 03
System
Git, /proc and Linux syscalls
- 04
Output
Styled terminal tables or JSON for other programs
Decisions
Key decisions
01
Ports straight from /proc
dev ports parses /proc/net/tcp and /proc/net/tcp6 for listening sockets, then maps socket inodes to the processes that own them — no dependency on ss or lsof.
02
Kill without hitting the wrong process
Freeing a port opens a pidfd and checks the process start time against the scan before signalling through it. If the PID was reused in the meantime, nothing is signalled.
03
Safe by default
git sweep never touches main, master or develop, and project cleanup treats a repository as unsafe if it is dirty, has stashes, untracked files or unpushed commits.
Progress
Built, and still to build
- Builtproject — list, open, info, status, cleanup
- Builtgit sweep — delete merged branches
- Builtports — inspect and free ports
- PlannedDesktop shell integration via JSON
- Plannedenvironment, ssh, homelab commands