mirror of
https://github.com/nanogpt-community/fish-nanogpt.git
synced 2026-09-21 12:04:15 -04:00
No description
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| fish-nanogpt.fish | ||
| README.md | ||
fish-nanogpt
A Fish shell plugin that uses NanoGPT to interpret natural language commands and execute them.
Demo
# go into the opencode directory and run bun install
Thinking...
Interpreting: go into the opencode directory and run bun install
Command: cd opencode && bun install
[y]es / [n]o / [e]dit > y
Executing...
Features
- Natural language commands - Prefix with
#to use AI - Rich context awareness - The LLM knows:
- Current working directory and files
- Git branch and uncommitted changes
- OS/platform (Linux distro, macOS, etc.)
- Project type (Node.js, Python, Rust, Go, Ruby, etc.)
- Your recent command history
- Edit mode - Press
eto edit the command before running - Safety warnings - Alerts on dangerous commands like
rm -rf - Command history - Saves the actual command, not the prompt
Installation
Manual
- Copy the script to
conf.d(or source it inconfig.fish):
cp fish-nanogpt.fish ~/.config/fish/conf.d/
Fisher
fisher install nanogpt-community/fish-nanogpt
Configuration
Config file: ~/.config/fish-nanogpt/config
api_key=your-api-key-here
model=zai-org/glm-4.7
confirm=true
timeout=30
| Option | Default | Description |
|---|---|---|
api_key |
(required) | Your NanoGPT API key |
model |
zai-org/glm-4.7 |
LLM model to use |
confirm |
true |
Prompt before executing |
timeout |
30 |
API timeout in seconds |
Usage
Type # followed by your request and press Enter.
# list all files modified today
# find large files over 100MB
# switch to main branch and pull
# compress all images in photos/
Requirements
curljq(optional, for better JSON parsing)fish>= 3.0
License
MIT