DEV Community

Cover image for How I Built NeuroShell — An AI-Powered Terminal That Understands You
AI Unfiltered
AI Unfiltered

Posted on • Originally published at Medium

How I Built NeuroShell — An AI-Powered Terminal That Understands You

Originally published on Medium — read it here


How I Built NeuroShell — An AI-Powered Terminal That Understands You

In my Operating Systems class, I watched students repeatedly copy-paste commands they didn’t understand.

Someone would ask, “Zain, what does this even do?” and I’d walk them through it.

But I knew next semester, I wouldn’t be there to help.

That’s when I started building NeuroShell — a natural language terminal that not only runs commands, but also explains them. A terminal built for humans, not just developers.


Why I Built It

I wasn’t trying to compete with industry-grade tools like Warp or Devbox.

My aim was simple — build a smart terminal for my university, where students could learn, explore, and understand what’s happening under the hood.

I wanted to solve a local problem.


The Stack Behind NeuroShell

NeuroShell is a cross-platform terminal built using React.js and Electron for the frontend.

It feels native and lightweight, but still expressive enough to scale.

The backend is powered by FastAPI, serving both command execution and AI functionality.

Here’s how it all came together:

  • Frontend: React.js + Tailwind CSS (bundled with Electron)
  • Backend: FastAPI
  • AI & NLP: LangChain with NVIDIA NIM (LLaMA 3/4 models — free for 1 year)
  • Embeddings: HuggingFace (couldn’t afford OpenAI embeddings)
  • Vector DB: ChromaDB
  • Memory & Context: ConversationBufferMemory from LangChain
  • Prompt Structuring: ChatPromptTemplate & structured tools
  • Email Agent: smtplib + MIMEMultipart for sending documents via terminal

Making the Terminal Smart

I integrated LangChain’s multi-agent system to handle not just command generation, but real-time explanations.

When you run a command, you can click "Explain" — and NeuroShell shows a breakdown of what that command does, using natural language prompts.

I also used structured chat agents and retrieval chains to build a chat history system.

For example, you can ask:

“What npm command did I run to install Express last Friday?”

The system uses vector similarity (via ChromaDB + HuggingFaceEmbeddings) to return the most relevant past actions.


Sky Mode: Smarter Path Handling

One challenge was users having to repeatedly mention full file paths, even when they were already inside a specific directory.

With Sky Mode, that’s no longer necessary.

Once you're inside a location — say, Disk D — you can simply say:

“Show me the contents of the 10Pearls folder,”

And NeuroShell understands that you mean the folder inside Disk D.

Sky Mode uses conversational memory to make command execution feel more natural — like talking to an assistant that actually pays attention.


Sending Emails from the Terminal

Another feature I’m proud of is the Email Agent.

Students often write reports or notes in documents. NeuroShell lets you send that content as an email, right from the terminal.

Just specify the recipient address, attach the file, and it’s sent — no mail client needed.

Built with:

  • smtplib
  • MIMEText
  • MIMEMultipart

This feature keeps workflows simple and efficient, especially for academic environments.


Cost-Efficient AI Stack

I couldn’t afford OpenAI’s models or embeddings — so I didn’t use them.

Instead, I built NeuroShell using:

  • HuggingFace for free embedding generation
  • NVIDIA NIM (for LLaMA-based models — fast, accurate, and free for a year)

This kept the system cost efficient and accessible to me as a student.


Design Choices that Matter

NeuroShell’s UI is minimalist, inspired by macOS apps.

I’ve always loved the red, yellow, green buttons on top — so I added them in the Electron app, even for Windows.

It’s a small touch, but one that reflects attention to detail and familiarity.


Final Thoughts

NeuroShell isn’t meant to replace industry-grade tooling.

It’s meant to educate, assist, and empower students who are just beginning to explore Linux, terminals, and development workflows.

It’s not about showing off — it’s about solving a real problem with what I had access to.

This project pushed me to explore:

  • Contextual memory
  • Prompt engineering
  • RAG pipelines
  • Vector databases like ChromaDB All while staying within a student’s budget.

Code & Demo

You can check out the full code here:

https://github.com/Zain-Zameer/neuroshell


Thanks for reading 🙌

If you’re building something similar or exploring AI-powered terminals, feel free to connect or reach out.

Top comments (0)