$ whoami → autonomous terminal agent

Ship code. Land vulns.Pay nothing.

clai is a free, open-source AI agent that lives in your terminal. It edits files, runs shells, scans hosts, and verifies its own work — running keyless out of the box on free AI tiers and staying alive across rate limits with multi-key, multi-provider switching.

providers wired in
19
providers wired in
free tiers + local Ollama
8+
free tiers + local Ollama
keys per provider, auto-rotated
10
keys per provider, auto-rotated
API keys needed to start
0
API keys needed to start
clai — autonomous agent · zsh

❯

one command in, evidence-backed report out

Free · keylessGroqGoogle GeminiNVIDIA NIMOpenRouterBynaraKimchiHetznerOllama · localModal · Kimi K3Lightning AITokenRouterFireworksOpenAIAnthropicQwen CloudMeta MuseAgentRouterAWS MantleFree · keylessGroqGoogle GeminiNVIDIA NIMOpenRouterBynaraKimchiHetznerOllama · localModal · Kimi K3Lightning AITokenRouterFireworksOpenAIAnthropicQwen CloudMeta MuseAgentRouterAWS Mantle

$ why clai

An agent built for real work, not demos

Three ideas shape everything clai does: it costs nothing to run, it never fakes a result, and it carries work all the way to evidence.

Free by design

A fresh install runs keyless on the built-in Free provider — no signup, no API key. Stack free tiers from Groq, Gemini, NVIDIA, OpenRouter and more; when one rate-limits, clai rotates to the next key or provider automatically.

Honest by construction

Findings need real tool output. Builds get typechecked and run before "done". An honest "this failed" always beats a fabricated success — clai reports only what its tools actually showed.

Acts, doesn't narrate

clai doesn't describe what to do — it edits files, runs commands, scans hosts, keeps a durable plan, and verifies its own work. Staff-level engineer and senior red-team operator in one terminal.

$ capabilities

One agent. Two professions. Zero babysitting.

clai is a staff-level software engineer and a senior offensive-security operator in the same binary — and it acts instead of narrating.

Free by default. Actually.

A fresh install runs keyless on the built-in Free provider — no signup, no API key, no config. Eight cloud free tiers plus local Ollama are wired in, and clai stacks them so your daily driver costs nothing.

clai → already on free

Multi-key smart switching

Up to 10 keys per provider with a sticky active key and circular rotation on rate limits, auth, quota, and 5xx errors. Disable a key without deleting it, opt into cross-provider fallback, or lock everything to free-only so you never accidentally spend.

switching groq key [2/4] …ab12 (rate limited)

Bring your own endpoint

Deploy Kimi K3 or any open-weight model to your own Modal endpoint and drive it from clai on $30/month of free compute credit. Lightning AI and TokenRouter gateways work the same — up to 10 base URLs each, one command to switch.

Durable plans that survive

plan.create and task.update drive a live checklist that survives context compaction and reloads with /history. The agent works task-by-task and never fakes completion.

Persistent interactive terminals

Python REPLs, Metasploit, database consoles, and debuggers stay open across model turns. clai sends follow-up input, reads incremental output, and resizes — without losing state.

Evidence-driven honesty

Findings need real tool output. Builds get typechecked and run before "done". A fabricated success is treated as the worst possible failure — clai would rather report an honest "this failed" than claim work it didn't verify.

✻ verified: build green · tests 412 passed

A safety gate you control

Every action is classified safe, confirm, or block. Read-only work auto-runs, mutations ask first, destructive patterns are refused outright, and deletes always confirm with a preview — even under allow-all.

safe · confirm · block

$ offensive security

Scope-based pentesting, run for real

clai doesn't narrate security work — it lands it. Recon-first methodology, evidence-backed findings, and boundaries that are enforced in code, not in vibes.

  1. 01

    Authorize & scope

    One-time acknowledgment, then an explicit engagement: authorized targets, exclusions, allowed phases, rate and concurrency ceilings, and an expiry.

    $ clai scope new --targets lab.example.com --phases recon,enumeration

  2. 02

    Recon first

    Read-only discovery gathers real evidence: whois, DNS, nmap scans, HTTP fingerprints, API specs, and scoped path discovery.

    $ pentest.recon · net.scan · pentest.webDiscover

  3. 03

    Plan from evidence

    A durable pentest plan is drafted from actual ports, services, and endpoints — then it stops and waits for your approval.

    $ plan.create kind=pentest → /implement

  4. 04

    Exploit & escalate

    Task-by-task execution: enumerate, exploit, post-exploit. New attack surface expands the plan without wiping completed work.

    $ task.update in_progress → exploit → done

  5. 05

    Report with structure

    Title, severity, evidence, reproduction steps, impact, remediation — plus honest notes about what was not tested.

    $ report.md · evidence/ · residual-risk

scope enforcement is real

  • Authorized / excluded target lists enforced on every call
  • Token-bucket rate limits and a hard concurrency ceiling
  • Redirects that leave scope are detected and stopped
  • DNS-rebinding escape attempts flagged, not followed
  • Out-of-scope hosts flagged instead of touched
  • Interactive REPL effects re-checked against scope at delivery

Built for authorized pentests, bug-bounty programs, red teams, and CTFs. Full capability, professional restraint.

$ free-tier economics

Assemble capacity from free tiers. Stay up through every rate limit.

19 providers wired in. Stack keys, rotate on failure, fall back across providers — or lock clai to free-only so it never spends a cent.

Free (keyless)

keyless

Zero setup. No account, no key — the default out of the box.

Groq

free

Fast open-model inference with a generous free tier.

Google Gemini

free

Google's models on a free API allowance.

NVIDIA NIM

free

Open models served free through NVIDIA's catalog.

OpenRouter

free

One key, hundreds of models — free variants included.

Hetzner

free

EU open-weight inference — free while experimental.

Bynara · Kimchi

free

Rotating free catalogs, stacked like every other tier.

Ollama

local

Fully local and offline. Your hardware, zero cost.

beyond free

Modal. Run Kimi K3 on your own endpoint — $30/month of free compute credit.

Lightning AI. One key across OpenAI, Anthropic, Google — 40M free tokens to start.

TokenRouter. Frontier open models with real 1M-token context windows.

OpenAI · Anthropic · Fireworks · Qwen. Paid frontier providers join the same rotation when you flip freeOnly off.

Sticky rotation

The last key that worked stays active. On 429, auth, quota, or 5xx, clai rotates circularly to the next key — instantly for auth and quota, after a short backoff for rate limits.

Cross-provider fallback

Opt in with /fallback on and clai tries your other configured providers after the active one is exhausted. One quiet status line tells you exactly what switched and why.

Free-only lock

/freeonly on excludes paid-cloud providers from the fallback chain entirely. Keys are always masked to the last four characters, everywhere they appear.

$ three modes

Read-only, full throttle, or design-first — shift between them mid-thought

Cycle modes with Shift+Tab, a slash command, or a CLI flag. Reasoning effort dials from off to xhigh, and clai only sends it to models that support it.

ask

Ask

Answers, methodology, and read-only tools. No mutations, no attacks — the safe default for research and questions.

agent

Agent

Full execution: edits files, installs packages, scans hosts, runs builds and tests, works the plan, verifies before claiming success.

plan

Plan

Deep research, then one durable roadmap. Nothing executes until you approve with /implement — and completed work is never wiped.

$ clai --mode agent "add a /health endpoint to the Express app and run the tests"

$ clai "explain what this repo does and find the entrypoint"

stdout gets the final answer · stderr gets progress, diffs, and tool cards — pipe-friendly by design

$ install

One command away from a keyless agent

Fresh installs run on the built-in Free provider — no account, no API key, no config. Add free-tier keys later and clai stacks them into one uninterrupted session. Requires Node.js 22 or newer.

Homebrew

$ brew tap pentoshi007/clai && brew install clai

Script

$ curl -fsSL https://downloads.clai.aniketpandey.website/install/install.sh | sh

$ clai

Launch the full-screen agent console — already on the free provider.

$ clai "…"

One-shot from the shell. Answer on stdout, progress on stderr, clean exit codes.

clai set groq <key>

Add any free-tier key. Add ten. clai rotates through them on rate limits.

$ use-cases

One agent, real work

clai is built for the jobs that need more than chat: executing, verifying, and proving the result. These are the prompts people actually run.

[build]

Ship the feature

Explores the repo, matches your stack from lockfiles, edits surgically, then typechecks, builds, and runs tests before claiming anything. Dev servers start as background jobs and get probed before "done".

$ clai --mode agent "add a /health endpoint to the Express app and run the tests"

[pentest]

Run an authorized pentest

Recon-first: whois, DNS, nmap, HTTP evidence. Then a durable plan you approve, task-by-task exploitation, and a structured report — severity, evidence, reproduction, remediation, honest residual risk.

$ clai scope new --targets lab.example.com --phases recon,enumeration

[bounty]

Work a bug bounty program

Scope enforcement keeps you inside the program's rules: authorized and excluded targets, rate and concurrency ceilings, redirect and DNS-rebinding escape detection, out-of-scope flagging instead of touching.

$ clai authorize-pentest AGREE

[debug]

Kill the flaky test

Reproduce, read the actual error, localize to file and line, form one hypothesis, fix the root cause, re-run the original failing check. Diagnosed-but-not-fixed is not a finished state.

$ clai --mode agent "this test is flaky — find the race and fix it"

[migrate]

Migrate the stack

Multi-phase work gets a durable plan that survives context compaction. Completed tasks stay completed; new surface gets appended, never restarted.

$ clai --mode agent "convert this Vite React app to Next.js App Router, keep all features"

[ops]

Triage, harden, investigate

Log triage, config hardening, OSINT with pluggable web search, OCR of screenshots, PDF reports, interactive REPLs kept open across turns — the same agent, the same safety gate.

$ clai "triage these logs and tell me what changed before the outage"

$ faq

Questions, answered

The things people ask before they type clai for the first time.

Is clai really free to run?+

Yes. A fresh install runs keyless on the built-in Free provider — no account, no API key, no config. Beyond that, clai wires in eight cloud free tiers (Groq, Google Gemini, NVIDIA NIM, OpenRouter, Bynara, Kimchi, Hetzner, and the keyless gateways) plus local Ollama. Add several keys per provider and clai rotates through them when one hits a rate limit, so free capacity stacks into one uninterrupted session. Paid providers are optional.

Do I need an API key to get started?+

No. The default provider is a keyless gateway — requests go out with no authorization header. If you want more capacity, run clai set <provider> <key> with any free-tier key; add up to ten per provider and they rotate automatically.

What makes clai different from other AI coding agents?+

Three things. It is free-tier first: multi-key rotation and cross-provider fallback keep it alive across rate limits instead of stopping. It is honest: findings need real tool output, builds get typechecked and run before "done", and it never claims success without evidence. And it is terminal-native: a full-screen console with durable plans, background jobs, and persistent interactive terminals.

Can it really pentest?+

clai runs real, authorized security work: recon (whois, DNS, nmap, HTTP evidence), fingerprinting, scoped enumeration, exploitation, and structured reporting. Scope enforcement is real — authorized and excluded target lists, allowed phases, rate and concurrency ceilings, redirect and DNS-rebinding escape detection, and out-of-scope flagging. You authorize once and define the boundaries; clai stays inside them.

Is it safe to let an agent run shell commands?+

Every action passes a safety gate you control. Read-only work auto-runs; mutations ask first; destructive patterns are refused outright. Deletes always confirm with a preview, even under allow-all. You set the default confirmation level and per-session tool allow-lists.

How does multi-key switching work?+

Store up to ten keys per provider. The last key that worked is sticky; on a rate limit, auth error, quota error, 5xx, or empty response, clai rotates circularly to the next key — immediately for auth and quota, after a short backoff for rate limits. Optional cross-provider fallback tries other configured providers, and free-only mode keeps paid providers out of the chain so you never accidentally spend.

Can I run local or self-hosted models?+

Yes. Point clai at Ollama for fully local, offline use. You can also deploy open-weight models (Kimi, Qwen, DeepSeek, GLM, GPT-OSS, or your own fine-tune) to a Modal endpoint and drive them from clai on Modal's monthly free compute credit, or use gateways like Lightning AI and TokenRouter.

Which platforms and terminals are supported?+

macOS, Linux, and Windows, on Node.js 22+. Interactive macOS and Linux terminals get the OpenTUI full-screen console with mouse and hover support; Windows and smaller terminals get the classic Ink UI; pipes and one-shot prompts use a noninteractive stream renderer with the answer on stdout and clean exit codes.

Is clai open source?+

Yes — MIT licensed, built by Aniket Pandey (pentoshi007). Source, issues, and installers live on GitHub; the package ships on npm as @pentoshi/clai, plus Homebrew and Scoop.

$ ready when you are

Your terminal just hired a staff engineer and a red team

Free to run, honest about its work, and alive across rate limits. Install clai, type a prompt, and watch it act.

$ clai

MIT licensed · macOS · Linux · Windows · Node.js 22+