6 ms·
Show HN: TERMy – A fast terminal assistant that does not use LLMs
I love research and development, you may have heard of me because of PJON (Padded Jittering Operative Network). It is a network protocol I started developing in 2010, which was recently implemented in silicon by the ETH Zurich university thanks to the research of Pius Sieber.
I am excited to share with you TERMy, a terminal assistant built on top of the NPC-Forge framework. Unlike everything else being built today, TERMy does not use embeddings, machine-learning or LLMs. It runs on the CPU (even on a Raspberry Pi Zero) both in the terminal or client-side in a browser tab and responds in milliseconds. It is a cynical but very knowledgeable Linux terminal assistant that translates your natural language into shell commands without relying on a single artificial neuron.
I had a chance to focus for 2 months on my personal projects since early July, during the strange times of AI price hikes and the end of subsidized tokenmaxing. I was curious to see if I could develop from scratch a terminal assistant capable of handling simple natural language requests. I have a bad memory and got used to ask to copilot "activate the virtual environment" or similar trivial operations spending a non negligible sum every month. I started thinking, maybe I can do something to make my workflow more efficient? Do I really need trillions of parameters to accomplish those tasks?
How it Works
When you type a prompt, it goes through a lightweight NLU pipeline written in ~1000 lines of Python that implement the following steps:
1. Strip expletives, interjections, encouraging, discouraging and thanking words (remove noise)
2. Sentiment analysis
3. Exact Match (very fast)
4. Template Match (slower)
5. Probabilistic Match (even slower)
Step 5 relies on:
1. IDF (Inverse Document Frequency) to identify rare words.
2. BOW (Bag Of Words) to accommodate word inversions.
3. IDF weighted Levenshtein to safely handle typos.
Permission gating is hardcoded into the dataset and enforced for all potentially destructive commands, so it's inherently safer than letting an unpredictable LLM run wild on your machine.
- TERMy in operation: https://www.youtube.com/watch?v=qeIp0xePLBg https://www.youtube.com/watch?v=qeIp0xePLBg
- Variance and typo tolerance: https://www.youtube.com/watch?v=tQvGDk6fkk0 https://www.youtube.com/watch?v=tQvGDk6fkk0
- Copilot integration: https://www.youtube.com/watch?v=Wzzouhq2a8A https://www.youtube.com/watch?v=Wzzouhq2a8A
- Advanced features: https://www.youtube.com/watch?v=qeIp0xePLBg https://www.youtube.com/watch?v=qeIp0xePLBg
- Source Code: https://github.com/gioblu/NPC-Forge https://github.com/gioblu/NPC-Forge
- 4nm1tsu 27d ago[dead]
- gioscarab 1mo agoHi, I am the creator, feel free to ask any questions :) What do you think about it?
- mpalmer 1mo agoAt first blush, it is a really persuasive compromise between full-on LLM inference and boring old fuzzy history search! I really like it, this flavor of specialization gives the user a win on privacy and speed. Seems like the right idea for such a tool.
- registereduser1 1mo agoCool project! How does it differ from warp terminals ai mode where you can ask it questions and it responds back
- gioscarab 1mo agoWarp uses LLMs so it is slow and prone to hallucination. Using very colloquial terms TERMy is more or less a calculator that knows english :) so it can run on your CPU and respond instantly! The difference is that it can only answer predetermined responses (with optional arguments) this makes it useless if you need to generate text, but makes it safe and predictable for a use case like a terminal assistant.
- gurjeet 1mo agoI haven't evaluated it yet, but I love the fact that the output is (at least claimed to be) deterministic. I can't trust an LLM to do the right thing after I deploy it to production, because their output is non-deterministic by design. TERMy (or is it the NPC-forge) seems to be worth a try.
- kouteiheika 1mo ago