Back

project

MiraCLI

A terminal REPL for ChatGPT — no API key required.

Runs on Windows macOS Linux
TypeScript Node.js Playwright Chromium

MiraCLI lets you talk to ChatGPT from your terminal without an API key or a paid developer account. Instead of the OpenAI API, it drives a real Chromium browser session behind the scenes — your normal ChatGPT login, your conversation history, your usage tier.

The assistant is named Mira. A built-in instruction preamble sets her up on first message, but you can layer your own instructions on top via a plain text file. Think of it as a persistent AI co-pilot that lives in your shell rather than a browser tab.

Responses stream in real time by polling the page DOM, so you see each token as it arrives just like you would in the browser. On /quit, Mira archives the thread and prints a --chat-url flag you can use to pick up the conversation later — or hand it to a different tool entirely.

macOS and Linux installs work, though Windows is the primary development target and gets the smoothest experience.

No API key

Uses your existing ChatGPT login via a persistent Playwright browser profile — no OpenAI developer account or credit card needed.

Live streaming

Responses stream token-by-token as Mira types them — no waiting for the full reply before it appears in your terminal.

Custom instructions

Drop your own text into ~/.mira/instructions.txt and it gets layered on top of Mira's preamble on every new chat.

Thread resumption

On exit, Mira prints a --chat-url command to resume the exact conversation later — even days or weeks after.

REPL commands

Built-in slash commands — /new to start fresh, /name to title the thread, /instructions to edit your config, and more.

Hidden browser

Chromium runs out of sight by default — no browser window cluttering your taskbar. Pass --show-window if you want to watch along.

/help List available commands /new Start a new conversation thread /name <title> Set the title of the current thread /instructionsOpen your instructions.txt in your default editor /clear Clear the terminal screen /show Bring the hidden browser window into view /whoami Show the logged-in ChatGPT account /quit Archive the thread and exit (prints resume command)

Requires Node.js 20+. The one-liner installer handles everything else — cloning, dependencies, Chromium, and adding mira to your PATH.

Windows (PowerShell)
irm https://raw.githubusercontent.com/KiwiGeek/mira-cli/master/scripts/install.ps1 | iex
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/KiwiGeek/mira-cli/master/scripts/install.sh | bash

After install, run mira login once to save your ChatGPT session, then just type mira to start.