New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ai-quickref

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai-quickref

AI-powered Cheat Sheet CLI Tool using Groq LLM

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

📘 AI-Cheat – AI Powered Developer Cheat Sheets in Terminal

A Command Line Interface (CLI) tool that generates concise cheat sheets (React, Python, JavaScript, etc.) using Groq LLM API. No more Googling → just run a command and get an instant cheat sheet inside your terminal. 🚀

✨ Features

  • 🖥️ Run in terminal with ai-cheat <topic> (e.g., ai-cheat react hooks)
  • ⚡ Uses Groq LLM API for instant AI responses
  • 🎯 Supports Zero-shot, One-shot, Multi-shot, Dynamic prompting
  • 🔑 Configurable via .env (API key, model, temperature)
  • 📊 Logs token usage after each response
  • 🎨 Adjustable creativity (temperature) via CLI flag
  • 📚 Built to demonstrate 8 AI Prompting Concepts

📂 Project Structure

|-- .env                 # Store your Groq API key here
|-- package.json          # Project dependencies & scripts
|-- package-lock.json
|-- bin
|   |-- ai-cheat.js       # CLI entry file (runs the tool)
|-- src
|   |-- config.js         # Loads environment variables, API config
|   |-- generator.js      # Core cheat sheet generator (API call)
|   |-- prompts.js        # Stores system + example prompts
|   |-- utils.js          # Helpers (token count, formatting, args)

🔑 Setup

  • Clone repo

    git clone https://github.com/kalviumcommunity/AI-CLI-CheatSheet
    cd AI-CLI-CheatSheet
    
  • Install dependencies

    npm install
    
  • Add .env file

    GROQ_API_KEY=your_api_key_here
    MODEL=llama-3.1-70b-versatile
    
  • Link CLI globally

    npm link
    
  • Run it

    ai-cheat react hooks
    

🧪 Usage Examples

1. Generate React Hooks cheat sheet

ai-cheat react hooks

2. Python list comprehensions

ai-cheat python list comprehensions

3. With creativity (temperature)

ai-cheat javascript promises --temp 0.8

4. View tokens used

ai-cheat express middleware
# Output includes "Tokens used: 234"

🧠 8 AI Prompting Concepts Covered

This project demonstrates 8 important prompting concepts for GenAI:

  • Project README + Explanation → Documentation & video demo
  • System + User Prompt (RTFC) → Role, Task, Format, Constraints framework
  • Zero-Shot Prompting → No examples, just direct query
  • One-Shot Prompting → With one sample cheat sheet
  • Multi-Shot Prompting → With 2–3 sample cheat sheets
  • Dynamic Prompting → User topic auto-inserted in prompt
  • Tokens & Tokenization → Log tokens used per query
  • Temperature → Control creativity of responses

📜 License

MIT License © 2025

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts