A terminal-based AI agent for creating, updating, and executing coding projects with minimal folder structures and production-ready code. Powered by the Gemini API, it supports various project types (e.g., HTML, Python, React) and provides detailed execution instructions.
- Project Creation: Generate new projects with minimal folder structures (e.g., HTML to-do lists, Python scripts).
- Project Updates: Fix issues in existing files without regenerating entire projects (e.g., "CSS file not working").
- Execution Guidance: Provide detailed instructions via an
execute.md
file for running projects, including dependencies, compatibility, and troubleshooting. - Interactive CLI: Approve proposed project structures and input commands via a terminal interface.
- Beautiful UI for Web Projects: Generate visually appealing HTML/React interfaces with Tailwind CSS, responsive design, and subtle animations.
- Spinner & Animations: Display loading spinners and celebratory animations for a polished user experience.
- Node.js: Version 14 or higher (includes npm). Download from nodejs.org.
- Gemini API Key: Obtain an API key and set it in a
.env
file asGEMINI_API_KEY
.
- Clone the repository:
git clone <repository-url> cd cursor2.0-terminal-agent
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add your Gemini API key:GEMINI_API_KEY=your-api-key-here
- Run the agent:
npm start
- Start the terminal agent:
node index.js
- Interact with the CLI:
- Create a project:
Create a to-do list in HTML
orWrite a Python script for a calculator
. - Update a project:
css file is not working
orfix the python script
. - Run a project:
run the project
orexecute the python script
. - Other commands:
help
: Display available commands.exit
orquit
: Exit the program.
- Create a project:
- Approve project structures when prompted (for new projects).
- Find projects in the
chaicode
directory, withexecute.md
for execution instructions.
All projects are stored in the chaicode
directory. Example structures:
- HTML Project (e.g., to-do list):
chaicode/todo-app/ ├── index.html ├── style.css ├── script.js ├── README.md ├── execute.md
- Python Script (e.g., calculator):
chaicode/calculator/ ├── calculator.py ├── README.md ├── execute.md
- Node.js Modules:
dotenv
: Load environment variables.node-fetch
: Make HTTP requests to the Gemini API.chalk
: Add color to terminal output.fs
,path
,readline
: Node.js built-in modules for file operations and CLI input.
- External Services:
- Gemini API for content generation.
- Tailwind CSS (via CDN for HTML projects).
- FontAwesome (via CDN for icons in web projects).
- Pexels or Placehold.co for placeholder images.
- Detailed instructions are provided in each project's
execute.md
file, including:- Steps to run the project (e.g.,
python calculator.py
,npm start
). - Required dependencies (e.g., Python 3.6+, Node.js).
- Compatibility (e.g., browser support, OS compatibility).
- Potential issues and fixes (e.g., port conflicts, missing dependencies).
- Steps to run the project (e.g.,
- To run the agent itself, see the Installation section.
- OS: Works on Windows, macOS, and Linux.
- Node.js: Requires version 14 or higher.
- Browsers (for web projects): Chrome, Firefox, Edge, Safari (modern versions).
- Gemini API Key Missing: Ensure
GEMINI_API_KEY
is set in.env
. - Node.js Not Installed: Install Node.js if
node
ornpm
commands fail. - OS Not Supported: Ensure you're using a supported OS (Windows, macOS, Linux).
- Network Issues: Ensure a stable internet connection for API requests.
- File Path Errors: Avoid nested
chaicode
directories (handled automatically). - Dependency Errors: Run
npm install
if module errors occur.