frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How can we achieve a full POSIX shell implementation purely client-side?

https://github.com/Stasshe/Pyxis-CodeCanvas
1•Stasshe•2mo ago

Comments

Stasshe•2mo ago
I'm developing Pyxis (https://github.com/Stasshe/Pyxis-CodeCanvas), a browser-based IDE designed primarily for iPad. *Since WebContainer doesn't work reliably on iPad*, I had to build everything from scratch, including a complete shell system.

*What I've implemented so far:*

Our StreamShell architecture supports: - Pipeline processing with true streaming (`cmd1 | cmd2 | cmd3`) - Full redirection support (`>`, `>>`, `<`, `2>&1`, custom fd like `3>file`) - Control structures (`if/then/else`, `for/while` loops, `break/continue`) - Variable expansion (`$VAR`, `$(command)`, `$((arithmetic))`) - Logical operators (`&&`, `||`) with short-circuit evaluation - Background execution (`cmd &`) - Process abstraction with signal handling - Node.js Stream API for backpressure handling - Most common Unix commands (`ls`, `cat`, `grep`, `head`, `tail`, etc.) - Script execution (`.sh` files with full control flow)

*Technical approach:* - Process abstraction using Node.js PassThrough streams - File descriptor management via Map structures - AST-based command parsing - Per-fd buffering strategy - IndexedDB-based virtual file system - *Pure JavaScript/TypeScript implementation - no WASM, no WebContainer* - Runs entirely in the browser main thread with timeout protection

*Current limitations:* - Some advanced bash features not yet implemented (shell functions, process substitution, heredocs) - No `*` recursive globbing - Simplified job control - Browser environment constraints (no native modules, all async) - Single-threaded execution (no Web Workers for commands)

*My questions:*

1. *Is this approach sufficient for a practical shell environment?* Are there critical POSIX features I'm missing that would make this unsuitable for real-world use on iPad?

2. *Are there fundamental design flaws in my implementation?* Particularly concerned about: - The fd management strategy (Map-based with PassThrough streams) - Stream-based pipeline processing and backpressure handling - Memory efficiency with large data flows - The parser's handling of edge cases and quote processing - Timeout-based protection vs. proper cancellation

3. *What would you prioritize next?* Given the constraints of: - Browser-only environment (no server, no WebContainer) - iPad compatibility requirement - Must work offline - Limited to what IndexedDB + browser APIs can provide

4. *Alternative approaches?* Are there better architectural patterns for implementing a POSIX-like shell in a pure browser environment that I should consider?

The full technical documentation is available here: [SHELL-SYSTEM.md](https://github.com/Stasshe/Pyxis-Client-Side-Code-Editor/blo...)

*Why not WebContainer?* WebContainer is an excellent technology, but it has significant limitations on iPad/iOS Safari - SharedArrayBuffer restrictions, memory constraints, and reliability issues make it unsuitable for our use case. We need a solution that works consistently across all platforms, especially mobile.

I'd appreciate any feedback from those who have experience with shell implementation, browser sandboxing, or building development tools for constrained environments like iPad.

stop50•2mo ago
Could a wasm build of uutils be of help?
Stasshe•2mo ago
Yes, you can use Custom Extension with through an interactive CLI to create template extension.

I'm working hard to improve the utilities and make the connection between wasm build and pyxis core system.

I'wont use wasm to build as a core, base system, but i will support in extension.

Still, I was not uploaded a react build extension system, but if you want to use this, you can upload a zip extension file.(which is created for pyxis)

* sorry for my bad english XD

d3Xt3r•2mo ago
Cool project! But the name is a bit misleading, I thought you were talking about Ptyxis[1], the new terminal for GNOME.

[1] https://gitlab.gnome.org/chergert/ptyxis

Stasshe•2mo ago
thanks!

uh, I didn't know that. that's true. there are so similar naming...

but I have apply to the contest at this name, and I'm in best16, so I can't change it, unfortunately.

A delightful Mac app to vibe code beautiful iOS apps

https://milq.ai/hacker-news
1•jdjuwadi•1m ago•1 comments

Show HN: Gemini Station – A local Chrome extension to organize AI chats

https://github.com/rajeshkumarblr/gemini_station
1•rajeshkumar_dev•1m ago•0 comments

Welfare states build financial markets through social policy design

https://theloop.ecpr.eu/its-not-finance-its-your-pensions/
2•kome•5m ago•0 comments

Market orientation and national homicide rates

https://onlinelibrary.wiley.com/doi/10.1111/1745-9125.70023
3•PaulHoule•5m ago•0 comments

California urges people avoid wild mushrooms after 4 deaths, 3 liver transplants

https://www.cbsnews.com/news/california-death-cap-mushrooms-poisonings-liver-transplants/
1•rolph•6m ago•0 comments

Matthew Shulman, co-creator of Intellisense, died 2019 March 22

https://www.capenews.net/falmouth/obituaries/matthew-a-shulman/article_33af6330-4f52-5f69-a9ff-58...
3•canucker2016•7m ago•1 comments

Show HN: SuperLocalMemory – AI memory that stays on your machine, forever free

https://github.com/varun369/SuperLocalMemoryV2
1•varunpratap369•8m ago•0 comments

Show HN: Pyrig – One command to set up a production-ready Python project

https://github.com/Winipedia/pyrig
1•Winipedia•10m ago•0 comments

Fast Response or Silence: Conversation Persistence in an AI-Agent Social Network [pdf]

https://github.com/AysajanE/moltbook-persistence/blob/main/paper/main.pdf
1•EagleEdge•10m ago•0 comments

C and C++ dependencies: don't dream it, be it

https://nibblestew.blogspot.com/2026/02/c-and-c-dependencies-dont-dream-it-be-it.html
1•ingve•11m ago•0 comments

Show HN: Vbuckets – Infinite virtual S3 buckets

https://github.com/danthegoodman1/vbuckets
1•dangoodmanUT•11m ago•0 comments

Open Molten Claw: Post-Eval as a Service

https://idiallo.com/blog/open-molten-claw
1•watchful_moose•12m ago•0 comments

New York Budget Bill Mandates File Scans for 3D Printers

https://reclaimthenet.org/new-york-3d-printer-law-mandates-firearm-file-blocking
2•bilsbie•13m ago•1 comments

The End of Software as a Business?

https://www.thatwastheweek.com/p/ai-is-growing-up-its-ceos-arent
1•kteare•14m ago•0 comments

Exploring 1,400 reusable skills for AI coding tools

https://ai-devkit.com/skills/
1•hoangnnguyen•14m ago•0 comments

Show HN: A unique twist on Tetris and block puzzle

https://playdropstack.com/
1•lastodyssey•18m ago•0 comments

The logs I never read

https://pydantic.dev/articles/the-logs-i-never-read
1•nojito•19m ago•0 comments

How to use AI with expressive writing without generating AI slop

https://idratherbewriting.com/blog/bakhtin-collapse-ai-expressive-writing
1•cnunciato•20m ago•0 comments

Show HN: LinkScope – Real-Time UART Analyzer Using ESP32-S3 and PC GUI

https://github.com/choihimchan/linkscope-bpu-uart-analyzer
1•octablock•20m ago•0 comments

Cppsp v1.4.5–custom pattern-driven, nested, namespace-scoped templates

https://github.com/user19870/cppsp
1•user19870•22m ago•1 comments

The next frontier in weight-loss drugs: one-time gene therapy

https://www.washingtonpost.com/health/2026/01/24/fractyl-glp1-gene-therapy/
2•bookofjoe•24m ago•1 comments

At Age 25, Wikipedia Refuses to Evolve

https://spectrum.ieee.org/wikipedia-at-25
2•asdefghyk•27m ago•4 comments

Show HN: ReviewReact – AI review responses inside Google Maps ($19/mo)

https://reviewreact.com
2•sara_builds•28m ago•1 comments

Why AlphaTensor Failed at 3x3 Matrix Multiplication: The Anchor Barrier

https://zenodo.org/records/18514533
1•DarenWatson•29m ago•0 comments

Ask HN: How much of your token use is fixing the bugs Claude Code causes?

1•laurex•32m ago•0 comments

Show HN: Agents – Sync MCP Configs Across Claude, Cursor, Codex Automatically

https://github.com/amtiYo/agents
1•amtiyo•33m ago•0 comments

Hello

2•otrebladih•34m ago•1 comments

FSD helped save my father's life during a heart attack

https://twitter.com/JJackBrandt/status/2019852423980875794
3•blacktulip•37m ago•0 comments

Show HN: Writtte – Draft and publish articles without reformatting, anywhere

https://writtte.xyz
1•lasgawe•39m ago•0 comments

Portuguese icon (FROM A CAN) makes a simple meal (Canned Fish Files) [video]

https://www.youtube.com/watch?v=e9FUdOfp8ME
1•zeristor•41m ago•0 comments