
Sanjay Sikdar

I’ve been working on a small experiment to see how far an AI agent can go in real-world coding — not just generating code snippets, but actually creating folders, generating files, and editing them automatically.
This project is a small CLI agent that uses Google's Gemini API to generate complete websites from natural language prompts. It's simple, safe, and practical — the agent executes one shell command at a time, reads/writes files, and scaffolds HTML/CSS/JS projects.
executeCommand, readFile,
writeFile, listFiles.I recently built an open-source Node.js tool called node-gemini-ai-agent that lets you create or modify websites just by describing what you want — and more importantly, helps you understand how AI agents actually work behind the scenes.
It’s powered by Google’s Gemini model and can run shell commands, create folders, write files, and edit your code directly — like having a small AI developer working in your terminal.
You can ask the agent to:
Example:
> Build a portfolio site with a hero section
The agent guesses your project name, creates a folder, and scaffolds everything:
portfolio-site/
├── index.html
├── index.css
└── index.js
Then you can continue:
> Change the hero section background to a video
and it’ll edit the right files automatically.
Clone and install:
git clone https://github.com/sannjayy/node-gemini-ai-agent.git
cd node-gemini-ai-agent
npm installAdd your Gemini API key:
export GEMINI_API_KEY=your_api_keyStart the agent:
npm startYou’ll now get a terminal chat where you can describe your project directly.
Let’s say you want to make a food delivery landing page:
> Create a landing page for a food delivery app with navbar, hero section, and order button
What happens behind the scenes:
The agent reads your prompt and decides what tools it needs (like file creation or writing code).
It creates a new folder based on your prompt, e.g. food-delivery-app/.
Inside it, it writes:
food-delivery-app/
├── index.html
├── index.css
└── index.js
It fills in placeholder content, sample styles, and connects everything.
It logs every step so you can see what it’s doing.
Then you can tweak it:
> Add footer with contact info
> Update button color to red
> Add short description below the hero image
Each instruction edits files in real-time.
This project is not just for building—it’s a window into how AI agents reason, choose actions, and modify code autonomously.
Each time you type a prompt, the agent:
writeFile or executeCommand).So you’re basically watching an AI reason, act, and iterate — one function call at a time.
I wanted to make something that’s both practical and educational — a way to learn how AI agents really work, not just what they output. You can explore tool-based reasoning, file system control, and error handling — all in real code.
Repo: github.com/sannjayy/node-gemini-ai-agent
Clone it, chat with your terminal, and see how an AI agent actually builds and edits a project.
You’ll learn two things:
If you build something fun with it, tag me (sannjayy_dev) — I’d love to see what kind of projects people create.