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.
$ whoami → autonomous terminal agent
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.
❯
one command in, evidence-backed report out
$ why clai
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.
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.
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.
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
clai is a staff-level software engineer and a senior offensive-security operator in the same binary — and it acts instead of narrating.
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
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)
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.
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.
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.
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
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
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.
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
Read-only discovery gathers real evidence: whois, DNS, nmap scans, HTTP fingerprints, API specs, and scoped path discovery.
$ pentest.recon · net.scan · pentest.webDiscover
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
Task-by-task execution: enumerate, exploit, post-exploit. New attack surface expands the plan without wiping completed work.
$ task.update in_progress → exploit → done
Title, severity, evidence, reproduction steps, impact, remediation — plus honest notes about what was not tested.
$ report.md · evidence/ · residual-risk
Built for authorized pentests, bug-bounty programs, red teams, and CTFs. Full capability, professional restraint.
$ free-tier economics
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.
Zero setup. No account, no key — the default out of the box.
Fast open-model inference with a generous free tier.
Google's models on a free API allowance.
Open models served free through NVIDIA's catalog.
One key, hundreds of models — free variants included.
EU open-weight inference — free while experimental.
Rotating free catalogs, stacked like every other tier.
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.
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.
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.
/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
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
Answers, methodology, and read-only tools. No mutations, no attacks — the safe default for research and questions.
agent
Full execution: edits files, installs packages, scans hosts, runs builds and tests, works the plan, verifies before claiming success.
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
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 claiScript
$ 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
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]
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]
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]
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]
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]
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]
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
The things people ask before they type clai for the first time.
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.
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.
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.
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.
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.
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.
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.
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.
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
Free to run, honest about its work, and alive across rate limits. Install clai, type a prompt, and watch it act.
$ claino key requiredMIT licensed · macOS · Linux · Windows · Node.js 22+