Run End-to-End Tests from Your Terminal with Kane CLI

Author and Run Tests Right from the Terminal in Natural Language, with an Evidence-Backed Pass or Fail from a Real Browser.

npm install -g @testmuai/kane-cli

ProductAI

How to Set Up Kane CLI in Gemini CLI for Browser Checks

Set up Kane CLI in Gemini CLI: install the skill globally or per project, see what the first run does, and let Gemini CLI verify its changes in real Chrome.

Last Updated on:

Gemini CLI writes and edits code from your terminal, but it cannot open a browser to check that the change works. Adding Kane CLI fixes that. Once the Kane CLI skill is installed, Gemini CLI can run a plain-English check in real Chrome, read the pass or fail, and fix its own code before it tells you the work is done.

This guide covers the setup: what to install, the three ways to add the skill, what happens on the first run, and how the verification loop works day to day. For the case for testing apps built with Gemini CLI, and what Kane CLI checks in them, see testing apps built with Gemini CLI.

Gemini CLI loads the Kane CLI SKILL.md, invokes kane-cli run, and parses NDJSON output

Before You Start

You need three things on the machine where Gemini CLI runs:

  • Gemini CLI - installed and working in your terminal.
  • Kane CLI - installed with npm install -g @testmuai/kane-cli, as covered in the Kane CLI installation guide.
  • A TestMu AI sign-in - run kane-cli login once. Gemini CLI can also open the sign-in page for you on the first run, and it never asks you to paste an access key into the chat.

Install the Kane CLI Skill

The skill is a Markdown file, SKILL.md, that teaches Gemini CLI when to call Kane CLI, how to build the command, how to read the output, and what to do when a check fails. Pick one of three ways to add it.

Option A: One Command for Every Agent

npx @testmuai/kane-cli-skill

This installs the skill for Gemini CLI, Claude Code and Codex CLI in one go, and creates the folder that holds your agent preferences. It is the quickest route if you use more than one coding agent.

Option B: Gemini CLI Only, Global or Per Project

For a global install, available in every repository on this machine:

mkdir -p ~/.gemini/skills/kane-cli
curl -o ~/.gemini/skills/kane-cli/SKILL.md \
  https://raw.githubusercontent.com/LambdaTest/kane-cli/main/skill-installer/skills/SKILL.md

For a project install that you commit, so every teammate who opens the repository gets the same skill:

mkdir -p .gemini/skills/kane-cli
curl -o .gemini/skills/kane-cli/SKILL.md \
  https://raw.githubusercontent.com/LambdaTest/kane-cli/main/skill-installer/skills/SKILL.md

Option C: A GEMINI.md File in Your Repository

If you prefer instructions that live in the project itself, copy the single Kane CLI agent instruction file into your repository as GEMINI.md. Gemini CLI reads it like any other project context file.

Whichever option you pick, restart Gemini CLI afterwards so it loads the skill. The Kane CLI skills documentation lists the same steps for every supported agent.

Your First Browser Check

Open Gemini CLI in a project and ask for something that needs a browser:

check that the home page loads on my app

The first session follows the same steps every time:

  • A ready check - one short card shows 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, the card says so and offers the fix.
  • The run - it starts straight away, in a visible browser unless the machine has no display.
  • A short tour - while the run works, Gemini CLI explains what Kane CLI can do. Say "kane tour" any time to see it again.
  • A result card - pass or fail, what happened, credits used, a link to the evidence pack, a link to the test case in Test Manager, and two suggested next steps.
  • Setup questions, asked once - 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.

From the second session on, the ready check shrinks to one line and the tour is gone. Your answers are saved in ~/.testmuai/kaneai/agent-config/config.json and apply to every agent and project. To change them, tell Gemini CLI "kane preferences", or run the command below.

npx @testmuai/kane-cli-skill prefs --watch quiet --purpose suite
Note

Note: Give Gemini CLI a real browser and a pass or fail it can act on. Start free. Try Kane CLI

The Verification Loop

Once the skill is in place, a build request turns into a closed loop. Gemini CLI edits the files, runs a kane-cli run command with the --agent flag, and reads the result. In agent mode Kane CLI prints NDJSON, one JSON object per line, and the last line, run_end, carries the verdict.

For a quick visual walkthrough of this concept, watch the video below from TestMu AI.

Youtube thumbnail

Subscribe to the TestMu AI YouTube channel for more tutorials on testing and automation.

Gemini CLI applies code, triggers Kane CLI, reads the run_end JSON, then completes or self-corrects

On a pass, Gemini CLI reports the work as done. On a fail, it uses the failure summary, the step trace and the screenshots to fix its own code, then runs the check again. To see what that stream looks like from two real runs, read how a coding agent reads a Kane CLI run.

This is the same loop another coding agent closes when Claude Code writes a feature and Kane CLI proves it works.

Parallel Checks and CI

When a task touches several separate routes, the skill tells Gemini CLI to start parallel Kane CLI runs as shell subprocesses, track each one, and summarize the results in a single report.

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 still stops with a clear message if Kane CLI is not installed, not signed in, or out of credits. For a pipeline, calling Kane CLI directly is usually simpler; see how to connect Kane CLI to GitHub Actions.

Note

Note: Want the full flag reference behind these checks? Read the Kane CLI docs. Read the docs

For the wider workflow, including running Antigravity CLI headless and chaining the browser check onto it in CI, see how to test code written by Antigravity CLI and Gemini CLI. In an agentic IDE the same loop ships as an installable bundle, which is how the Kane CLI power adds browser verification to Kiro. For how Kiro's specs compare with Spec Kit, OpenSpec and the BMAD Method, see this comparison of spec-driven development tools.

Testing from the terminal? Kane CLI by TestMu AI lets SDETs and developers plan, write, run and debug tests from the command line.

To run your first test, start free, or
for a full walkthrough of the product.

Author

...

Bhawana

Blogs: 75

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Kane CLI in Gemini CLI FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests