Observed since 21 Oct, 11:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
TUI app that enriches prompts using Groq API and project context
A TUI and CLI tool that enriches short, vague prompts into detailed, structured prompts using Groq API and your project's actual file structure and codebase.
pip install ai-magic-prompt
Or with uv:
uv tool install ai-magic-prompt
The easiest way to install the Raycast extension is using the built-in command:
# Print the script to your terminal
magic-prompt --install-raycast
# Or save it directly to your Raycast scripts folder
magic-prompt --install-raycast ~/path/to/raycast/scripts
This will generate a script that automatically uses your current magic-prompt installation.
git clone https://github.com/arterialist/magic-prompt.git
cd magic-prompt
pip install -e .
Get your Groq API key from console.groq.com/keys.
Set it as an environment variable:
export GROQ_API_KEY=gsk_...
Magic Prompt saves your preferences in ~/.config/magic-prompt/config.json. You can configure these via the CLI:
Set your preferred Groq model (default: llama-3.3-70b-versatile):
magic-prompt --model llama-3.1-8b-instant
Adjust the real-time enrichment delay in milliseconds (default: 800):
magic-prompt --debounce 500
Save your current project directory as the default:
magic-prompt --save-dir .
magic-prompt --show-config
Or create a .env file in your project directory:
GROQ_API_KEY=your_api_key_here
Run from anywhere as a shell command:
# Basic usage - enrich a prompt
magic-prompt "add user authentication"
# Pipe prompt from stdin
echo "add logging" | magic-prompt
# Specify project directory
magic-prompt -d /path/to/project "refactor the API"
# Quiet mode - only output result (good for piping)
magic-prompt -q "add tests" > enriched.md
| Option | Description |
|---|---|
-d, --directory | Project directory (default: from config or cwd) |
-t, --tui | Launch interactive TUI mode |
-q, --quiet | Only output result, no progress |
--retrieval | File retrieval mode: tfidf, heuristic, none |
--model | Groq model to use (e.g., llama-3.3-70b-versatile) |
--debounce MS | Set debounce time for real-time mode |
--save-dir DIR | Save default directory for future runs |
--show-config | Show current configuration |
magic-prompt --tui
# OR just run without arguments:
magic-prompt
Ctrl+Y to copy the enriched prompt| Key | Action |
|---|---|
Enter | Submit prompt |
Ctrl+T | Toggle real-time |
Ctrl+Y | Copy to clipboard |
Ctrl+U | Clear Input |
Ctrl+L | Clear Output |
Ctrl+R | Cycle retrieval mode |
F5 | Rescan project |
Ctrl+S | Open Settings |
Ctrl+M | Cycle enrichment mode |
Ctrl+W | Manage workspaces |
Ctrl+D | Cycle through workspaces |
Ctrl+Q | Quit |
Magic Prompt uses intelligent file retrieval to select the most relevant files from your project context before sending to the LLM. This is especially important for monorepos and large projects where including all files would exceed context limits.
| Mode | Description | Best For |
|---|---|---|
tfidf | Hybrid TF-IDF + heuristic scoring (default) | Large projects, balanced accuracy |
heuristic | Path and content-based structural matching | Monorepos, explicit file targeting |
none | Include all files without filtering | Small projects (<50 files) |
CLI (one-time):
magic-prompt --retrieval heuristic "add user auth"
Config (persistent):
# In TUI: Press Ctrl+R to cycle through modes
# Or edit ~/.config/magic-prompt/config.json:
{
"retrieval_mode": "tfidf"
}
TF-IDF Mode (Hybrid):
[95% relevant])Heuristic Mode:
None Mode:
max_files limit| Scenario | Recommended Mode | Reason |
|---|---|---|
| Monorepo with multiple projects | heuristic | Best at isolating the correct subproject |
| Large single project | tfidf | Balanced keyword + structural matching |
| Small project (<50 files) | none | Full context fits, no filtering needed |
| Targeting specific files by path | heuristic | Highest weight on path segments |
| General feature requests | tfidf | Good at keyword relevance |
{
"retrieval_mode": "tfidf", // "tfidf" | "heuristic" | "none"
"top_k_files": 20, // Max files to include in context
"max_files": 5000, // Max files to scan (increase for monorepos)
"max_depth": 8 // Directory traversal depth
}
GNU General Public License v3.0 - see LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.5.1 | 25 Jan 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:13 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:07301318f68c85997a238f331ff3b8679112250b2fd2255a9b7de6ddd3b88717