npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

get-response-lite

v1.2.4

Published

Ask any questions to AI, and get your response right at your terminal

Readme

🚀 Get Response-Lite: Terminal-based AI Assistant

Get Response Lite is a lightweight, modular Node.js CLI tool designed to bring the power of Google's Gemini AI directly to your terminal. Whether you need a quick answer, an interactive chat session, or automated terminal command execution, Get Response Lite provides a seamless and aesthetically pleasing experience.

Created by Swapnoneel Saha, this is the streamlined version of the Get-Response package, optimized for speed and minimal overhead.


✨ Features

  • Instant Answers: Get high-quality responses from Gemini 2.5 Flash models instantly.
  • Context Awareness: Use files (-f) or entire directories (-d) as context for your questions.
  • Interactive Chat: Enter a persistent chat session (-c) that remembers the context of your conversation.
  • Terminal Automation: Let AI generate and execute terminal commands (-t) based on your natural language prompts.
  • Beautiful UI: Rich text formatting, spinners, and boxed outputs for a premium terminal experience.
  • Smart Filtering: Automatically skips large files, binary data, and common build directories (node_modules, .next, etc.) to keep context relevant and within token limits.

🏗 Architecture Overview

The project follows a modular architecture to ensure clean separation of concerns and ease of maintenance.

Directory Structure

get-response-lite/
├── index.js                # Main entry point & CLI router
├── package.json            # Project manifest & dependencies
├── src/
│   ├── ai.js               # Google Generative AI integration & generation cores
│   ├── chat.js             # Interactive chat mode implementation
│   ├── config.js           # Centralized configuration
│   ├── terminal.js         # Command generation & execution logic
│   ├── ui/
│   │   └── help.js         # stylized help message UI
│   └── utils/
│       ├── context.js      # File & Directory reading with smart skipping
│       ├── formatter.js    # Markdown-to-Chalk text styling
│       └── system.js       # OS detection & update checks

Module breakdown

  • index.js: The traffic controller. It parses CLI arguments and routes them to the appropriate module (Chat, Terminal, or Simple Ask).
  • src/ai.js: Handles the direct communication with the @google/generative-ai SDK. It initializes the model and manages the prompt-response cycle.
  • src/utils/context.js: Contains the logic for recursively reading directories and files. It includes a "smart skip" mechanism to avoid reading huge binary files or dependency folders that would clutter the AI's context.
  • src/terminal.js: A unique module that translates natural language into shell commands. It includes a safety-first execution loop that asks for user permission before running any generated command.
  • src/utils/formatter.js: A custom text parser that converts standard Markdown (like code blocks and bold text) into chalk-styled terminal output, making the AI's response highly readable.

📦 Installation

To use Get Response Lite, ensure you have Node.js installed. Install it globally via npm:

npm i get-response-lite -g

🛠 Usage & Examples

Basic Question

npx ai "How does asymmetric encryption work?"

With File Context

npx ai "Optimize this function" -f ./src/utils/formatter.js

With Directory Context

npx ai "Explain the architecture of this project" -d ./src

Interactive Chat Mode

npx ai -c

Note: You can combine -c with -f or -d to start a chat session with pre-loaded context.

Terminal Automation

npx ai "Find all .js files and count the lines of code" -t

⚙ How It Works (The Logic Flow)

  1. Initialization: On startup, the tool checks for updates using latest-version and initializes the Google Generative AI model using a base64-secured API key.
  2. Context Gathering: If -f or -d is used, the system reads the targeted files, strips out irrelevant data (using isSkippable), and bundles the content into a context block.
  3. Prompting: The user's question is combined with the gathered context and sent to the Gemini model.
  4. Formatting: The raw markdown response from the AI is passed through the textFormat utility, which applies colors, italics, and code block styling.
  5. Execution (Terminal Mode): If in terminal mode, the AI's response is parsed into individual shell commands. The tool then iterates through these commands, prompting the user for (y/n) permission before each execution.

🤝 Contributing

Contributions are welcome! If you have ideas for new features or bug fixes, feel free to:

  1. Open an issue.
  2. Submit a pull request with your improvements.

📄 License & Credits


Built with ❤️ for terminal lovers.