
One instruction. One command.
Your approval.
Pentashell turns plain English into a terminal command — it suggests one, shows it clearly, and runs it only when you say so. Fully local, no GPU, powered by a 47M-parameter model built from scratch.
Get running in under a minute
$ git clone https://github.com/Sumandebnath943/pentashell-cli$ cd pentashell-cli && pip install -r requirements.txt$ pip install -e .$ pentacmd "undo my last commit".png&w=3840&q=75)
The real interface — no mockup. Pentashell v0.2.0, powered by PentaCMD-47M.
Watch it think.
Type what you want. Pentashell names the family it detected, suggests one command, then stops at the approval gate. Every pair below is a real example run locally on CPU.
pentacmd>
How it thinks.
Every instruction travels the same six steps — and the single most important detail is the prompt format with no trailing space after the command marker (a trailing space made the model drop the first word).
Plain English
"undo my last commit"
Decide family
flag wins · else auto-detect
Exact prompt
### Task · ### Command
PentaCMD-47M
greedy decode · stop token
Extract command
git revert HEAD
Approval gate
[y/N] · then run
One implementation. The interactive loop and pentacmd "…" share the exact same path.
Nothing runs without your yes.
A model that can be wrong must never run a command you didn’t approve — and must be extra careful with anything destructive. Two gates enforce it.
$ git switch -c payments
Run this? [y/N]
- › Default is No. Empty input = No.
- › Runs only on an explicit y / yes.
$ git reset --hard HEAD~3
Warning — names the risk
This permanently discards commits and changes.
Type yes to proceed
A bare y is rejected — a single keystroke can never trigger it by accident.
0 / 10
dangerous commands caught
in the detector's unit tests
0 / 7
false positives in tests
safe commands never flagged
0
command families covered
bash · git · npm · python · powershell
Safe commands like npm install, git add and Format-Table are correctly never flagged.
Five families, one guess you can trust.
git
--gitVersion control — the strongest family (100% exact-match in training).
High-signal keywords
pentacmd> create a branch called payments and switch to it
detected · git
The decision is always shown — and an explicit flag is a guaranteed override. No keyword match falls back to bash, and says so.
The model under the hood.
Pentashell is the tool. PentaCMD-47M is the model it wraps — a decoder-only transformer trained from scratch on a 16 GB-RAM, no-GPU laptop. The weights travel with the package, so the CLI stays self-contained.
Meet PentaCMD-47M, the SLM→Parameters
47.2M
47,233,280
Architecture
Decoder-only
nanoGPT-style transformer
Layers · Heads · Width
8 · 10 · 640
weight-tied embeddings
Context length
256
tokens
Vocabulary
12,000
byte-level BPE
Validation exact-match
~86.7%
100% on git
How it was built — and what each step taught.
Deliberately built in small, individually-tested steps. Each one earned its place — and a real lesson came out of every increment.
Core inference wrapper
Load the model once, format the exact trained prompt, greedy-decode, print the command.
Lesson · Preserve the prompt format with no trailing space after “### Command:” — a trailing space made the model drop the first word of every command.
Callable from anywhere
Turn the script into an installable package with a pentacmd entry point on PATH.
Lesson · Let the usage decide the architecture — because users install it, the weights have to travel with the package.
Family handling
Explicit flags plus transparent keyword auto-detection, with the choice always shown.
Lesson · Match whole words and weight phrases — “tar” was matching inside “start”, and a generic word beat a specific phrase.
Approval & execution
Run this? [y/N], default No. Destructive commands get a stronger, risk-naming gate.
Lesson · Safety is logic to be verified, not a vibe — unit-tested for both catches and false positives.
Interactive UI polish
rich colour, a typing-reveal animation, and a REPL loop with the model kept warm between turns.
Lesson · Small platform details bite — plain print mangled an em-dash on the Windows console; rich fixed the encoding for free.
Documentation & packaging
A portfolio-ready README, MIT licence, project bible, and this report.
Lesson · Separate human output from machine output — notes go to stderr, the bare command to stdout, so piping stays clean.
Honest by design.
No overselling. These limits shape correct use — and they are exactly why the approval gate exists in the first place.
It can be confidently wrong
A 47M model can return a plausible-but-incorrect command. That is exactly why the approval step exists — read every command before approving.
Auto-detection is deliberately simple
Keyword matching, not magic. Ambiguous phrasing can fall to the default bash family — a flag or family: prefix steers it.
Execution is Windows-first
Commands run through PowerShell on Windows. The macOS/Linux bash path is implemented but untested on the build machine.
It is not an agent
One instruction → one command → approve → run. No multi-step planning, no chaining, no acting on output. That is by design.
Use it.
Clone, install the editable package, and the pentacmd command works from any terminal, in any folder.
# weights ship with the repo via Git LFS$ git clone https://github.com/Sumandebnath943/pentashell-cli$ cd pentashell-cli$ pip install -r requirements.txt$ pip install -e .# interactive — model loads once, then instant$ pentacmd# one-shot — family auto-detected$ pentacmd "make a virtual environment with venv"→ python -m venv venv# print only, never run$ pentacmd -n "install the requests package with pip"Command reference
- pentacmdinteractive loop — model loads once, then instant
- pentacmd "…"one-shot — family auto-detected
- pentacmd --git "…"force a family (bash · git · npm · python · powershell)
- pentacmd -n "…"print the command only — never runs
- family: …inside the loop, prefix to force a family
Prefer not to clone the 180 MB weights? They’re also published as a separate release asset / Hugging Face download — point the CLI at them and skip the LFS pull. Built on torch (CPU), tokenizers and rich.
Runs the 47M model — no GPU required
Byte-level BPE encode / decode
Colour, panels, typing reveal, UTF-8 on Windows
Flags, family overrides, one-shot vs interactive
Built on 3.12.7, per-user install
The execution shell, streamed live
open source · MIT · built from scratch
One instruction. One command.
Your approval.
Clone the repo, install with pip, and ask in plain English. Read every command before you approve — that’s the whole point.
Pentashell · the default CLI for PentaCMD-47M · MIT · built from scratch by Suman Debnath