Skip to content

Instantly share code, notes, and snippets.

@angelsen
Created May 8, 2025 09:44
Show Gist options
  • Select an option

  • Save angelsen/21817c957a226e98e61af91a0073bd49 to your computer and use it in GitHub Desktop.

Select an option

Save angelsen/21817c957a226e98e61af91a0073bd49 to your computer and use it in GitHub Desktop.
Quick setup guide for fish-ai shell assistant using GitHub's free LLM API - no credit card needed

Quick Setup for fish-ai with Free GitHub API

Step 1: Install fish-ai

# Install fisher (Arch Linux)
sudo pacman -S fisher    # or yay -S fisher

# Install fish-ai
fisher install realiserad/fish-ai

Step 2: Get a GitHub Personal Access Token

  1. Go to: https://github.com/settings/tokens
  2. Click "Generate new token" → "Fine-grained tokens"
  3. Name the token and set expiration
  4. No specific permissions needed
  5. Generate and copy your token

Step 3: Create configuration file

Create ~/.config/fish-ai.ini with:

[fish-ai]
configuration = github

[github]
provider = self-hosted
server = https://models.inference.ai.azure.com
api_key = YOUR_GITHUB_PAT_HERE
model = gpt-4o-mini

Step 4: Use fish-ai

  • Ctrl+P: Transform comments to commands (and vice versa)
  • Ctrl+Space: AI autocompletion
  • Ctrl+Space after error: Suggest fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment