Skip to content

BNLNPPS/terminal-ai-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ› ๏ธ Terminal AI Toolkit

Supercharge your terminal with AI-powered tools and scripts

Awesome Scripts


๐Ÿ“‘ Table of Contents


๐ŸŒŸ Overview

This repository is your comprehensive guide to getting the most out of AI tools in your terminal. It contains curated scripts, expert tips, and detailed guides for terminal-based AI development.

๐Ÿ’ก Pro Tip: This is a companion to the awesome-terminals-ai listโ€”your one-stop resource for terminal AI tools!


๐Ÿ“œ Scripts

Useful scripts to enhance your AI terminal workflow:

Script Description Guide
๐Ÿ“Š copilot-usage.sh Check your GitHub Copilot usage and quota Copilot CLI Guide
๐Ÿค– run-claude-copilot.sh Run Claude Code with GitHub Copilot models See below โฌ‡๏ธ

๐Ÿ†“ Free API Providers

๐Ÿ’Ž Gemini API

Access powerful Google Gemini models with generous free tier limits:

Feature Gemini 2.5 Pro (Free) Gemini 2.5 Flash (Free)
โšก Rate Limit 2 requests/minute 15 requests/minute
๐Ÿ“… Daily Limit 50 requests/day 1,500 requests/day

๐Ÿ™ GitHub Models

GitHub provides two types of AI model access for developers:

  • ๐Ÿค– GitHub Copilot Models
  • ๐Ÿ›’ GitHub Market Models

๐Ÿค– GitHub Copilot Models

Overview:

Premium request limits (per month):

Feature GitHub Copilot Free GitHub Copilot Pro GitHub Copilot Pro+
Premium requests 0 per month 300 per month 1,500 per month

โ„น๏ธ Exact limits and availability may change over timeโ€”always confirm via the official docs above.

Model multipliers:

  • ๐Ÿ“– Model Multipliers Documentation
  • Models (accessible via API) with a 0ร— multiplier for non-free plans (not counted toward premium usage): gpt-4.1, gpt-5-mini, gpt-4o

โš™๏ธ Note: Some models need to be enabled at GitHub Copilot Features Settings before they become available for use.

โš ๏ธ Integration Note: The endpoint https://api.githubcopilot.com supports OpenAI-compatible interface with GitHub OAuth Access Token (prefixed in gho_). However, the open-source proxy ๐ŸŒ‰ Copilot API Bridge, authenticated with GitHub User Access Token (prefixed in ghu_), provides both OpenAI and Anthropic compatible interfaces.

List available models:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer ${OAUTH_TOKEN}" \
  https://api.githubcopilot.com/models | jq -r '.data[].id'

๐Ÿ›’ GitHub Market Models

Overview:

  • ๐ŸŒ Endpoint: https://models.github.ai/inference
  • ๐Ÿ” Browse: GitHub Marketplace Models
  • ๐Ÿ“Š Rate Limits: 4k input tokens, 4k output tokens per request

List available models:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer ${OAUTH_TOKEN}" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://models.github.ai/catalog/models | jq -r '.[].id'

๐Ÿ”€ OpenRouter

OpenRouter provides unified API access to multiple AI modelsโ€”try different models using one API to find your best fit!

๐Ÿ” Browse Free Models

๐Ÿ†“ Free Models Available

Model Link
GPT OSS 20B Try it
GPT OSS 120B Try it
GLM 4.5 Air Try it
Qwen3 Next 80B A3B Instruct Try it
Nemotron 3 Super Try it
MiniMax M2.5 Try it
Gemma 4 26B A4B Try it

Setup: ๐Ÿ”‘ Generate API Key

๐Ÿ’ก Rate Limits:

  • With 10+ credits purchased: 1,000 requests/day
  • Otherwise: 50 requests/day

โšก Groq

Groq offers high-speed inference with free tier access.

๐Ÿ†“ Free Models

Available models from Rate Limits documentation:

  • openai/gpt-oss-120b
  • openai/gpt-oss-20b
  • qwen/qwen3-32b
  • moonshotai/kimi-k2-instruct-0905

Setup: ๐Ÿ”‘ Generate API Key

๐Ÿš€ NVIDIA Build

NVIDIA Build provides free API access to a wide selection of AI models optimized on NVIDIA infrastructure.

๐Ÿ†“ Example Models Available

Model Full Model Name Link
Qwen3.5 397B-A17B qwen/qwen3.5-397b-a17b Try it
MiniMax M2.5 minimaxai/minimax-m2.5 Try it
Kimi K2.5 moonshotai/kimi-k2.5 Try it
GLM-5 z-ai/glm5 Try it
GPT-OSS 120B openai/gpt-oss-120b Try it
DeepSeek V3.2 deepseek-ai/deepseek-v3_2 Try it

Setup:

๐Ÿ’ก Note: Use the full model name (with namespace) when making API requests.

๐Ÿฆ™ Ollama Cloud Models

Ollama now provides cloud-hosted models via API access, offering powerful AI capabilities without the need for local infrastructure. These models are accessible through a simple API and integrate seamlessly with popular AI coding tools.

๐Ÿ’ฐ Pricing:

  • ๐Ÿ†“ Free Plan - Available with hourly and daily usage limits
  • ๐Ÿ“ˆ Pay-per-use - No upfront costs or hardware investment required

๐Ÿ†“ Available Cloud Models

๐Ÿ” Search all cloud models

Model Full Name Use Case
โšก GLM 5.1 glm-5.1 Next-gen flagship model for agentic engineering with state-of-the-art coding capabilities
๐ŸŽฏ MiniMax M2.7 minimax-m2.7 MiniMax's M2-series model for coding, agentic workflows, and professional productivity
๐Ÿ’Ž Gemma 4 gemma4 Multimodal model by Google DeepMind with advanced reasoning and coding capabilities
๐Ÿ’ป Qwen3.5 qwen3.5 Multimodal models delivering exceptional utility and performance
๐Ÿš€ Nemotron 3 Super nemotron-3-super 120B open MoE model activating 12B params for efficient multi-agent applications
๐Ÿ”ฅ GPT-OSS gpt-oss Powerful reasoning, agentic tasks, and versatile developer use cases

๐Ÿ”— Integration with AI Coding Tools

Ollama Cloud Models integrate seamlessly with popular AI coding tools and IDEs through native integrations and OpenAI-compatible APIs:

๐ŸŽฏ Supported AI Coding Tools & IDEs:

Tool Integration Type Documentation
VS Code Native Extension View Guide
JetBrains Native Plugin View Guide
Codex API Integration View Guide
Cline API Integration View Guide
Droid API Integration View Guide
Goose API Integration View Guide
Zed Native Extension View Guide

Key Benefits:

  • OpenAI-compatible API - Use existing OpenAI client libraries
  • Direct terminal integration - Run queries from command line
  • No local setup required - Access powerful models via API
  • Cost-effective - Pay-per-use without hardware investment
  • Zero local storage - Models run in the cloud

Example API Usage:

# Query via REST API
curl https://api.ollama.ai/v1/chat/completions \
  -H "Authorization: Bearer ${OLLAMA_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-coder:480b",
    "messages": [
      {"role": "user", "content": "Write a Python function to parse JSON"}
    ]
  }'

Setup:

๐Ÿ’ก Pro Tip: Most integrations support both local and cloud models. For cloud models, append -cloud to the model name in your tool's configuration.


๐Ÿ’ป Local Model Providers

๐Ÿฆ™ Ollama

Ollama - Lightweight framework for running LLMs locally via command line.

Key Features:

  • โšก Simple CLI interface
  • ๐ŸŒ RESTful API
  • ๐Ÿณ Docker-like model management
  • ๐Ÿค– Popular models: LLaMA, Gemma, DeepSeek
  • ๐Ÿ”Œ OpenAI-compatible API
  • ๐Ÿ–ฅ๏ธ Cross-platform support

โ˜๏ธ Access to Cloud Models

Ollama also provides access to cloud-hosted models via the ollama command. Simply append -cloud (or :cloud for some models) to the model name:

# Example: Run a cloud-hosted model
ollama run qwen3-coder:480b-cloud

For details, see the ๐Ÿฆ™ Ollama Cloud Models section.

๐Ÿ“Š Ollama Model Performance

Model Sizes:

Model Size
gpt-oss:120b 65 GB
gpt-oss:20b 13 GB
qwen3:8b 5.2 GB
qwen3:30b 18 GB

Performance Benchmark (tokens/second):

Machine gpt-oss:120b gpt-oss:20b qwen3:8b qwen3:30b
๐Ÿ–ฅ๏ธ Windows PC (Intel i9) - 15 t/s 12 t/s 22 t/s
๐Ÿ’ป MacBook Pro (M3 Max) - 70 t/s 57 t/s 74 t/s
๐Ÿ–ฅ๏ธ Linux Server (Dual RTX 4090) 36 t/s 156 t/s 140 t/s 163 t/s
๐Ÿ“‹ Machine Specifications
  • Windows PC (Intel i9):

    • CPU: Intel i9-12900
    • GPU: Intel UHD Graphics 770 (2 GB)
    • RAM: 64 GB
  • MacBook Pro (M3 Max):

    • Apple M3 Max with 64 GB RAM
  • Linux Server (Dual RTX 4090):

    • CPU: Xeon(R) w7-3445 (40 CPUs)
    • GPU: 2 ร— Nvidia RTX 4090
    • RAM: 128 GB

๐Ÿ–ฅ๏ธ LM Studio

LM Studio - User-friendly desktop GUI for running local LLMs with no technical setup required.

Key Features:

  • ๐Ÿ›๏ธ Model marketplace
  • ๐ŸŒ OpenAI-compatible API server
  • ๐Ÿ’ฌ Chat interface
  • ๐Ÿ“ฆ GGUF model support
  • ๐Ÿ’ฐ Free for personal & commercial use

๐Ÿ”€ API Proxies

Most AI tools support OpenAI-compatible APIs. For tools requiring Anthropic-compatible APIs, these solutions provide compatibility:

๐Ÿ”„ Claude Code Router

Claude Code Router - Routes Claude Code requests to different models with request customization.

๐Ÿ“ฆ Installation (Linux/macOS)
# Install Claude Code CLI (prerequisite)
npm install -g @anthropic-ai/claude-code

# Install Claude Code Router
npm install -g @musistudio/claude-code-router
โš™๏ธ Configuration Examples

Create ~/.claude-code-router/config.json with your preferred providers:

{
  "LOG": true,
  "API_TIMEOUT_MS": 600000,
  "Providers": [
    {
      "name": "gemini",
      "api_base_url": "https://generativelanguage.googleapis.com/v1beta/models/",
      "api_key": "$GEMINI_API_KEY",
      "models": ["gemini-2.5-flash", "gemini-2.5-pro"],
      "transformer": { "use": ["gemini"] }
    },
    {
      "name": "openrouter",
      "api_base_url": "https://openrouter.ai/api/v1/chat/completions",
      "api_key": "$OPENROUTER_API_KEY",
      "models": ["google/gemini-2.5-pro-preview", "anthropic/claude-sonnet-4"],
      "transformer": { "use": ["openrouter"] }
    },
    {
      "name": "grok",
      "api_base_url": "https://api.x.ai/v1/chat/completions",
      "api_key": "$GROK_API_KEY",
      "models": ["grok-beta"]
    },
    {
      "name": "github-copilot",
      "api_base_url": "https://api.githubcopilot.com/chat/completions",
      "api_key": "$GITHUB_TOKEN",
      "models": ["gpt-4o", "claude-3-7-sonnet", "o1-preview"]
    },
    {
      "name": "github-marketplace",
      "api_base_url": "https://models.github.ai/inference/chat/completions",
      "api_key": "$GITHUB_TOKEN",
      "models": ["openai/gpt-4o", "openai/o1-preview", "xai/grok-3"]
    },
    {
      "name": "ollama",
      "api_base_url": "http://localhost:11434/v1/chat/completions",
      "api_key": "ollama",
      "models": ["qwen3:30b", "gpt-oss:20b", "llama3.2:latest"]
    }
  ],
  "Router": {
    "default": "gemini,gemini-2.5-flash",
    "background": "ollama,qwen3:30b",
    "longContext": "openrouter,google/gemini-2.5-pro-preview"
  }
}
๐Ÿ’ป Usage Commands
# Start Claude Code with router
ccr code

# Use UI mode for configuration
ccr ui

# Restart after config changes
ccr restart

# Switch models dynamically in Claude Code
/model ollama,llama3.2:latest

โš ๏ธ Known Issue: The proxy for Ollama models does not work properly with Claude Code.

๐ŸŒ‰ Copilot API Bridge

The GitHub Copilot API (https://api.githubcopilot.com) supports OpenAI-compatible interface with GitHub OAuth Access Token (prefixed in gho_). copilotโ€‘api, an openโ€‘source proxy authenticated with GitHub User Access Token (prefixed in ghu_), provides the necessary bridge: it exposes an OpenAIโ€‘compatible interface as well as an Anthropicโ€‘compatible interface, at the endpoint https://localhost:4141.

Installation and Authentication:

# Install copilot-api globally
npm install -g copilot-api

# Device authentication
copilot-api auth

# Start the API proxy
copilot-api start

The copilot-api tool is also available in specialized environments like the modern-linuxtools Singularity image on CVMFS.

CVMFS Setup:

# Setup the environment
source /cvmfs/atlas.sdcc.bnl.gov/users/yesw/singularity/alma9-x86/modern-linuxtools/setupMe.sh

# Then use copilot-api as normal
copilot-api auth
copilot-api start
๐Ÿ’ป Usage Examples
# Use with Aider
export ANTHROPIC_BASE_URL=http://localhost:4141 && aider --no-git --anthropic-api-key dummy --model anthropic/claude-sonnet-4.5

# Or use with Claude Code CLI
export ANTHROPIC_BASE_URL=http://localhost:4141 ANTHROPIC_AUTH_TOKEN=dummy ANTHROPIC_MODEL=claude-sonnet-4.5 && claude-code

๐Ÿ“Œ Important Notes:

  • Use your own URL in ANTHROPIC_BASE_URL and remove trailing /
  • Enable X11 forwarding when SSH-ing: ssh -X username@hostname
  • All GitHub Copilot models (excluding Market models) become accessible

๐Ÿค– Automated Setup with run-claude-copilot.sh

For a streamlined experience, this script automates the entire setup process for using Claude Code with GitHub Copilot models.

โœจ Key Features:

Feature Description
๐Ÿ“ฆ Auto Dependency Management Installs nvm, npm, copilot-api, and claude-code
โšก Simplified Usage Single command to start fully configured Claude session
๐Ÿ”„ Model Selection Specify which Copilot model to use
๐Ÿ› ๏ธ Utility Functions Check usage, list models, update packages
๐Ÿ”— Transparent Args Forwards arguments directly to claude command

๐Ÿ’ป Usage Examples:

# Run Claude with default settings
./scripts/run-claude-copilot.sh

# List available Copilot models
./scripts/run-claude-copilot.sh --list-models

# Check your Copilot API usage
./scripts/run-claude-copilot.sh --check-usage

# Run Claude with a specific model and pass a prompt
./scripts/run-claude-copilot.sh --model claude-sonnet-4 -- -p "Explain quantum computing"

# Get help on the script's options
./scripts/run-claude-copilot.sh --help

# Get help on Claude's own options
./scripts/run-claude-copilot.sh -- --help

๐Ÿ“š Detailed Tool Guides

Comprehensive documentation for each AI terminal tool:

Tool Description Guide
๐Ÿค Aider AI pair programming in your terminal Read Guide
๐Ÿค– GitHub Copilot CLI Copilot coding agent directly in your terminal Read Guide
๐Ÿ’Ž Gemini CLI Google's Gemini in your terminal Read Guide
๐Ÿš€ Qwen Code Qwen 3.6 Plus models in your terminal Read Guide

๐Ÿ–ฅ๏ธ AI-Enhanced Terminals

โšก Warp Terminal

AI-first terminal that integrates intelligent agents directly into the command line.

โœจ Key Features:

Feature Description
๐Ÿ’ฌ Natural Language Commands Generate commands with # trigger
๐Ÿค– Real-time AI Autosuggestions and error detection
๐ŸŽค Voice Commands Multi-agent parallel workflows
๐Ÿข Enterprise Ready SAML SSO, BYOL, zero data retention

๐Ÿ“Š Usage Limits:

  • ๐Ÿ†“ Free tier: 150 requests/month
  • ๐Ÿ’Ž Paid plans available for higher usage

๐Ÿ“ฆ Installation:

brew install --cask warp    # macOS
winget install Warp.Warp    # Windows

# Linux - Multiple package formats available
# See: https://www.warp.dev/blog/warp-for-linux
# Packages include: .deb (apt), .rpm (yum/dnf/zypper), Snap, Flatpak, AppImage, and AUR

๐ŸŒŠ Wave Terminal

Open-source terminal that brings graphical capabilities into the command line.

โœจ Key Features:

Feature Description
๐Ÿ–ผ๏ธ Inline Previews Images, markdown, CSV, video files
๐Ÿ“ VSCode-like Editor Integrated editor for remote files
๐ŸŒ Built-in Browser Web browser and SSH connection manager
๐Ÿ“Š Custom Widgets Dashboard creation capabilities
๐Ÿ–ฅ๏ธ Cross-platform Local data storage for privacy

๐Ÿค– AI Integration:

  • โœ… Built-in AI assistance for command suggestions
  • โš™๏ธ Configurable AI models via "Add AI preset..."
  • ๐Ÿฆ™ Support for Ollama and other local models
  • ๐ŸŽฏ Context-aware recommendations

๐Ÿ“ฆ Installation:

Download from waveterm.dev/download

Available as: Snap, AppImage, .deb, .rpm, and Windows installers

๐Ÿ“Ÿ iTerm2 AI

Native AI integration for macOS's most popular terminal emulator.

โœจ Key Features:

  • ๐Ÿง  Built-in AI Chat: Interact with LLMs directly within iTerm2 windows
  • โœ๏ธ Command Composer: Describe what you want to do in English, and it generates the shell command
  • ๐Ÿ” Code Explanation: Highlight output or commands to get instant explanations
  • ๐Ÿ”‘ BYOK: Bring Your Own Key (OpenAI, Gemini, etc.) for privacy and control

๐Ÿ“ฆ Setup:

  1. Install iTerm2 (v3.5+)
  2. Install the AI plugin (Settings > General > AI > Install)
  3. Configure your provider (OpenAI, Gemini, etc.) and API key
  4. Start using the AI features:
    • Cmd + Y: The Command Generator (The AI will generate the actual shell command but will not run it yet.)
    • Cmd + Shift + Y: The AI Chat
      • Use this for multi-turn conversations.
      • If you grant permissions, this chat can read your current terminal history and error messages to provide context-aware answers.

๐Ÿงฉ TmuxAI

AI-Powered, Non-Intrusive Terminal Assistant that works wherever tmux runs.

โœจ Key Features:

  • ๐Ÿš€ Universal Compatibility: Works with any terminal emulator via tmux
  • ๐Ÿ‘ป Non-Intrusive: Runs in a separate pane or window, keeping your workflow clean
  • ๐Ÿค– Model Flexibility: Supports OpenAI and other compatible APIs
  • โŒจ๏ธ Keyboard Centric: Designed for efficiency with tmux keybindings

๐Ÿ“ฆ Installation: Prerequisite: tmux must be installed. Follow instructions at github.com/alvinunreal/tmuxai


Made with โค๏ธ by the Community

โญ Star on GitHub | ๐Ÿ› Report Issues | ๐Ÿ’ก Contribute

Supercharge your terminal workflow! ๐Ÿš€

About

A collection of guidance for terminal-based AI coding tools (Qwen Code, Aider,Copilot CLI, and Gemini CLI) and API provider integration instructions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก