frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

FWS – pip-installable embedded process supervisor with PTY/pipe/dtach back ends

16•mrsurge•1mo ago
I’m releasing *Framework Shells* (`fws`): a standalone Python package for orchestrating long-running background processes (“shells”) with *PTY*, *pipes*, and *dtach* backends.

This is meant for environments where you don’t want to stand up a full supervisor stack (or don’t have one): quick multi-service prototypes, dev environments, constrained userlands, etc.

### What it does

* Spawn/manage shells with:

  * **PTY**: interactive terminal sessions (resize, input, stream)
  * **Pipes**: stdin/stdout/stderr streams (good for daemons/LSPs)
  * **dtach**: persistent sessions you can attach/detach to (survives manager restarts)
* *Runtime isolation* (the big feature): shells are namespaced by `~/.cache/framework_shells/runtimes/<repo_fingerprint>/<runtime_id>/...` so two clones of the same repo can run concurrently without cross-adoption or cross-control. * *Control surfaces*: CLI + optional FastAPI/WS UI for listing, logs, and lifecycle actions. * Optional *hooks* for host integration (external registries/telemetry).

### CLI quickstart

```bash # list shells fws list

# run a one-off shell (no spec) fws run --backend pty --label demo -- bash -l -i

# apply a YAML shellspec (recommended) fws up shells.yaml

# terminate shells fws down

# attach to a dtach-backed shell fws attach <shell_id>

# show managed shells + procfs descendants fws tree --depth 4 ```

### Shellspec example

```yaml version: "1" shells: worker: backend: proc cwd: ${ctx:PROJECT_ROOT} subgroups: ["worker", "project:${ctx:APP_ID}"] command: ["python", "-m", "your_module.worker", "--port", "${free_port}"] ```

### Isolation + security model (simple by default)

* `FRAMEWORK_SHELLS_SECRET` derives the `runtime_id` (namespace) and API tokens. * If the secret is set, mutating API endpoints require:

  * `Authorization: Bearer <token>` (or `X-Framework-Key`).
* If the secret is unset, auth is disabled (dev mode).

Hard limit: if two runtimes share the same OS user/UID, the OS may still allow signaling each other’s processes. The guarantee is: no cross-count/adopt/control *through the library’s control plane*.

### Real-world usage

I use this as the substrate of a full dev environment where “apps are shells” (terminals, IDE + LSP, agent/MCP, aria2 RPC, file explorer, llama.cpp runner, etc.). Repo:

```text https://github.com/mrsurge/termux-extensions-2 ```

### Feedback I want

* Does the secret/fingerprint/runtime isolation contract feel right? * Any obvious foot-guns in the default API/CLI? * Expectations vs systemd/supervisord/tmux/dtach: where would you use this?

github.com/mrsurge/framework-shells

pip install "framework-shells @ git+https://github.com/mrsurge/framework-shells@main"

```bash fws --help ```

Comments

teraflop•1mo ago
> Expectations vs systemd/supervisord/tmux/dtach: where would you use this?

Sorry to be blunt, but I feel like this is a big unanswered question that you should be addressing. Why would I use your tool over the other well-known alternatives? I read through your overview and I don't see an answer.

You say that this is intended "for environments where you don’t want to stand up a full supervisor stack (or don’t have one)". And you compare it to systemd. But what Linux developer doesn't already have systemd installed?

Or to use a different comparison, what advantage does "fws run" have over "podman run"? Podman already supports PTYs that can be attached/detached, allows isolating different processes, and has an HTTP API.

It seems like you intend this for situations where you want a multi-pane text-base UI that resembles an IDE. But personally, I prefer to do this sort of thing by composing existing tools that provide that functionality (namely tmux/screen and Docker/Podman) rather than using a single integrated tool that tries to replace both.

talideon•1mo ago
First up, you shouldn't just paste a random lump of Markdown into the submission form. Write some actual prose. It makes your submission look sloppy.

Secondly, what does this give me that either systemd or Supervisor (where systemd isn't available) don't already give me?

simonw•1mo ago
Clickable link to the repo: https://github.com/mrsurge/framework-shells
tacostakohashi•1mo ago
Seems a bit like expect:

https://core.tcl-lang.org/expect/index

kennethallen•1mo ago
It's 2025 and you're telling people to `pip install` into system packages instead of running via `uvx`.

Tiny C Compiler

https://bellard.org/tcc/
51•guerrilla•1h ago•19 comments

You Are Here

https://brooker.co.za/blog/2026/02/07/you-are-here.html
34•mltvc•1h ago•24 comments

SectorC: A C Compiler in 512 bytes

https://xorvoid.com/sectorc.html
148•valyala•5h ago•24 comments

The F Word

http://muratbuffalo.blogspot.com/2026/02/friction.html
76•zdw•3d ago•29 comments

Brookhaven Lab's RHIC concludes 25-year run with final collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
35•gnufx•4h ago•39 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
80•surprisetalk•5h ago•88 comments

LLMs as the new high level language

https://federicopereiro.com/llm-high/
18•swah•4d ago•12 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
118•mellosouls•8h ago•229 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
156•AlexeyBrin•11h ago•28 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
864•klaussilveira•1d ago•264 comments

GitBlack: Tracing America's Foundation

https://gitblack.vercel.app/
16•martialg•47m ago•2 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
113•vinhnx•8h ago•14 comments

FDA intends to take action against non-FDA-approved GLP-1 drugs

https://www.fda.gov/news-events/press-announcements/fda-intends-take-action-against-non-fda-appro...
28•randycupertino•55m ago•26 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
20•mbitsnbites•3d ago•1 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
72•thelok•7h ago•13 comments

First Proof

https://arxiv.org/abs/2602.05192
73•samasblack•7h ago•57 comments

Italy Railways Sabotaged

https://www.bbc.co.uk/news/articles/czr4rx04xjpo
67•vedantnair•1h ago•50 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
253•jesperordrup•15h ago•82 comments

I write games in C (yes, C) (2016)

https://jonathanwhiting.com/writing/blog/games_in_c/
156•valyala•5h ago•135 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
532•theblazehen•3d ago•197 comments

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
38•momciloo•5h ago•5 comments

Selection rather than prediction

https://voratiq.com/blog/selection-rather-than-prediction/
18•languid-photic•3d ago•5 comments

Reinforcement Learning from Human Feedback

https://rlhfbook.com/
98•onurkanbkrc•10h ago•5 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
210•1vuio0pswjnm7•11h ago•319 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
42•marklit•5d ago•6 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
52•rbanffy•4d ago•13 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
272•alainrk•10h ago•452 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
129•videotopia•4d ago•40 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
647•nar001•9h ago•283 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
41•sandGorgon•2d ago•17 comments