Show HN: TERMy – A fast terminal assistant that does not use LLMs
Posted by gioscarab 4 days ago
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
- Variance and typo tolerance: https://www.youtube.com/watch?v=tQvGDk6fkk0
- Copilot integration: https://www.youtube.com/watch?v=Wzzouhq2a8A
- Advanced features: https://www.youtube.com/watch?v=qeIp0xePLBg
- Source Code: https://github.com/gioblu/NPC-Forge
Comments
Comment by publlus_enigma 4 days ago
One significant advantage of not using a local LLM is the significantly simplified dependency stack.
Comment by nateb2022 4 days ago
Comment by mbil 4 days ago
Comment by gioscarab 4 days ago
Comment by dmos62 4 days ago
Comment by gioscarab 4 days ago
Comment by vegnus 4 days ago
Comment by stefanka 3 days ago
Comment by gioscarab 4 days ago
What do you think about it?
Comment by gurjeet 4 days ago
TERMy (or is it the NPC-forge) seems to be worth a try.
Comment by piterrro 4 days ago
Comment by jdiff 4 days ago
Comment by asQuirreL 4 days ago
Comment by kzrdude 3 days ago
Comment by kouteiheika 4 days ago
It isn't. At least not by design, even though in practice it often can be. If you do greedy decoding (or use a preset seed) and deterministically compute everything (e.g. only use integer math) then it will be 100% always deterministic.
Comment by kennywinker 4 days ago
This tool has a finite amount of outputs for an infinite amount of inputs. Which is different from an llm based tool.
Comment by skeledrew 4 days ago
Comment by kennywinker 4 days ago
Comment by tgv 3 days ago
Adding more sentences to your data set will slowly degrade performance. It's a delicate system.
Source: I have written software with similar functionality (NLP search) in SaaS form, a long time ago. It required quite a bit of work to configure.
Comment by lna_stub 2 days ago
Comment by mpalmer 4 days ago
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.
Comment by kouteiheika 4 days ago
Have you considered/tried using a model that's, well, more appropriate size-wise for an use case like this? These are relatively big. Something like FunctionGemma [1] finetuned for a given set of tasks would be a lot more speedy.
[1] https://blog.google/innovation-and-ai/technology/developers-...
Comment by coder543 4 days ago
I really look forward to a hypothetical LFM3-230M, because LFM2.5-230M is so close to being usable, while FunctionGemma is miles away from being usable.
But, yes, still tangential to TERMy.
Comment by gioscarab 4 days ago
Comment by kennywinker 4 days ago
Comment by utopiah 4 days ago
Comment by gioscarab 4 days ago
I hope the community will help me to enhance it :) it is just a proof of concept for now
Comment by registereduser1 4 days ago
Comment by gioscarab 4 days ago
Comment by cyberclimb 3 days ago
love the idea/simplicity of this tool!
Comment by gioscarab 3 days ago
Comment by Alpha3031 3 days ago
Comment by gioscarab 3 days ago
For now it is a bit of a gimmick I agree :)
Comment by _superposition_ 3 days ago
Great, simple idea applied in a novel way. Peak engineering if I ever seen it and I don't even have to look at the code. Nice work!
Comment by paguasmar 3 days ago
Comment by zserge 3 days ago
Comment by dsemakin 2 days ago
Comment by indigodaddy 4 days ago
Comment by gioscarab 4 days ago
$ termy create file test.txt and write Hello
TERMy | template match | Confidence: 100.00%
Thinking: Ok, I am asked to create the file test.txt.
echo 'Hello' > 'test.txt' && termy_set_context 'active_file' 'test.txt'
Description: Writes Hello in file test.txt.
Response: Affirmative
Now that I think about it, I should let TERMy use tldr...
Comment by indigodaddy 3 days ago
Comment by analog_daddy 3 days ago
Comment by zem 3 days ago
Comment by asa123 3 days ago
Comment by stlahxm 3 days ago
Comment by tgaudibert 2 days ago
Comment by 4nm1tsu 1 day ago
Comment by devenquan 3 days ago
Comment by nirmeet011011 3 days ago