Back to resourcesResources · command-line tool

Your AI subscriptions, routed with data.

ia-router sends each task to the model that performs best at that kind of work (Claude, Codex or Gemini) based on objective metrics from Arena and Artificial Analysis, not on the hunch of the day. It runs on the official CLIs and your own subscriptions.

Terminal with the ia-router header: logo, date of the Arena and Artificial Analysis metrics, the three available models and the input box
The header shows where the metrics that drive the routing come from, which models you have available and the box where you type or drag files.
The problem

You pay for three subscriptions. Which one do you send each task to?

You choose by eye

Every week a new model is “the best”. Without a common criterion, you decide out of habit.

One quota runs out and the others go unused

You always use the same model until the rate limit, while the other two are left untouched.

Rankings move, your setup does not

What was true a month ago may not be true today, and nobody tells you what changed.

How it works

One score per model and per kind of task, with published data.

  1. 01

    It classifies the task

    Code, debugging, writing, analysis, math, long context, images… by rules, spending no quota.

  2. 02

    It scores each model

    Accuracy (Arena Elo per category, with a margin of error), speed (tokens per second) and cost (price per million tokens), relative to your models.

  3. 03

    It runs in your official CLI

    If there is a rate limit or a missing login, it tries the next one. Each answer shows the exact model and the tokens it used.

Terminal with a task and the routing table: score per model, detected categories and chosen model
A real task: how it classifies it and what score each model gets.
Terminal with the /scores command: table of scores per category and model with accuracy, speed and cost
/scores: what the router picks in each category. With a category it shows the breakdown and the sources.

Everything is explainable: every number has its source in plain sight, and when you update the metrics you see what changed in the routing.

Use cases

For anyone who uses several AIs every day.

Daily development with several subscriptions

Code goes to the most accurate model according to Arena and the coding benchmarks; quick tasks go to the fastest one. You stop deciding out of habit.

Looking after your quota

For repetitive tasks you prioritize cost. The router spreads the work so the same model does not always run out while the others sit idle.

Analyzing files

You drag code, images or PDFs onto the terminal. Text is appended as context; images and PDFs go only to the models that can open them.

Long documents

For long context it looks at specific metrics (long-context reasoning and Arena long queries), not the overall average.

Connecting your apps (Gmail, Calendar…)

You register MCP servers once and any model uses them: summarize today’s emails, book a block on your calendar, query your CRM.

Delegating from Claude Code

It registers as an MCP server: Claude Code can ask the router to send a subtask to the model that fits best.

Teams evaluating models

An objective, reproducible criterion with cited sources to decide which model to use, instead of opinions.

You set the criterion

For code, do you prioritize accuracy, speed or cost?

Five multiple-choice questions, one per kind of task. With your answers the routing is rebuilt instantly, with nothing to configure by hand. If you prefer not to answer, sensible defaults apply.

  • Speed and cost are offered only when there is data for all your models: scales are never mixed.
  • Differences within the margin of error reward nobody.
Terminal with the question “For code and debugging, what do you prioritize?” and four options: accuracy, balanced, speed and cost
The priorities selector: arrows and Enter.
New in 0.4 · Connectors

Let any model use your other apps.

You register MCP servers once (Gmail, Calendar, Drive, Slack, GitHub, your CRM…) and the router hands them to claude, codex and agy through a single proxy. One place for permissions, audit and credentials, with whichever model.

  • The router never touches OAuth tokens: each MCP server does its own login. Keys can be ${NAME} references to your environment.
  • They can read and write: hide tools with allow/deny lists or turn them off with /connectors off.
  • Every call is recorded in a local log, without arguments or results.
  1. 1 · Register a server
    ia-router connectors add files -- npx -y @modelcontextprotocol/server-filesystem ~/Documents

    Use the MCP server of the app you want; its documentation explains how to log in.

  2. 2 · Test it without spending quota
    ia-router connectors test
  3. 3 · Use it from the chat
    ia-router

    With connectors registered, every task uses them; /connectors off turns them off. For agy, once: ia-router connectors install agy.

Terminal registering two official MCP servers (filesystem and memory), testing them with connectors test and listing them
Real output: two official MCP servers are registered, tested without spending quota and listed. Any model uses them through the same proxy.
No surprises

Designed not to take control away from you.

Your official CLIs, your login

It never touches OAuth tokens: each CLI uses its own session and its own subscription.

No “allow everything”

It never turns on flags that disable the CLIs’ permissions.

Data with sources

Arena (CC BY 4.0) and Artificial Analysis, with attribution and date on every screen.

No dependencies

Only the Python standard library (3.9 or higher). A lightweight install.

Works offline

It ships with the latest Arena snapshot; updating is optional and visible.

Open source

Public code on GitHub under Apache-2.0: use it and modify it, keeping the attribution to the author.

Install

Two ways to install it. Pick one.

Tested on macOS; it has no system dependencies, so it should also work on Linux. It requires Python 3.9 or higher. You also need at least one of the official CLIs installed and logged in (claude, codex or agy): the router does not install them for you.

  • Option A · Homebrew: the simplest on macOS; it installs Python if needed.
  • Option B · pip or pipx: for any system with Python. pipx installs it isolated.
  1. 1 · Install

    Option A · Homebrew

    Homebrewbrew install Mgobeaalcoba/tap/ia-router

    Option B · pipx (or pip)

    pipxpipx install ia-router
    pippython3 -m pip install --user ia-router

    Do not have pipx? brew install pipx && pipx ensurepath on macOS, or python3 -m pip install --user pipx on other systems.

  2. 2 · Verify
    ia-router --version
    ia-router doctor

    doctor shows which CLIs you have installed and which model each one uses, spending no quota. If it says command not found, run pipx ensurepath and open a new terminal.

  3. 3 · Open it
    ia-router

    The first time it checks which CLIs you have installed and gives you the exact step for any that are missing; then, before spending anything, it detects which model each one uses and, if the metrics are old, offers to update them.

  4. 4 · (Optional) Add speed and cost

    Create a free key at artificialanalysis.ai and save it in a .env file:

    mkdir -p ~/.ia-router && echo 'ARTIFICIAL_ANALYSIS_API_KEY=your_key' > ~/.ia-router/.env
    ia-router metrics refresh
  5. Update and uninstall

    Homebrew: brew upgrade ia-router · brew uninstall ia-router
    pipx: pipx upgrade ia-router · pipx uninstall ia-router
    pip: python3 -m pip install -U ia-router · python3 -m pip uninstall ia-router

    Uninstalling does not delete your data (~/.ia-router).

In all honesty

What is worth knowing.

  • Arena measures human preference, not whether the answer is correct. That is why it is complemented with correct-answer benchmarks when there is a key.
  • With frontier models, accuracy usually ties within the margin of error. Speed and cost break the tie.
  • Cost is the list price per token: a proxy for quota consumption, not your real subscription quota.
  • It measures models, not your CLI. Each CLI may run at a different effort level than the ranking’s; it is marked as approximate.
Questions

What people usually ask.

Does it cost anything?

No. ia-router is free, open-source software (Apache-2.0). You use your own Claude, Codex and Antigravity subscriptions; the router adds no cost.

Do my prompts go through any of your servers?

No. Each task runs in the official CLI you are already logged into. The router only reads public Arena pages and, if you turn on the free key, queries the Artificial Analysis API. The local log does not store your prompts.

Should I install it with Homebrew or pip?

If you use macOS with Homebrew, option A (brew install Mgobeaalcoba/tap/ia-router) is the simplest. In any other case, pipx install ia-router. Both install the same program and are updated and uninstalled independently.

Which models does it support?

The three official CLIs: claude (Claude Code), codex (OpenAI Codex) and agy (Antigravity, from Google). One installed is enough, although it splits work better with several. Others can be added by editing a configuration file.

How reliable are the metrics?

Accuracy comes from Arena (human preference in blind comparisons, with style control and a margin of error) and, with a key, from correct-answer benchmarks by Artificial Analysis. Differences that fall within the margin of error reward nobody, and every score shows its sources.

How are they kept up to date?

The software ships with the latest Arena snapshot, so it works offline. On startup, if the metrics are more than 7 days old, it offers to update them and shows you every step and what changed in the routing. Nothing is queried unless you ask.

What if I do not have all three CLIs installed?

It works with just one, although everything will go to that model. The first time you open the chat, if a CLI is missing or you are not logged in, it shows a table and the exact step for each one (install and log in). You can repeat it any time with /setup or ia-router setup, and optionally check the logins (one minimal query per CLI, always asking first). The router installs nothing and never logs in for you.

What are connectors, and is it safe to give it access to my email?

Connectors are MCP servers (Gmail, Calendar, Slack, GitHub…) that the router hands to any model. Each server does its own login: the router never touches your tokens. By default they can read and write, so a model could send an email if you ask it to; you can hide tools with allow/deny lists or turn them off with /connectors off. Every call is recorded in a local log without arguments or results.

Is it in English or Spanish?

The interface and the documentation of the program are in English. The task classifier understands tasks written in English and in Spanish.

Try it

Stop choosing by eye.

Install it, open it and see what it picks for each kind of task and why. If you want this criterion for your team, let’s talk.