ai-quickref
v1.0.3
Published
AI-powered Cheat Sheet CLI Tool using Groq LLM
Downloads
17
Readme
📘 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-CheatSheetInstall dependencies
npm installAdd
.envfileGROQ_API_KEY=your_api_key_here MODEL=llama-3.1-70b-versatileLink CLI globally
npm linkRun it
ai-cheat react hooks
🧪 Usage Examples
1. Generate React Hooks cheat sheet
ai-cheat react hooks2. Python list comprehensions
ai-cheat python list comprehensions3. With creativity (temperature)
ai-cheat javascript promises --temp 0.84. 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
