Quick Start
This guide takes you from a fresh install to a passing run in under five minutes.
Step 1: Install
npm install -g @testmuai/kane-cli
Once kane-cli --version prints a version number, you are ready. See Installation for platform requirements and troubleshooting.
Step 2: Authenticate
- OAuth (Recommended)
- Basic Auth
- CI/CD
kane-cli login
Your default browser opens on a TestMu AI consent page. Sign in (or confirm, if you are already signed in), authorise the CLI, and the page will tell you it is safe to close the tab. Control returns to your terminal and your credentials are stored under ~/.testmuai/kaneai/profiles/.
kane-cli login \
--username "undefined" \
--access-key "undefined"
Find your username and access key on the TestMu AI dashboard > Credentials.
Use this method for environments without a browser (servers, containers, CI/CD).
For non-interactive CI pipelines, pass credentials inline:
kane-cli run "your objective" \
--username "undefined" \
--access-key "undefined" \
--headless --agent
Store LT_USERNAME and LT_ACCESS_KEY as secrets in your CI/CD platform. See CI/CD Integration for platform-specific guides.
Verify authentication at any time:
kane-cli whoami
If you prefer username and access key, or need to manage multiple accounts, see Authentication.
Step 3: Open the TUI
Run kane-cli --tui:
kane-cli --tui
A short boot animation renders, then the main view drops you at a chat prompt with a status bar at the bottom showing your model, session ID, environment, and run count. From there, anything you type is treated as a test objective. Lines that begin with / are slash commands such as /help, /config, /cancel, and /exit.
Step 4: Run Your First Test
At the chat prompt, type a natural-language objective and press Enter:
Search for "wireless headphones" on Amazon and add the first result to cart
Kane CLI launches Chrome, hands the objective to the agent, and starts streaming progress. You see a step tree fill in as the agent thinks, observes the page, and acts: clicking, typing, scrolling, and verifying. When the agent is done, a result block reports whether the objective passed or failed and how many steps it took.
If you ever need to stop a run, press Ctrl+C once. Pressing it twice exits Kane CLI.
Step 5: Or Run from the Command Line
For scripting and CI, skip the TUI and use the run subcommand:
kane-cli run "Click the 'More information' link" --url https://example.com
In CLI mode, Kane CLI streams progress to stderr, prints the final result as a single JSON object on stdout, and exits with a status code that reflects the outcome:
| Exit Code | Meaning |
|---|---|
0 | Test passed |
1 | Test failed (assertion not met) |
2 | Error (auth failure, Chrome crash) |
3 | Timeout or cancelled |
Capture results in a shell script:
kane-cli run "Verify the homepage loads" > result.json
By default each run starts on the KaneAI playground site. The agent navigates from there based on your objective.
What Happens at the End of a Run
When the session ends, Kane CLI uploads the run to TestMu AI Test Manager and prints a share link. For details on the upload, the share-link experience, and the run mode toggle, see Test Manager Integration. To change settings like window size, Chrome profile, or the active project and folder, see Configuration.
Run kane-cli --tui to open the interactive TUI: a full terminal UI where you can type objectives, see step-by-step progress, and chain multiple tests in one session with persistent browser state.
Next Steps
- Writing Objectives: Learn the three patterns: actions, assertions, extractions
- Modes of Operation: Understand Interactive TUI, Headless CLI, and Agent Mode
- Authentication: Manage profiles and credential methods
- Variables & Context: Parameterize tests with credentials and project-specific context
- CI/CD Integration: Add Kane CLI to your pipeline
