kane-cli: when to call it, how to build the command, how to read the NDJSON output (one JSON event per line), how to present the result, and what to do when a run fails.
Install the skill once. From then on, whenever you ask for something that needs a browser, your agent checks that everything is ready, runs your request in a real browser, and shows you the result.
Skills build on Agent Mode (the --agent flag). The skill tells the agent to always pass --agent, read the NDJSON stream, and report a structured result back to you.
This page also covers what to expect on your first run, what gets saved on your machine, and how to watch runs live.
Skills are plain markdown files. Review and customize them by editing the installed file after download.
Install
The quickest way to get started is one command. It installs the skill globally for Claude Code, Codex CLI, and Gemini CLI:Install by Agent
- Claude Code
- Codex CLI
- Gemini CLI
The Kane CLI skill for Claude Code is a Project-level install (available only in this project):Claude Code loads the skill automatically. You do not need to restart it.What Claude can do with this skill:
SKILL.md file placed in your skills directory.Global install (available in all projects):- Recognize when your request involves a browser and invoke
kane-cliautomatically - Build properly structured
kane-cli run --agentcommands - Parse the NDJSON output and present structured results with step counts, duration, extracted values, and assertion results
- Inspect failure logs and screenshots to diagnose issues
- Run multiple browser tests in parallel using sub-agents
- Suggest bug reports for agent failures, linked to the GitHub repo
What Happens on Your First Run
- A ready check. The agent runs one short script and shows a card with who is signed in, credits left, whether Chrome was found, your app if it is already running locally, and where results will be saved. If something is missing, such as a sign-in, the card tells you and offers the fix. The agent can open the sign-in page for you. It never asks you to paste an access key into the chat.
- The run starts right away. The agent does not ask you anything first. The browser opens in a visible window so you can watch, unless your machine has no display.
- A short tour while you wait. A run takes from 30 seconds to a few minutes. The agent uses that time to explain what Kane CLI does: one-off runs, saved tests that replay in seconds, requirement-driven assurance, where runs land in Test Manager, and what an evidence pack is.
- A result card. You see pass or fail, what happened, credits used, a link to your evidence pack, a link to the test case in Test Manager, and two things the agent can do next.
- Three quick choices, asked once. After your first result, the agent asks whether to keep showing the browser, whether results are going to the right place, and whether you are doing one-off checks or building a saved suite. It does not ask again.
Your Preferences
The agent saves your answers in one small file next to Kane CLI’s own settings:
The same file applies to all your agents and projects. To change a preference, tell your agent “kane preferences”, or set it yourself:
Where Results Are Saved
Every run is saved as a test case in a Test Manager project and folder (see Test Manager Integration). The ready check always shows which project and folder. To use a different one, tell your agent “change project”. The agent lists your projects, lets you pick one or create a new one, and saves your choice. This setting belongs to Kane CLI, not to the agent. A change applies to every later Kane CLI session for your sign-in: every project folder, every agent, and the terminal. Tests you already ran stay in their original project.Watch Runs Live (Claude Code)
In Claude Code you can turn on a live status strip. While a run is in progress, one line in your status bar shows the current step:- It keeps your existing status line. Your status line prints first, unchanged. The kane line appears under it only while a run is live and for five minutes afterwards.
- Only the session that started the run shows it. If you have several Claude Code sessions open, even in the same project, the others are unchanged. On Windows, every session open in the run’s project shows the strip.
- Turning it on edits
~/.claude/settings.json. A backup is kept next to the file, andstrip disablerestores your original status line exactly. - Requires Kane CLI 0.8.17 or later and Node 18 or later.
- It stays on your machine. The strip reads two things Kane CLI writes locally during a run: a small pointer file for each live run, and that run’s event log. It makes no network calls.
- It never shows what was typed. A typing step appears as “typing in” plus the field’s name.
- It appears shortly after launch. The strip picks up a run roughly 10 to 30 seconds after it starts, once the browser is up and Kane CLI has created the session. While a step is still in progress, the line shows the last finished action, marked
last:.
Signing In From an Agent
If you are not signed in, the ready check tells you and offers the fix. The agent can open the sign-in page for you, and it never asks you to paste an access key into the chat. If no browser can open, for example on a CI runner, in a container, or in a sandboxed builder, sign in with Basic Auth from your own terminal or pipeline instead:kane-cli whoami. See Authentication for every sign-in method.
How Skills Work
When you ask your AI agent to test something on the web, the skill:- Runs the ready check: one short script that confirms
kane-cliis installed and shows who is signed in, credits left, Chrome, and where results will be saved. - Builds a
kane-cli run --agentcommand from your request. The browser opens in a visible window unless your watch mode preference says otherwise or there is no display. In those cases the command adds--headless. - Reads the NDJSON stream and waits for the
run_endevent, which carries the final result. - Presents a structured result: status, steps, duration, extracted values, and assertion results.
- If the run failed, inspects the
run_dirlogs and screenshots to find the cause. - Rates the run, and suggests a bug report when a failure looks like a low-quality agent run.
What Leaves Your Machine
Kane CLI uploads the same data whether you run it yourself or through an agent. By default, each run is saved to your account as a Test Manager test case, with its screenshots and run details (see Test Manager Integration). Evidence packs are sealed on your machine, and the evidence viewer reads them from your machine (see Evidence Packs). The agent preferences file and the status strip stay on your machine.Running With No Person Present
In CI, or with a cloud agent that cannot ask you anything, the agent skips the tour and the questions, runs headless with default settings, and does not write the preferences file. It still stops and reports clearly if Kane CLI is not installed, you are not signed in, or you are out of credits. For pipelines, calling Kane CLI directly is usually simpler. See CI/CD Integration.Skill File Locations
Source files: github.com/LambdaTest/kane-cli/tree/main/skill-installer/skills
Next Steps
- Quick Start: the same first run, typed by hand.
- Modes of Operation: objectives, flags and what a run does.
- Test.md: keep a flow as a saved test that replays in seconds.
- Evidence Packs: what every run captures and how to view it.
- AI Coding Agents: walkthroughs and patterns for using Kane CLI from any coding agent.