Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

Aider + Gonka AI - pair programming with AI

Aider is one of the best terminal AI coding assistants. It works with Git, understands project structure, creates commits, and edits multiple files simultaneously. It's not just a chat with AI — it's full-fledged pair programming where the AI partner reads your code, suggests changes, and applies them.

Aider supports OpenAI-compatible APIs out of the box. Connecting to JoinGonka Gateway takes 2 environment variables and 30 seconds of setup. After that — unlimited pair programming for $0.0069/1M tokens.

Step 1: Install Aider and get key

Installing Aider:

# pip
pip install aider-chat

# pipx (recommended)
pipx install aider-chat

# Homebrew (macOS)
brew install aider

API key: sign up at gate.joingonka.ai/register, get 3M free tokens, create a jg-xxx key.

Step 2: Configure Aider

The easiest way to get a ready-made config block is with the JoinGonka installer:

npx @joingonka/setup --tool aider

The installer will ask for your jg-… key and print a block for .aider.conf.yml (address, key, model), plus an optional .aider.model.metadata.json with the model's real limits so Aider won't warn about an unknown context window. It doesn't write the files — paste the block yourself; the installer will verify the key and model with a live request to the gateway. Below is the same path, step by step.

Set up manually (plan B)

Option 1: environment variables (the simplest):

export OPENAI_API_BASE=https://gate.joingonka.ai/v1
export OPENAI_API_KEY=jg-your-key

Run:

aider --model openai/MiniMaxAI/MiniMax-M2.7

Option 2: a per-project file .aider.conf.yml in the project root — the most native path: endpoint, key and model in one file, without touching global environment variables (a global OPENAI_* would hijack your other OpenAI-compatible tools):

# .aider.conf.yml
openai-api-base: https://gate.joingonka.ai/v1
openai-api-key: jg-your-key
model: openai/MiniMaxAI/MiniMax-M2.7

Optionally — fine-tune the model's behavior in a separate .aider.model.settings.yml (it sets ONLY model parameters, not the endpoint or the key):

# .aider.model.settings.yml
- name: openai/MiniMaxAI/MiniMax-M2.7
  edit_format: diff
  use_repo_map: true
  extra_params:
    max_tokens: 8192  # Gateway output cap

Option 3: a shell alias for convenience:

alias gonka-aider='OPENAI_API_BASE=https://gate.joingonka.ai/v1 OPENAI_API_KEY=jg-your-key aider --model openai/MiniMaxAI/MiniMax-M2.7'

Check: go to a Git repository and run gonka-aider. Aider will show model info and offer to add files to the context. Ask it to make a change to a file — if Aider creates a commit, everything works.

Aider + Gonka capabilities

Aider is not just a chat. It is a full-fledged AI-powered pair programming tool:

  • Git integration: Aider automatically creates commits for every change. It's easy to rollback any AI decision via git undo.
  • Project context: Aider builds a repository map (repo map) — it understands dependencies between files, imports, and project structure. The model receives full context.
  • Multi-file edits: can modify 5-10 files simultaneously to implement a feature. Each file is a separate diff, each edit is tracked.
  • Voice input: --voice support — dictate tasks instead of typing.
  • Linting and tests: integration with linters and test frameworks — Aider sees errors and fixes them automatically.

With Gonka, all this costs pennies. A typical pair programming session (2-4 hours) consumes 10-30M tokens — that's $0.01-0.03 via JoinGonka Gateway. With OpenAI, it's $50-200 for the same session.

Alternative terminal tools: Claude Code, OpenCode.

Model parameters: MiniMax M2.7 context window is 200K tokens, DeepSeek V4 Flash is 380K; max response length via Gateway is 8192 tokens for MiniMax M2.7 and GLM-5.3 Flash, and 32768 for DeepSeek V4 Flash. For most pair programming tasks, this is sufficient.

Aider + Gonka = professional AI-powered pair programming for pennies. Git integration, multi-file edits, project context — all for $0.01-0.03/session instead of $50-200 at OpenAI.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →