Skip to content

Nikhil-Dadhich/DevCursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–±οΈ DevCursor – AI-Powered Terminal Agent

DevCursor is a terminal-based intelligent agent that operates like a smart cursor. It plans, acts, observes, and responds using structured reasoning cycles. It can generate code files, execute commands, edit content, and even check the weather – all through simple natural language instructions.


πŸŽ₯ Demo Video

Watch the demo


✨ Features

  • πŸ” Reasoning Loop: Plan β†’ Act β†’ Observe β†’ Respond
  • 🧠 Intelligent code generation and file editing
  • πŸ“‚ Automatically writes and organizes project files
  • πŸ“‘ Get real-time weather for any city
  • πŸ–₯️ Execute valid Windows terminal commands
  • πŸ’Ύ Stores generated code in memory before writing
  • πŸ’¬ Fully JSON-driven response protocol

πŸ› οΈ Built With

  • Python 3.10+
  • OpenAI (or Gemini-compatible) API
  • dotenv for environment variables
  • Requests, subprocess, os modules

πŸ“¦ Setup

  1. Clone the Repository

    https://github.com/Nikhil-Dadhich/DevCursor.git
    cd DevCursor
  2. Install Dependencies

    pip install -r requirements.txt
  3. Configure API Key Create a .env file:

    GEMINI_API_KEY=your_gemini_or_openai_compatible_key
    
  4. Run the Agent

    python main.py

πŸ§‘β€πŸ’» Usage

Once running, just type your command into the terminal. Examples:

> Create a calculator app with HTML, CSS, and JavaScript

The agent will:

  • Plan the steps
  • Generate file content
  • Store each file in memory
  • Write them to disk via write_file

πŸ› οΈ Available Tools

Tool Name Description Input Type
get_weather Returns weather for a given city string (city name)
run_command Executes Windows command-line instructions string (cmd.exe command)
write_file Writes stored file content to disk { filepath, content }

πŸ”’ Safety & Constraints

  • Only valid cmd.exe commands are supported
  • All agent responses must follow strict JSON format
  • Final step must output a completion message before stopping

πŸ“‚ Example Output

{
  "step": "output",
  "content": "Project 'Calculator' created successfully. Files: index.html, styles.css, script.js are located in the 'Calculator' directory."
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages