DEV Community

freerave
freerave

Posted on

I built a VS Code extension that reads your project's mind

The Problem: "Context Switching Fatigue" 😫
We've all been there. You are working on a React frontend, and your muscle memory is set to npm run dev. Then you switch to a Python backend service, and suddenly you find yourself typing npm start into a terminal that expects source venv/bin/activate.

Or worse, you need to install a specific package, and you have to:

Go to NPM.

Search for the package name (is it react-router or react-router-dom?).

Copy it.

Paste it into the terminal.

It’s a small friction, but it adds up. I wanted to fix that.

Introducing DotCommand v1.4.0 πŸš€
I just released a major update to my open-source extension, DotCommand. It transforms from a simple command runner into an Intelligent Development Assistant.

Instead of giving you a static list of commands, it now scans your workspace to understand exactly what you are working on.

πŸŽ₯ See it in action (20s)

🧠 How "Smart Context" Works
The new engine uses a weighted scoring system to analyze your project structure:

File Detection: It looks for indicators like package.json, Dockerfile, go.mod, requirements.txt.

Content Parsing: It doesn't just check if a file exists; it parses it.

If it sees "react" in your dependencies, it boosts React-related commands.

If it sees docker-compose.yml, it prioritizes Docker commands.

Dynamic Variables: This is my favorite part. As shown in the demo, it parses your package.json dependencies in real-time and feeds them into command templates.

✨ Key Features
Zero Config: You don't need to set up anything. Open a folder, and it works.

Framework Support: Currently supports React, Vue, Angular, Node.js, Python, Go, Rust, and Docker.

Native UI: I decided to stick to VS Code's native Quick Pick API. No jarring webviews or custom windowsβ€”it feels built-in.

πŸ› οΈ Tech Stack
Language: TypeScript

Architecture: Clean Architecture with strict separation of concerns (Context Detectors vs. Command Runners).

Performance: Caching mechanisms to ensure the "Smart Scan" doesn't slow down your editor startup.

πŸ”— Try it out!
I built this tool to scratch my own itch, and I'm sharing it with the community for free.

πŸ“₯ Install from Marketplace: DotCommand on VS Code Marketplace

⭐ Star on GitHub: kareem2099/dotcommand

I'm actively looking for feedback! If you find a framework that isn't supported yet, let me know in the comments or open an issue on GitHub.

Happy Coding! πŸš€

Top comments (0)