get-response
v1.10.2
Published
Ask any questions to AI, and get your response right at your terminal
Maintainers
Readme
Get Response - A Terminal-Based AI Powerhouse 🚀
Get-Response is a cutting-edge, modular CLI tool designed by Swapnoneel Saha that brings the power of Google's Gemini directly to your terminal. It's more than just a chatbot; it's a productivity suite for developers, allowing you to interact with your codebase, documents, images, and even automate terminal tasks through natural language.
[!TIP] Looking for something lighter? Check out get-response-lite, a stripped-down version that focuses only on the essential AI chat features for a zero-weight footprint. Available on NPM.
🌟 Key Features
- 🚀 Gemini Integration: Leverages the latest, high-speed model for near-instant responses.
- 📂 Context-Aware Interaction: Provide context through single files, entire directories, PDFs, or images (via OCR).
- 📟 Terminal Automation: Describe a task (e.g., "Create a React app") and the AI will generate and execute the necessary commands with your permission.
- 📚 Stack Exchange Integration: Search across Stack Overflow and other Stack Exchange sites directly from the CLI.
- 🖼️ Mermaid Workflow Generation: Automatically generate and render workflow diagrams for your codebase.
- 💬 Interactive Modes: Seamlessly switch between AI chat mode and Stack Exchange research mode while maintaining session context.
- 💅 Beautiful UI: Rich, styled terminal output using
chalk,boxen, and real-time status spinners.
🏗️ Architecture
The project follows a modular, functional architecture designed for high maintainability and clarity.
Directory Structure
get-response/
├── index.js # Main entry point and CLI orchestrator
├── package.json # Project dependencies and script definitions
├── src/ # Core source code
│ ├── core/ # Critical logic for data gathering and flow
│ │ ├── chat.js # Interactive Chat & Stack mode management
│ │ └── context.js # File, PDF, Image, and Directory reading logic
│ ├── services/ # External API & Tool integrations
│ │ ├── ai.js # Google Gemini AI implementation
│ │ ├── stack.js # Stack Exchange API wrapper
│ │ ├── terminal.js # Command generation and execution engine
│ │ └── mermaid.js # Mermaid diagram generation logic
│ ├── ui/ # Visual components and templates
│ │ └── display.js # Help messages, banners, and version info
│ └── utils/ # Generic utilities and configuration
│ ├── config.js # API keys and project constants
│ ├── formatter.js # AI response styling and code-block boxing
│ └── helpers.js # OS detection, update checks, and sanitization
└── node_modules/ # External dependenciesModule Breakdown
index.js: The thin entry layer that parses command-line arguments usingprocess.argvand routes them to the appropriate core or service module.src/services/ai.js: Managed by theGoogleGenerativeAIclient, it handles prompt engineering and content generation using thegemini-2.5-flashmodel.src/core/context.js: Usespdf-parse-forkfor document ingestion andtesseract.jsfor OCR text extraction from images.src/services/terminal.js: A bridge between AI-generated commands and the system shell, implementing a safety-first "Request Permission" loop before execution.
💻 Installation
Ensure you have Node.js (>=18.0.0) installed.
npm i get-response -g[!TIP] You can also run it without permanent installation using
npx get-response.
🚀 Usage
Simple Question
npx get-response "How do I reverse a linked list in Python?"Contextual Knowledge
| Input Type | Flag | Example |
| :--- | :--- | :--- |
| File | -f | npx get-response "Explain this code" -f ./auth.js |
| Directory | -d | npx get-response "Find bugs in this project" -d ./src |
| PDF | -p | npx get-response "Summarize this paper" -p ./research.pdf |
| Image| -i | npx get-response "What does this error message mean?" -i ./screenshot.png |
Interactive Chat Mode
Enter a persistent session where context is remembered across multiple questions:
npx get-response -c- Type
stackwithin chat mode to jump to Stack Exchange research. - Type
chatwithin stack mode to return with your context intact.
Terminal Automation
npx get-response "Initialize a git repo and add a basic .gitignore" -tMermaid Diagram Generation
Generate a visual workflow of your codebase:
npx get-response -m -d ./src🏎️ Full vs. Lite Version
| Feature | Get-Response (Full) | Get-Response-Lite | | :--- | :---: | :---: | | Gemini AI Chat | ✅ | ✅ | | File Context | ✅ | ✅ | | Directory Context| ✅ | ✅ | | OCR (Images) | ✅ | ❌ | | PDF Parsing | ✅ | ❌ | | Terminal Automation| ✅ | ✅ | | Mermaid Diagrams | ✅ | ❌ | | Stack Exchange | ✅ | ❌ |
If you only need core AI interactions without the extra toolset, we recommend get-response-lite.
🛠️ Tech Stack
- AI Engine: Google Gemini 2.5 Flash
- Runtime: Node.js
- Networking: Axios
- OCR: Tesseract.js
- PDF Parsing:
pdf-parse-fork - CLI Aesthetics:
chalk,boxen,nanospinner - Diagrams:
mermaid-cli
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
🐛 Support & Bug Reporting
For any questions, suggestions, or issues, please open an issue in the GitHub repository.
Created with ❤️ by Swapnoneel Saha
