No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-01-06 12:58:54 -05:00
fish-nanogpt.fish init 2026-01-06 12:58:54 -05:00
README.md init 2026-01-06 12:58:54 -05:00

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 e to 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

  1. Copy the script to conf.d (or source it in config.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

  • curl
  • jq (optional, for better JSON parsing)
  • fish >= 3.0

License

MIT