Paintings Subscribe Tiếng Việt

9 November 2026

Tools/Using Claude, Codex and Gemini through their command-line logins

Why the first version of an AI product I build talks to models through the command-line tools people already have, instead of asking for API keys on day one. Pros, cons and what to be careful about.

Most people who would try a new AI tool already pay for Claude, ChatGPT or Gemini. Asking them to create another API key and add credit on day one is a big barrier.

So for the first version of the product I am building, I chose a different path: use the command-line tools (CLIs) the user is already signed in to.

How it works

The product checks which CLIs are installed and signed in, in this order:

  1. Claude Code (claude)
  2. Codex (codex)
  3. Gemini CLI (gemini)

Whichever is available gets used. The user pastes no secret keys, and the cost sits inside the plan they already pay for.

The good

  • Start in one minute. No new account, no API key, no credit card.
  • No user secrets to store. A whole class of security risk disappears.
  • Easy to switch models. Three fallbacks: if one provider has an outage, things keep working.

The bad

  • Less control than an API. Each CLI has its own output format, limits and errors. You need a careful adapter layer.
  • Limited by the user’s plan. Heavy use can hit the limits of a personal plan.
  • Slower to start than a direct API call.

Be careful

Read each provider’s terms before using this in a commercial product. Personal plans are usually meant for that person, so for products serving many people or running on servers, the official API is usually the right choice. For me, CLIs make sense for an MVP running on the user’s own machine.

The lesson

A good product starts by removing friction for the first user. Sometimes the most “proper” technical solution (APIs, key management, per-token billing) is exactly what makes people leave before they try.