I built a VS Code extension that reads your project's mind
Source: Dev.to
The Problem: Context Switching Fatigue 😫
You often have to install a specific package and go through these steps:
- Open npm.
- Search for the package name (e.g.,
react-routervs.react-router-dom). - Copy the name.
- Paste it into the terminal.
It’s a small friction, but it adds up. I wanted to fix that.
Introducing DotCommand v1.4.0 🚀
Instead of giving you a static list of commands, DotCommand now scans your workspace to understand exactly what you are working on.
🎥 See it in action (20 s)
How “Smart Context” Works
File Detection
- Looks for indicators like
package.json,Dockerfile,go.mod,requirements.txt.
Content Parsing
- Parses the files rather than just checking for their existence.
- If it sees react in your dependencies, it boosts React‑related commands.
- If it sees
docker-compose.yml, it prioritizes Docker commands.
Dynamic Variables
- Parses
package.jsondependencies in real‑time and feeds them into command templates (as shown in the demo).
Key Features ✨
- Framework Support: Currently supports React, Vue, Angular, Node.js, Python, Go, Rust, and Docker.
- Native UI: Uses VS Code’s native Quick Pick API—no webviews or custom windows, so it feels built‑in.
Tech Stack 🛠️
- Architecture: Clean Architecture with strict separation of concerns (Context Detectors vs. Command Runners).
- Performance: Caching mechanisms ensure the “Smart Scan” doesn’t slow down editor startup.
Try It Out! 🔗
- 📥 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! 🚀