Use the —agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.
Agent Mode outputs structured NDJSON instead of the interactive terminal UI. It’s how AI coding agents (Claude Code, Codex CLI, Gemini CLI) consume Kane CLI results: parse events programmatically, extract the final result, and present it to the user.
kane-cli run "Verify the checkout flow completes successfully" \ --url https://myapp.com \ --agent \ --headless
When --agent is active:
The interactive TUI is fully suppressed (no boot screen, no menus)
stdout carries only NDJSON, one JSON object per line, and the progress UI goes to stderr
When stdin is not a TTY, Kane CLI turns off ask_user, so the run never stops to wait for input (see below)
Kane CLI also switches to NDJSON on its own when stdin is not a TTY, for example in CI. Pass --agent anyway, so the output format does not depend on how the shell is set up.
Add --headless wherever there is no display, such as CI runners, containers, and SSH sessions, to avoid display server errors. On a desktop, a coding agent can leave the browser visible so you can watch the run.
With --agent, Kane CLI writes one JSON object per line (NDJSON) to stdout. Every line carries v, the stream contract version (currently 1), and ts, the time the line was written. Here is a shortened kane-cli run stream. ... marks lines and values left out, and the run_end line shows only some of its fields:
{"type":"stream_start","cli_version":"0.9.0","surface":"run","pid":16664,"v":1,"ts":"2026-10-15T08:47:26.889Z"}...{"type":"bifurcation","flows":["Navigate to https://example.com then verify the page heading says Example Domain"],"count":1,"v":1,"ts":"2026-10-15T08:47:39.435Z"}{"step":2,"status":"running","remark":"Step 1","v":1,"ts":"2026-10-15T08:47:39.957Z"}{"step":2,"status":"done","remark":"navigate: Navigate to https://example.com","v":1,"ts":"2026-10-15T08:47:39.958Z"}...{"step":4,"status":"done","remark":"assert: the page heading says Example Domain","v":1,"ts":"2026-10-15T08:47:54.260Z"}{"type":"run_end","status":"passed","summary":"...","reason":"Objective completed","duration":20.5,"credits_consumed":11.9,"test_url":"https://test-manager.lambdatest.com/...","session_dir":"...","v":1,"ts":"2026-10-15T08:48:10.211Z"}
Rules for parsing the stream:
The first line is stream_start. Its surface is run, testmd, or testrun, and cli_version names the Kane CLI release that wrote the stream.
On a run stream, step lines have no type field. A step prints a running line when it starts and a done or failed line when it ends, and the stream has no run_start, step_start, step_event, or step_end events. A testmd run stream is different: every line is typed, and each test_md_step_start and test_md_step_end pair wraps typed run_start, step_start, step_event, step_end, and run_end events for that step.
Ignore fields and event types you do not recognize. New ones can appear in any release without a change to v. Skip any line that is not JSON.
For a run that started, the last line is run_end. A run refused before it starts can exit with code 2 and no run_end line, so check the exit code first.
Kane CLI also writes the same lines to events.ndjson in the session folder while the run is in progress.
The tables below describe a kane-cli run stream. A testmd run stream is typed on every line and ends with test_md_done, and a testrun run stream uses its own testrun_* events. See Command-Specific Completion.
Step index. It can run one ahead of the step a person would count, because a bifurcation takes the first slot. To report steps taken, count the done and failed lines
status
string
running when the step starts, then done or failed when it ends
Kane CLI checks every {{name}} in the objective before the run starts. If a name has no value, Kane CLI prints a warning and the run continues. The name is typed literally as written, unless a step sets its value first. With --agent, the warning is a single typed event, sent before the first progress event:
{"type":"warning","code":"unresolved_variables","message":"2 variable(s) have no value — typed as written unless a step sets them first","suggested_file":".testmuai/variables/variables.json","variables":[{"name":"checkout_url","reason":"not_declared","used_by":[{"file":"objective","step":1}]},{"name":"login_password","reason":"value_missing","file":".testmuai/variables/variables.json","used_by":[{"file":"objective","step":1}]}]}
reason is value_missing, not_declared, or not_a_dataset_column. The warning does not change the exit code. See Unresolved variables for what each reason means and which names are never checked.
run_end is the last line of a kane-cli run that started, and it carries the complete result. A run refused before it starts, for example with no start URL, no sign-in, or no Chrome, can exit with code 2 and no run_end line. Check the exit code first, then read run_end.
{ "type": "run_end", "status": "passed", "summary": "Searched for laptop and added first result to cart", "one_liner": "Searched for laptop on Amazon and added to cart", "reason": "Objective completed", "duration": 45.2, "credits_consumed": 11.9, "final_state": { "price": "$29.99", "product_name": "Wireless Headphones" }, "test_url": "https://test-manager.lambdatest.com/projects/123/test-cases/456", "session_dir": "~/.testmuai/kaneai/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890", "v": 1, "ts": "2026-10-15T10:31:30.412Z"}
run_end can carry more fields than this example, such as context and result_code. Ignore the fields you do not need.
A short label for why the run stopped, such as "Objective completed"
duration
Run time in seconds
credits_consumed
Credits the run used, as a decimal number, when reported. Round it for display. Older releases called this field credits
final_state
Values saved with “store … as” in the objective
test_url
Link to the test case in Test Manager. Present when the upload succeeded
session_dir
The session folder. The sealed evidence pack is in its evidence/ subfolder
run_dir
Legacy. The folder it names is no longer created: run logs and screenshots are in the evidence pack
result_code
Optional machine classification of the result. See Error Codes. With --bug-detection, a confirmed product bug arrives as result_code740 with a verdict object
The run went ahead and did not pass, or the upload failed. Read the failing step’s remark and the evidence pack to tell a product bug from a test problem
2
The run did not start, and no credits were used: sign-in, configuration, no start URL, Chrome, network, or an unknown subcommand. There may be no run_end line
3
The run was canceled or hit --timeout
testmd run, testrun run, generate, and the assurance commands have their own exit codes. See CLI Reference: Exit Codes.
Every run seals an evidence pack: one .evidence file, a standard zip, that holds the test definition, a result summary, per-step screenshots (plus annotated copies that highlight the element the agent acted on), per-step browser console and network logs, run logs, and, when a step fails, a failure record for that step. The pack holds no video.
Command
Where the sealed pack is
kane-cli run
In the evidence/ subfolder of session_dir. It is also copied to .testmuai/evidence/ in your working directory when you name the run with --name
kane-cli testmd run
Copied to .testmuai/evidence/ on every run
kane-cli testrun run
Created directly in .testmuai/evidence/
run_end has no field for the pack’s path. After the run, Kane CLI prints a hint line on stderr, not on stdout:
evidence: view locally with `kane-cli evidence serve <path-to-pack>`
Save stdout to a file, read the exit code, then pick the run_end line by its type. Selecting by type keeps the script working when a run never started and has no run_end line.
kane-cli run "Go to https://example.com, store the page heading as 'heading', then verify it says Example Domain" \ --agent --headless > run.ndjsoncode=$?echo "exit code: $code" # 2: the run did not start, and there may be no run_end line# The full resultjq -cR 'fromjson? | select(.type == "run_end")' run.ndjson# Just the statusjq -rR 'fromjson? | select(.type == "run_end") | .status' run.ndjson# A value saved with "store ... as 'heading'"jq -rR 'fromjson? | select(.type == "run_end") | .final_state.heading' run.ndjson
fromjson? skips any line that is not JSON. When the run started, run_end is also the last line, so tail -n 1 run.ndjson returns it too.
Reading the last run_end event works for one-shot run only. Other commands end with their own completion event:
testmd run: read test_md_done for overall_status, duration_s, session_id, and the optional share_url. The stream can also contain run_end events; these finish individual steps, not the file.
Local testrun run suites: end with testrun_done. Suites dispatched to the remote grid then also emit remote_done; keep its status, exit, and sessions_path fields.
generate: ends with generate_done.
Assurance commands: conversational agent streams end with done. The review and read commands have their own completion contracts.
Always check the process exit code too: an early refusal, an invalid plan, or a dry run can exit without the normal completion event.Progress events are meant for live display. When you count completions, count only done and failed. Step indices can repeat, so keep track of which child agent and execution each event belongs to.testrun run prints its NDJSON stream when stdin is not a TTY, or when you pass --agent. See Batch runs (testrun).
If an objective requires user input mid-run, Kane CLI fires ask_user:
{"type": "ask_user", "question": "Which item should I select?", "options": ["Small", "Medium", "Large"]}
ask_user is turned off automatically when stdin is not a TTY. In CI/CD and AI agent contexts, stdin is never a TTY, so ask_user never fires. Write objectives that don’t require interactive prompts.
If stdin IS a TTY, respond by writing JSON to stdin:
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"TestMu AI","colors":{"primary":"#c24e00","light":"#c24e00","dark":"#c24e00"},"logo":{"light":"https://mintcdn.com/lambdatest-f4bdd228/vjKoxtouKdApUfYX/logo/light.svg?fit=max\u0026auto=format\u0026n=vjKoxtouKdApUfYX\u0026q=85\u0026s=99f56597c24dac27d2534aa7dc97b091","dark":"https://mintcdn.com/lambdatest-f4bdd228/vjKoxtouKdApUfYX/logo/dark.svg?fit=max\u0026auto=format\u0026n=vjKoxtouKdApUfYX\u0026q=85\u0026s=f48ddd9629a7dfb903fc1064c968e156","href":"https://www.testmuai.com/"},"favicon":"https://mintcdn.com/lambdatest-f4bdd228/fK8SOl8ij3xBGHLU/favicon.ico?fit=max\u0026auto=format\u0026n=fK8SOl8ij3xBGHLU\u0026q=85\u0026s=33d14ec4a5a8ea46ed0892fe26b0c5b0","api":{"playground":{"proxy":false}},"appearance":{"default":"light"},"navbar":{"links":[{"icon":"github","href":"https://github.com/LambdaTest/","label":"GitHub"},{"href":"https://www.testmuai.com/login/","label":"Login"}],"primary":{"type":"button","label":"Get Started Free","href":"https://www.testmuai.com/register/"}},"footer":{"socials":{"facebook":"https://www.facebook.com/testmuai","x":"https://x.com/kane_cli","github":"https://github.com/LambdaTest/kane-cli","linkedin":"https://www.linkedin.com/company/testmu-ai","youtube":"https://www.youtube.com/@TestMuAI"}},"seo":{"metatags":{"canonical":"https://www.testmuai.com"}},"fonts":{"heading":{"family":"SF Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif"},"body":{"family":"SF Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif"}},"integrations":{"gtm":{"tagId":"GTM-5M2PF5TP"},"telemetry":{"enabled":false}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Back to TestMu AI Docs","icon":"arrow-left","href":"https://www.testmuai.com/support/docs/"},{"anchor":"Status","icon":"signal","href":"https://status.lambdatest.io/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.testmuai.com/blog/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lambdatest-f4bdd228","hasAudioNarration":false,"actualSubdomain":"lambdatest-f4bdd228","customDomains":["www.testmuai.com"],"gitSource":{"type":"github","owner":"lambdatest","repo":"documentation","deployBranch":"stage-mintlify","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af6eb333b5d1dd9e7c6755c","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"Docs","count":70},{"language":"default","tag":"Kane CLI","count":70},{"language":"default","tag":"Core Concepts","count":12},{"language":"default","tag":"Checkpoints","count":12},{"language":"default","tag":"Use Cases","count":11},{"language":"default","tag":"Assurance","count":8},{"language":"default","tag":"DevTools","count":7},{"language":"default","tag":"Evidence","count":7},{"language":"default","tag":"Reference","count":5},{"language":"default","tag":"CI/CD \u0026 Skills","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@lambdatest.com","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"global.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\na{text-decoration:none!important}.no-link a{text-decoration:none!important;border:none!important}.project-management-tools{margin:20px auto;border:0.8px solid rgb(94, 92, 92);border-radius:10px;padding:20px;text-decoration:none!important;align-items:flex-start;box-sizing:border-box}.plugins-and-extensions{margin:20px auto;border-bottom:0.5px solid rgb(234, 234, 234);padding-bottom:15px;text-decoration:none!important}.lt-bottom-cta{background:#E2EEFF;border-radius:6px;padding:70px 30px;margin:20px 0 40px 0;position:relative;width:100%}.lt-bottom-cta .lt-cta-content{width:50%}.lt-bottom-cta .lt-cta-content h2{color:#041227;margin:0 0 10px 0;font-size:20px;font-weight:700;line-height:1.4}.lt-bottom-cta .lt-cta-btn{display:inline-block;background:#C24E00;color:#fff;padding:10px 18px;border-radius:3.75px;text-decoration:none;font-weight:600;font-size:16px;border:none;cursor:pointer;transition:background 0.2s ease}.lt-bottom-cta .lt-cta-btn:hover{background:#C95100}.lt-bottom-cta .lt-cta-image{width:50%;position:absolute;right:0;bottom:0}.lt-bottom-cta .lt-cta-image img{width:auto;height:auto;max-width:100%}@media (min-width: 1025px) and (max-width: 1250px){.lt-bottom-cta{padding:40px 30px}}@media (min-width: 1251px) and (max-width: 1366px){.lt-bottom-cta{padding:50px 30px}.lt-bottom-cta .lt-cta-content h2{font-size:16px}}@media (min-width: 1450px) and (max-width: 1550px){.lt-bottom-cta{padding:60px 30px}}@media (max-width: 1024px){.lt-bottom-cta{padding:25px 30px}.lt-bottom-cta .lt-cta-content{width:100%}.lt-bottom-cta .lt-cta-image{display:none}}.lt-help-support{margin:40px 0;padding-top:30px;border-top:1px solid #e5e7eb}.lt-help-support h3{font-size:28px;font-weight:700;color:#1a1a2e;margin:0 0 25px 0}.lt-help-support-content{display:flex;gap:80px;flex-wrap:wrap}.lt-help-column{flex:0 0 auto}.lt-help-column-title{font-size:16px;font-weight:500;color:#1a1a2e;margin:0 0 15px 0}.lt-feedback-buttons{display:flex;gap:10px}.lt-feedback-btn{width:44px;height:44px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all 0.2s ease}.lt-feedback-btn:hover{border-color:#c24e00;background:#fff5f0}.lt-feedback-btn svg{width:20px;height:20px;color:#6b7280}.lt-help-links{display:flex;flex-direction:column;gap:12px}.lt-help-link{display:inline-flex;align-items:center;gap:10px;color:#0066cc;text-decoration:none;font-size:15px;font-weight:500;cursor:pointer;background:none;border:none;padding:0}.lt-help-link:hover{color:#004999;text-decoration:underline}.lt-help-link svg{width:18px;height:18px;color:#0066cc}@media (max-width: 600px){.lt-help-support-content{gap:30px}}.lt-feedback-form{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:30px;margin-top:25px;box-shadow:0 1px 3px rgba(0,0,0,0.1)}.lt-feedback-form label{display:flex;align-items:center;gap:10px;cursor:pointer;font-size:15px;color:#374151}.lt-feedback-form input[type=\"radio\"]{width:18px;height:18px;cursor:pointer}.lt-feedback-form textarea{width:100%;min-height:100px;padding:12px;border:1px solid #e5e7eb;border-radius:8px;font-size:14px;font-family:inherit;resize:vertical}.lt-feedback-form button[type=\"submit\"]{background:#1a1a2e;color:#fff;border:none;padding:12px 24px;border-radius:6px;font-size:15px;font-weight:500;cursor:pointer;transition:background 0.2s ease}.lt-feedback-form button[type=\"submit\"]:hover{background:#2d2d4a}#feedback{display:none!important}nav [class*=\"nav-tabs-item\"],header [class*=\"nav-tabs\"]{display:none!important}.lt-sidebar-bottom{padding:0 0 12px;border-top:1px solid #e5e7eb;margin-top:8px}:is(.dark) .lt-sidebar-bottom{border-top-color:rgba(255, 255, 255, 0.07)}.lt-sidebar-bottom ul{list-style:none;padding:0;margin:0}.kane_cli_cta{--kane-cli-font: 'Manrope', 'SF Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--kane-cli-ink: #121212;position:relative;width:100%;margin:20px 0 40px;padding:0;overflow:hidden;background:var(--kane-cli-ink) url('https://assets.testmu.ai/resources/images/Terminal-KaneCLIBg.png') center / cover no-repeat}.kane_cli_cta_box{position:relative;display:flex;align-items:center;margin:24px;overflow:hidden;background:#fff}.kane_cli_cta .kane_cli_cta_content{position:relative;box-sizing:border-box;width:55%;padding:20px;@media screen and (max-width: 1100px){width:100%}}.kane_cli_cta .kane_cli_cta_content h2,.kane_cli_cta .kane_cli_cta_content p,.kane_cli_cta .kane_cli_cta_content button.demoBtn{font-family:var(--kane-cli-font)}.kane_cli_cta .kane_cli_cta_content h2{margin:0 0 4px;font-size:20px;font-weight:500;line-height:28px;letter-spacing:-0.5px;text-wrap:balance;color:var(--kane-cli-ink)}.kane_cli_cta .kane_cli_cta_content p{max-width:240px;margin:0 0 18px;font-size:14px;font-weight:400;line-height:21px;color:#4D4D4D;@media screen and (max-width: 1100px){max-width:100%}}.kane_cli_cta .kane_cli_cta_content button.demoBtn{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;width:auto;height:32px;padding:12px;border:1px solid rgba(31, 35, 40, 0.15);border-radius:6px;outline:none;background:var(--kane-cli-ink);filter:drop-shadow(0 1px 0 rgba(31, 35, 40, 0.04));font-size:12px;font-weight:600;line-height:16px;color:#fff;white-space:nowrap;cursor:pointer}.kane_cli_cta .kane_cli_cta_content button.demoBtn::after{content:'';flex-shrink:0;width:8px;height:8px;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10.2857' height='10.2857' viewBox='0 0 10.2857 10.2857' fill='none'%3E%3Cpath d='M0.642857 5.14286H9.64286M5.14286 0.642857L9.64286 5.14286L5.14286 9.64286' stroke='white' stroke-width='1.28571' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / 10.2857px 10.2857px no-repeat}.kane_cli_cta .kane_cli_cta_terminal{position:absolute;z-index:1;right:0;bottom:0;width:320px;max-width:none;height:auto;@media screen and (max-width: 1279px){width:280px}@media screen and (max-width: 1163px){width:320px}@media screen and (max-width: 1100px){display:none}}.kane_cli_cta .kane_cli_cta_icon{position:absolute;z-index:0;top:12px;left:40%;width:22%;max-width:none;height:auto;pointer-events:none;@media screen and (max-width: 1279px){width:18%;left:50%}@media screen and (max-width: 1163px){width:22%;left:40%}@media screen and (max-width: 1100px){display:none}}@media (max-width: 660px),\n (min-width: 1280px) and (max-width: 1440px){.kane_cli_cta_box{flex-direction:column;align-items:stretch;margin:16px}.kane_cli_cta .kane_cli_cta_content{width:100%;padding:20px 20px 16px}.kane_cli_cta .kane_cli_cta_terminal{position:static;align-self:flex-end;width:80%}.kane_cli_cta .kane_cli_cta_icon{display:none}}@media (min-width: 1280px) and (max-width: 1440px){.kane_cli_cta .kane_cli_cta_terminal{display:none}}.demo_popup_overlay{position:fixed!important;inset:0;z-index:99999;display:none;box-sizing:border-box;padding:20px;overflow-y:auto}.demo_popup_overlay.shown{display:flex;align-items:center;justify-content:center}.demo_popup_header_demo{background:#4D4D4DA3;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.demo_popup_overlay .content{display:flex;align-items:center;justify-content:center;width:100%;text-align:left}.demo_popup_header_demo .demo_popup_box{position:relative;width:90%;max-width:550px;max-height:calc(100vh - 40px);margin:20px auto;padding:40px;overflow-y:auto;background-color:#fff}.demo_popup_close{position:absolute;top:16px;right:16px;z-index:10;display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:32px;line-height:1;color:#000;cursor:pointer}.demo_popup_close:hover{color:#333}.demo_popup_form_title{margin-bottom:24px;font-size:24px;font-weight:500;line-height:32px;letter-spacing:-1px;text-align:center;color:#000}.demo_popup_form label{display:block;font-size:14px;font-weight:500;line-height:22px;color:#333;cursor:pointer}.demo_popup_grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:16px}.demo_popup_field{margin-top:16px}.demo_popup_phone_row{display:flex;align-items:center;gap:8px}.demo_popup_form input,.demo_popup_form textarea,.demo_popup_form select,.demo_popup_select{height:38px;margin-top:4px;padding:0 12px;border:1px solid #D3D2CD;border-radius:4px;background-color:#fff;font-size:14px;font-weight:400;line-height:22px;color:#4D4D4D}.demo_popup_form input,.demo_popup_form textarea,.demo_popup_form select{box-sizing:border-box;width:100%;font-family:inherit}.demo_popup_form textarea{height:65px;padding:12px;resize:none}.demo_popup_form input::placeholder,.demo_popup_form textarea::placeholder{color:#4D4D4D}.demo_popup_form input:focus-visible,.demo_popup_form textarea:focus-visible,.demo_popup_form select:focus-visible{outline:none;border-color:#000}.demo_popup_error{margin-top:5px;font-size:12px;color:#ef4444}.demo_popup_action{text-align:center}.demo_popup_submit{width:100%;margin-top:12px;padding:8px 12px;border:none;border-radius:4px;background-color:#000;font-size:14px;font-weight:500;line-height:22px;color:#fff;cursor:pointer}.demo_popup_submit:disabled{background-color:#5F5E5E;cursor:not-allowed}.demo_popup_submit:hover{background-color:#3C3C3C}.demo_popup_select_wrapper{position:relative}.demo_popup_select{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;cursor:pointer;transition:border-color 0.2s ease}.demo_popup_product_select{width:100%}.demo_popup_select_open{border-color:#000}.demo_popup_select_text{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.demo_popup_select_arrow{display:flex;flex-shrink:0;align-items:center;margin-left:8px;color:#4D4D4D;transition:transform 0.2s ease}.demo_popup_select_open .demo_popup_select_arrow{transform:rotate(180deg)}.demo_popup_select_options{position:absolute;top:46px;right:0;left:0;z-index:1000;min-width:200px;max-height:200px;margin:0;padding:0;overflow-y:auto;border:1px solid #D3D2CD;background:#fff;list-style:none}.demo_popup_select_option{padding:4px 12px;font-size:12px;font-weight:400;line-height:22px;color:#4D4D4D;cursor:pointer;transition:background-color 0.2s ease}.demo_popup_select_option:hover{background-color:#f5f5f5}.demo_popup_select_option_selected{background-color:#f0f0f0;font-weight:500}@media (max-width: 1400px){.demo_popup_header_demo .demo_popup_box{padding:30px}.demo_popup_form_title{margin-bottom:16px;font-size:20px}}@media (max-width: 768px){.demo_popup_header_demo .demo_popup_box{padding:30px 20px}.demo_popup_close{top:10px;right:10px}.demo_popup_field{margin-top:8px}}"}],"page":{"pagePath":"docs/kane-cli-agent-mode","slug":"/docs/kane-cli-agent-mode","pageMetadata":{"title":"How to Use Kane CLI Agent Mode","sidebarTitle":"Agent Mode","description":"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.","keywords":["kane cli agent mode","ndjson","kaneai","testmu ai","ai agent integration","claude code","codex cli"],"og:description":"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.","href":"/docs/kane-cli-agent-mode"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use the —agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const KaneCliCta=()=>{const productType=`Kane-CLI`;const productList=[{value:0,type:`Online-Browser-Testing`,label:`Online Browser Testing`},{value:1,type:`Selenium-Testing`,label:`Selenium Testing`},{value:2,type:`Cypress-Testing`,label:`Cypress Testing`},{value:3,type:`Hyperexecute`,label:`HyperExecute`},{value:4,type:`Kane-AI`,label:`KaneAI`},{value:5,type:`On-Premise-Selenium-Grid`,label:`On-premise Selenium Grid`},{value:6,type:`Mobile-App-Testing`,label:`Native App Testing`},{value:7,type:`Real-Device-Cloud`,label:`Real Device Cloud`},{value:8,type:`Smart-Visual-Testing`,label:`Visual Regression Cloud`},{value:9,type:`Appium`,label:`Appium`},{value:10,type:`Enterprise`,label:`Enterprise`},{value:11,type:`Test-Manager`,label:`Test Manager`},{value:12,type:`Professional-Services`,label:`Professional Services`},{value:13,type:`Accessibility-Testing`,label:`Accessibility Testing`},{value:14,type:`Agent Testing`,label:`Agent Testing`},{value:15,type:`Browser-Cloud`,label:`Browser Cloud`},{value:16,type:`Kane-CLI`,label:`Kane CLI`},{value:`Other`,type:`Other`,label:`Other`}];const countryList=[{country_code:`US`,value:`1`,name:`USA (+1)`},{country_code:`GB`,value:`44`,name:`UK (+44)`},{country_code:`DZ`,value:`213`,name:`Algeria (+213)`},{country_code:`AD`,value:`376`,name:`Andorra (+376)`},{country_code:`AO`,value:`244`,name:`Angola (+244)`},{country_code:`AI`,value:`1264`,name:`Anguilla (+1264)`},{country_code:`AG`,value:`1268`,name:`Antigua \u0026amp; Barbuda (+1268)`},{country_code:`AR`,value:`54`,name:`Argentina (+54)`},{country_code:`AM`,value:`374`,name:`Armenia (+374)`},{country_code:`AW`,value:`297`,name:`Aruba (+297)`},{country_code:`AU`,value:`61`,name:`Australia (+61)`},{country_code:`AT`,value:`43`,name:`Austria (+43)`},{country_code:`AZ`,value:`994`,name:`Azerbaijan (+994)`},{country_code:`BS`,value:`1242`,name:`Bahamas (+1242)`},{country_code:`BH`,value:`973`,name:`Bahrain (+973)`},{country_code:`BD`,value:`880`,name:`Bangladesh (+880)`},{country_code:`BB`,value:`1246`,name:`Barbados (+1246)`},{country_code:`BY`,value:`375`,name:`Belarus (+375)`},{country_code:`BE`,value:`32`,name:`Belgium (+32)`},{country_code:`BZ`,value:`501`,name:`Belize (+501)`},{country_code:`BJ`,value:`229`,name:`Benin (+229)`},{country_code:`BM`,value:`1441`,name:`Bermuda (+1441)`},{country_code:`BT`,value:`975`,name:`Bhutan (+975)`},{country_code:`BO`,value:`591`,name:`Bolivia (+591)`},{country_code:`BA`,value:`387`,name:`Bosnia Herzegovina (+387)`},{country_code:`BW`,value:`267`,name:`Botswana (+267)`},{country_code:`BR`,value:`55`,name:`Brazil (+55)`},{country_code:`BN`,value:`673`,name:`Brunei (+673)`},{country_code:`BG`,value:`359`,name:`Bulgaria (+359)`},{country_code:`BF`,value:`226`,name:`Burkina Faso (+226)`},{country_code:`BI`,value:`257`,name:`Burundi (+257)`},{country_code:`KH`,value:`855`,name:`Cambodia (+855)`},{country_code:`CM`,value:`237`,name:`Cameroon (+237)`},{country_code:`CA`,value:`1`,name:`Canada (+1)`},{country_code:`CV`,value:`238`,name:`Cape Verde Islands (+238)`},{country_code:`KY`,value:`1345`,name:`Cayman Islands (+1345)`},{country_code:`CF`,value:`236`,name:`Central African Republic (+236)`},{country_code:`CL`,value:`56`,name:`Chile (+56)`},{country_code:`CN`,value:`86`,name:`China (+86)`},{country_code:`CO`,value:`57`,name:`Colombia (+57)`},{country_code:`KM`,value:`269`,name:`Comoros (+269)`},{country_code:`CG`,value:`242`,name:`Congo (+242)`},{country_code:`CK`,value:`682`,name:`Cook Islands (+682)`},{country_code:`CR`,value:`506`,name:`Costa Rica (+506)`},{country_code:`HR`,value:`385`,name:`Croatia (+385)`},{country_code:`CU`,value:`53`,name:`Cuba (+53)`},{country_code:`CY`,value:`90392`,name:`Cyprus North (+90392)`},{country_code:`CY`,value:`357`,name:`Cyprus South (+357)`},{country_code:`CZ`,value:`42`,name:`Czech Republic (+42)`},{country_code:`DK`,value:`45`,name:`Denmark (+45)`},{country_code:`DJ`,value:`253`,name:`Djibouti (+253)`},{country_code:`DM`,value:`1809`,name:`Dominica (+1809)`},{country_code:`DO`,value:`1809`,name:`Dominican Republic (+1809)`},{country_code:`EC`,value:`593`,name:`Ecuador (+593)`},{country_code:`EG`,value:`20`,name:`Egypt (+20)`},{country_code:`SV`,value:`503`,name:`El Salvador (+503)`},{country_code:`GQ`,value:`240`,name:`Equatorial Guinea (+240)`},{country_code:`ER`,value:`291`,name:`Eritrea (+291)`},{country_code:`EE`,value:`372`,name:`Estonia (+372)`},{country_code:`ET`,value:`251`,name:`Ethiopia (+251)`},{country_code:`FK`,value:`500`,name:`Falkland Islands (+500)`},{country_code:`FO`,value:`298`,name:`Faroe Islands (+298)`},{country_code:`FJ`,value:`679`,name:`Fiji (+679)`},{country_code:`FI`,value:`358`,name:`Finland (+358)`},{country_code:`FR`,value:`33`,name:`France (+33)`},{country_code:`GF`,value:`594`,name:`French Guiana (+594)`},{country_code:`PF`,value:`689`,name:`French Polynesia (+689)`},{country_code:`GA`,value:`241`,name:`Gabon (+241)`},{country_code:`GM`,value:`220`,name:`Gambia (+220)`},{country_code:`GE`,value:`7880`,name:`Georgia (+7880)`},{country_code:`DE`,value:`49`,name:`Germany (+49)`},{country_code:`GH`,value:`233`,name:`Ghana (+233)`},{country_code:`GI`,value:`350`,name:`Gibraltar (+350)`},{country_code:`GR`,value:`30`,name:`Greece (+30)`},{country_code:`GL`,value:`299`,name:`Greenland (+299)`},{country_code:`GD`,value:`1473`,name:`Grenada (+1473)`},{country_code:`GP`,value:`590`,name:`Guadeloupe (+590)`},{country_code:`GU`,value:`671`,name:`Guam (+671)`},{country_code:`GT`,value:`502`,name:`Guatemala (+502)`},{country_code:`GN`,value:`224`,name:`Guinea (+224)`},{country_code:`GW`,value:`245`,name:`Guinea - Bissau (+245)`},{country_code:`GY`,value:`592`,name:`Guyana (+592)`},{country_code:`HT`,value:`509`,name:`Haiti (+509)`},{country_code:`HN`,value:`504`,name:`Honduras (+504)`},{country_code:`HK`,value:`852`,name:`Hong Kong (+852)`},{country_code:`HU`,value:`36`,name:`Hungary (+36)`},{country_code:`IS`,value:`354`,name:`Iceland (+354)`},{country_code:`IN`,value:`91`,name:`India (+91)`},{country_code:`ID`,value:`62`,name:`Indonesia (+62)`},{country_code:`IR`,value:`98`,name:`Iran (+98)`},{country_code:`IQ`,value:`964`,name:`Iraq (+964)`},{country_code:`IE`,value:`353`,name:`Ireland (+353)`},{country_code:`IL`,value:`972`,name:`Israel (+972)`},{country_code:`IT`,value:`39`,name:`Italy (+39)`},{country_code:`JM`,value:`1876`,name:`Jamaica (+1876)`},{country_code:`JP`,value:`81`,name:`Japan (+81)`},{country_code:`JO`,value:`962`,name:`Jordan (+962)`},{country_code:`KZ`,value:`7`,name:`Kazakhstan (+7)`},{country_code:`KE`,value:`254`,name:`Kenya (+254)`},{country_code:`KI`,value:`686`,name:`Kiribati (+686)`},{country_code:`KP`,value:`850`,name:`Korea North (+850)`},{country_code:`KR`,value:`82`,name:`Korea South (+82)`},{country_code:`KW`,value:`965`,name:`Kuwait (+965)`},{country_code:`KG`,value:`996`,name:`Kyrgyzstan (+996)`},{country_code:`LA`,value:`856`,name:`Laos (+856)`},{country_code:`LV`,value:`371`,name:`Latvia (+371)`},{country_code:`LB`,value:`961`,name:`Lebanon (+961)`},{country_code:`LS`,value:`266`,name:`Lesotho (+266)`},{country_code:`LR`,value:`231`,name:`Liberia (+231)`},{country_code:`LY`,value:`218`,name:`Libya (+218)`},{country_code:`LI`,value:`417`,name:`Liechtenstein (+417)`},{country_code:`LT`,value:`370`,name:`Lithuania (+370)`},{country_code:`LU`,value:`352`,name:`Luxembourg (+352)`},{country_code:`MO`,value:`853`,name:`Macao (+853)`},{country_code:`MK`,value:`389`,name:`Macedonia (+389)`},{country_code:`MG`,value:`261`,name:`Madagascar (+261)`},{country_code:`MW`,value:`265`,name:`Malawi (+265)`},{country_code:`MY`,value:`60`,name:`Malaysia (+60)`},{country_code:`MV`,value:`960`,name:`Maldives (+960)`},{country_code:`ML`,value:`223`,name:`Mali (+223)`},{country_code:`MT`,value:`356`,name:`Malta (+356)`},{country_code:`MH`,value:`692`,name:`Marshall Islands (+692)`},{country_code:`MQ`,value:`596`,name:`Martinique (+596)`},{country_code:`MR`,value:`222`,name:`Mauritania (+222)`},{country_code:`YT`,value:`269`,name:`Mayotte (+269)`},{country_code:`MX`,value:`52`,name:`Mexico (+52)`},{country_code:`FM`,value:`691`,name:`Micronesia (+691)`},{country_code:`MD`,value:`373`,name:`Moldova (+373)`},{country_code:`MC`,value:`377`,name:`Monaco (+377)`},{country_code:`MN`,value:`976`,name:`Mongolia (+976)`},{country_code:`MS`,value:`1664`,name:`Montserrat (+1664)`},{country_code:`MA`,value:`212`,name:`Morocco (+212)`},{country_code:`MZ`,value:`258`,name:`Mozambique (+258)`},{country_code:`MN`,value:`95`,name:`Myanmar (+95)`},{country_code:`NA`,value:`264`,name:`Namibia (+264)`},{country_code:`NR`,value:`674`,name:`Nauru (+674)`},{country_code:`NP`,value:`977`,name:`Nepal (+977)`},{country_code:`NL`,value:`31`,name:`Netherlands (+31)`},{country_code:`NC`,value:`687`,name:`New Caledonia (+687)`},{country_code:`NZ`,value:`64`,name:`New Zealand (+64)`},{country_code:`NI`,value:`505`,name:`Nicaragua (+505)`},{country_code:`NE`,value:`227`,name:`Niger (+227)`},{country_code:`NG`,value:`234`,name:`Nigeria (+234)`},{country_code:`NU`,value:`683`,name:`Niue (+683)`},{country_code:`NF`,value:`672`,name:`Norfolk Islands (+672)`},{country_code:`NP`,value:`670`,name:`Northern Marianas (+670)`},{country_code:`NO`,value:`47`,name:`Norway (+47)`},{country_code:`OM`,value:`968`,name:`Oman (+968)`},{country_code:`PW`,value:`680`,name:`Palau (+680)`},{country_code:`PK`,value:`+92`,name:`Pakistan (+92)`},{country_code:`PA`,value:`507`,name:`Panama (+507)`},{country_code:`PG`,value:`675`,name:`Papua New Guinea (+675)`},{country_code:`PY`,value:`595`,name:`Paraguay (+595)`},{country_code:`PE`,value:`51`,name:`Peru (+51)`},{country_code:`PH`,value:`63`,name:`Philippines (+63)`},{country_code:`PL`,value:`48`,name:`Poland (+48)`},{country_code:`PT`,value:`351`,name:`Portugal (+351)`},{country_code:`PR`,value:`1787`,name:`Puerto Rico (+1787)`},{country_code:`QA`,value:`974`,name:`Qatar (+974)`},{country_code:`RE`,value:`262`,name:`Reunion (+262)`},{country_code:`RO`,value:`40`,name:`Romania (+40)`},{country_code:`RU`,value:`7`,name:`Russia (+7)`},{country_code:`RW`,value:`250`,name:`Rwanda (+250)`},{country_code:`SM`,value:`378`,name:`San Marino (+378)`},{country_code:`ST`,value:`239`,name:`Sao Tome \u0026amp; Principe (+239)`},{country_code:`SA`,value:`966`,name:`Saudi Arabia (+966)`},{country_code:`SN`,value:`221`,name:`Senegal (+221)`},{country_code:`CS`,value:`381`,name:`Serbia (+381)`},{country_code:`SC`,value:`248`,name:`Seychelles (+248)`},{country_code:`SL`,value:`232`,name:`Sierra Leone (+232)`},{country_code:`SG`,value:`65`,name:`Singapore (+65)`},{country_code:`SK`,value:`421`,name:`Slovak Republic (+421)`},{country_code:`SI`,value:`386`,name:`Slovenia (+386)`},{country_code:`SB`,value:`677`,name:`Solomon Islands (+677)`},{country_code:`SO`,value:`252`,name:`Somalia (+252)`},{country_code:`ZA`,value:`27`,name:`South Africa (+27)`},{country_code:`ES`,value:`34`,name:`Spain (+34)`},{country_code:`LK`,value:`94`,name:`Sri Lanka (+94)`},{country_code:`SH`,value:`290`,name:`St. Helena (+290)`},{country_code:`KN`,value:`1869`,name:`St. Kitts (+1869)`},{country_code:`SC`,value:`1758`,name:`St. Lucia (+1758)`},{country_code:`SD`,value:`249`,name:`Sudan (+249)`},{country_code:`SR`,value:`597`,name:`Suri (+597)`},{country_code:`SZ`,value:`268`,name:`Swaziland (+268)`},{country_code:`SE`,value:`46`,name:`Sweden (+46)`},{country_code:`CH`,value:`41`,name:`Switzerland (+41)`},{country_code:`SI`,value:`963`,name:`Syria (+963)`},{country_code:`TW`,value:`886`,name:`Taiwan (+886)`},{country_code:`TJ`,value:`7`,name:`Tajikstan (+7)`},{country_code:`TH`,value:`66`,name:`Thailand (+66)`},{country_code:`TG`,value:`228`,name:`Togo (+228)`},{country_code:`TO`,value:`676`,name:`Tonga (+676)`},{country_code:`TT`,value:`1868`,name:`Trinidad \u0026amp; Tobago (+1868)`},{country_code:`TN`,value:`216`,name:`Tunisia (+216)`},{country_code:`TR`,value:`90`,name:`Turkey (+90)`},{country_code:`TM`,value:`7`,name:`Turkmenistan (+7)`},{country_code:`TM`,value:`993`,name:`Turkmenistan (+993)`},{country_code:`TC`,value:`1649`,name:`Turks \u0026amp; Caicos Islands (+1649)`},{country_code:`TV`,value:`688`,name:`Tuvalu (+688)`},{country_code:`UG`,value:`256`,name:`Uganda (+256)`},{country_code:`UA`,value:`380`,name:`Ukraine (+380)`},{country_code:`AE`,value:`971`,name:`United Arab Emirates (+971)`},{country_code:`UY`,value:`598`,name:`Uruguay (+598)`},{country_code:`UZ`,value:`7`,name:`Uzbekistan (+7)`},{country_code:`VU`,value:`678`,name:`Vanuatu (+678)`},{country_code:`VA`,value:`379`,name:`Vatican City (+379)`},{country_code:`VE`,value:`58`,name:`Venezuela (+58)`},{country_code:`VN`,value:`84`,name:`Vietnam (+84)`},{country_code:`VG`,value:`84`,name:`Virgin Islands - British (+1284)`},{country_code:`VI`,value:`84`,name:`Virgin Islands - US (+1340)`},{country_code:`WF`,value:`681`,name:`Wallis \u0026amp; Futuna (+681)`},{country_code:`YE`,value:`969`,name:`Yemen (North)(+969)`},{country_code:`YE`,value:`967`,name:`Yemen (South)(+967)`},{country_code:`ZM`,value:`260`,name:`Zambia (+260)`},{country_code:`ZW`,value:`263`,name:`Zimbabwe (+263)`}];const[showModal,setShowModal]=useState(false);const[isLoading,setLoading]=useState(false);const[error,setError]=useState(null);const[country,setCountry]=useState({});const[selectedCountry,setSelectedCountry]=useState(null);const[isCountrySelectOpen,setIsCountrySelectOpen]=useState(false);const[selectedProduct,setSelectedProduct]=useState(productList.find(el=>el.type===productType));const[isProductSelectOpen,setIsProductSelectOpen]=useState(false);const form=useRef(null);const countrySelectRef=useRef(null);const productSelectRef=useRef(null);const currentFormData=useRef({});const getCookie=name=>{const result=new RegExp(`(?:^|; )`+encodeURIComponent(name)+`=([^;]*)`).exec(document.cookie);return result?result[1]:null};const toggleModal=()=>{const next=!showModal;setShowModal(next);document.body.style.overflow=next?`hidden`:`unset`};const listenToRevenueHeroWidget=event=>{if(event?.data?.type===`MEETING_BOOKED`){window.dataLayer?.push({event:`user_demo_booked`});window.sendAnalytics?.(`RevenueHero: Meeting Booked`,{product_interested_in:currentFormData.current.product_interested_in})}if(event?.data?.type===`CLOSE_DIALOG`){window.sendAnalytics?.(`RevenueHero: Pop Up Closed`,{product_interested_in:currentFormData.current.product_interested_in});window.removeEventListener(`message`,listenToRevenueHeroWidget)}};useEffect(()=>{if(!document.querySelector(`script[src=\"https://app.revenuehero.io/scheduler.min.js\"]`)){const script=document.createElement(`script`);script.type=`text/javascript`;script.src=`https://app.revenuehero.io/scheduler.min.js`;script.async=true;document.body.appendChild(script)}fetch(`https://auth.lambdatest.com/api/country-details`).then(res=>res.json()).then(result=>{setCountry(result||{});const found=countryList.find(e=>e.country_code==result?.iso_code);if(found){setSelectedCountry({name:found.name,value:result.calling_code,country_code:result.iso_code})}},()=>setError(`Failed to load country data`));const handleClickOutside=event=>{if(countrySelectRef.current\u0026\u0026!countrySelectRef.current.contains(event.target)){setIsCountrySelectOpen(false)}if(productSelectRef.current\u0026\u0026!productSelectRef.current.contains(event.target)){setIsProductSelectOpen(false)}};document.addEventListener(`mousedown`,handleClickOutside);return()=>{document.removeEventListener(`mousedown`,handleClickOutside);document.body.style.overflow=`unset`}},[]);const handleSubmit=async e=>{e.preventDefault();setLoading(true);setError(null);const{email,mobile_no,first_name,last_name,message}=form.current.elements;const formdata={email:email.value||``,mobile_no:mobile_no.value||``,first_name:first_name.value||``,product_interested_in:selectedProduct?selectedProduct.type:productType,last_name:last_name.value||``,isd_code:selectedCountry?selectedCountry.value:country.calling_code||``,message:message?message.value||``:``,source_page_url:window.location.href,source_page_title:document.title,query_type:`Schedule a Demo`,campaign_id:`701F9000001H1EdIAK`,source:`Web Submissions`,utm:getCookie(`utm`),gclid:getCookie(`gclid`)};currentFormData.current=formdata;try{const response=await fetch(`https://forms.lambdatest.com/api/forms/contact`,{method:`POST`,headers:{\"Content-type\":`application/json`},body:JSON.stringify(formdata)});if(!response.ok){const res=await response.json().catch(()=>({}));setError(res.message||`Something went wrong. Please try again.`);return}form.current.reset();window.dataLayer?.push({event:`book_a_demo_form_submitted`});if(formdata.email\u0026\u0026formdata.email.toLowerCase().endsWith(`gmail.com`)){window.sendAmplitudeEvents?.(`Demo_Schedule_Gmail`);window.location.href=`https://www.testmuai.com/thank-you/`;return}window.sendAnalytics?.(`book_a_demo_form_submitted`,{event:`book_a_demo_form_submitted`,eventAction:`success`,eventLabel:window.location.href});window.sendAmplitudeEvents?.(`Demo_Schedule`);const hero=new window.RevenueHero({routerId:`630`,showLoader:true});window.addEventListener(`message`,listenToRevenueHeroWidget);hero.submit({...formdata,...country}).then(data=>{hero.dialog.open(data);setShowModal(false);document.body.style.overflow=`unset`}).catch(err=>{console.log(err);window.removeEventListener(`message`,listenToRevenueHeroWidget)})}catch(err){setError(`Something went wrong. Please try again.`)}finally{setLoading(false)}};return _jsxs(_Fragment,{children:[_jsx(`div`,{className:`kane_cli_cta not-prose`,children:_jsxs(`div`,{className:`kane_cli_cta_box`,children:[_jsxs(`div`,{className:`kane_cli_cta_content`,children:[_jsx(`h2`,{children:`Terminal First Testing With Kane CLI`}),_jsx(`p`,{children:`Natural language browser \u0026 mobile app tests right from terminal.`}),_jsx(`button`,{type:`button`,className:`demoBtn`,onClick:toggleModal,children:`Book a Demo`})]}),_jsx(`img`,{loading:`lazy`,src:`https://assets.testmu.ai/resources/images/Terminal-KaneCLIIcon.svg`,alt:``,\"aria-hidden\":`true`,className:`kane_cli_cta_icon no-zoom`}),_jsx(`img`,{loading:`lazy`,src:`https://assets.testmu.ai/resources/images/Terminal-KaneCLI.png`,alt:`Kane CLI terminal`,title:`Kane CLI`,className:`kane_cli_cta_terminal no-zoom`})]})}),_jsx(`div`,{className:`demo_popup_overlay demo_popup_header_demo not-prose `+(showModal?`shown`:``),children:_jsx(`div`,{className:`content mint-text-left`,children:_jsx(`div`,{className:`demo_popup_box`,children:_jsxs(`div`,{className:`demo_popup_form`,children:[_jsx(`span`,{onClick:toggleModal,className:`demo_popup_close`,children:`×`}),_jsx(`div`,{className:`demo_popup_form_title`,children:`Schedule Your Personal Demo`}),_jsxs(`form`,{ref:form,onSubmit:handleSubmit,children:[_jsxs(`div`,{className:`demo_popup_grid`,children:[_jsx(`div`,{children:_jsx(`input`,{type:`text`,name:`first_name`,placeholder:`First Name`,required:true})}),_jsx(`div`,{children:_jsx(`input`,{type:`text`,name:`last_name`,placeholder:`Last Name`,required:true})})]}),_jsx(`div`,{className:`demo_popup_field`,children:_jsx(`input`,{type:`email`,name:`email`,placeholder:`Work Email Address`,pattern:`^[^\\\\s@]+@[^\\\\s@]+\\\\.[^\\\\s@]+$`,required:true})}),_jsx(`div`,{className:`demo_popup_field`,children:_jsxs(`div`,{className:`demo_popup_phone_row`,children:[_jsxs(`div`,{className:`demo_popup_select_wrapper`,ref:countrySelectRef,children:[_jsxs(`div`,{className:`demo_popup_select `+(isCountrySelectOpen?`demo_popup_select_open`:``),onClick:()=>setIsCountrySelectOpen(!isCountrySelectOpen),children:[_jsx(`span`,{className:`demo_popup_select_text`,children:selectedCountry?selectedCountry.name:`Select Country`}),_jsx(`span`,{className:`demo_popup_select_arrow`,children:_jsx(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:_jsx(`path`,{d:`M4 6L8 10L12 6`,stroke:`#4D4D4D`,strokeWidth:`1.25`,strokeLinecap:`square`})})})]}),isCountrySelectOpen\u0026\u0026_jsx(`ul`,{className:`demo_popup_select_options`,children:countryList.map((item,index)=>_jsx(`li`,{className:`demo_popup_select_option `+(selectedCountry\u0026\u0026selectedCountry.country_code===item.country_code?`demo_popup_select_option_selected`:``),onClick:()=>{setSelectedCountry({name:item.name,value:item.value,country_code:item.country_code});setIsCountrySelectOpen(false)},children:item.name},index))})]}),_jsx(`input`,{type:`tel`,name:`mobile_no`,placeholder:`Phone Number`,pattern:`\\\\d*`,maxLength:15,required:true})]})}),_jsx(`div`,{className:`demo_popup_field`,children:_jsxs(`label`,{children:[`Select Product`,_jsxs(`div`,{className:`demo_popup_select_wrapper`,ref:productSelectRef,children:[_jsxs(`div`,{className:`demo_popup_select demo_popup_product_select `+(isProductSelectOpen?`demo_popup_select_open`:``),onClick:()=>setIsProductSelectOpen(!isProductSelectOpen),children:[_jsx(`span`,{className:`demo_popup_select_text`,children:selectedProduct?selectedProduct.label:`Select Product`}),_jsx(`span`,{className:`demo_popup_select_arrow`,children:_jsx(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:_jsx(`path`,{d:`M4 6L8 10L12 6`,stroke:`#4D4D4D`,strokeWidth:`1.25`,strokeLinecap:`square`})})})]}),isProductSelectOpen\u0026\u0026_jsx(`ul`,{className:`demo_popup_select_options`,children:productList.map((el,index)=>_jsx(`li`,{className:`demo_popup_select_option `+(selectedProduct\u0026\u0026selectedProduct.type===el.type?`demo_popup_select_option_selected`:``),onClick:()=>{setSelectedProduct({label:el.label,type:el.type});setIsProductSelectOpen(false)},children:el.label},index))})]})]})}),_jsx(`div`,{className:`demo_popup_field`,children:_jsx(`textarea`,{name:`message`,className:`demo_popup_message`,placeholder:`Your message`})}),error\u0026\u0026_jsx(`div`,{className:`demo_popup_error`,children:error}),_jsx(`div`,{className:`demo_popup_action`,children:_jsx(`button`,{type:`submit`,className:`demo_popup_submit`,disabled:isLoading,children:`Schedule Demo`})})]})]})})})})]})};const BrandName=({type=`default`})=>{const getBrandName=()=>`TestMu AI`;const getBrandNameLowercase=()=>`testmu ai`;if(type===`lowercase`){return getBrandNameLowercase()}return getBrandName()};function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Tip,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Agent Mode outputs structured NDJSON instead of the interactive terminal UI. It’s how AI coding agents (Claude Code, Codex CLI, Gemini CLI) consume Kane CLI results: parse events programmatically, extract the final result, and present it to the user.`}),`\n`,_jsx(Heading,{level:`2`,id:`enable-agent-mode`,children:`Enable Agent Mode`}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`--agent`}),` to any run command:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`kane-cli`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Verify the checkout flow completes successfully\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://myapp.com`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --agent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --headless`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`--agent`}),` is active:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The interactive TUI is fully suppressed (no boot screen, no menus)`}),`\n`,_jsx(_components.li,{children:`stdout carries only NDJSON, one JSON object per line, and the progress UI goes to stderr`}),`\n`,_jsxs(_components.li,{children:[`When stdin is not a TTY, Kane CLI turns off `,_jsx(_components.code,{children:`ask_user`}),`, so the run never stops to wait for input (see below)`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Kane CLI also switches to NDJSON on its own when stdin is not a TTY, for example in CI. Pass `,_jsx(_components.code,{children:`--agent`}),` anyway, so the output format does not depend on how the shell is set up.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`--headless`}),` wherever there is no display, such as CI runners, containers, and SSH sessions, to avoid display server errors. On a desktop, a coding agent can leave the browser visible so you can watch the run.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`ndjson-output-format`,children:`NDJSON Output Format`}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`--agent`}),`, Kane CLI writes one JSON object per line (NDJSON) to stdout. Every line carries `,_jsx(_components.code,{children:`v`}),`, the stream contract version (currently `,_jsx(_components.code,{children:`1`}),`), and `,_jsx(_components.code,{children:`ts`}),`, the time the line was written. Here is a shortened `,_jsx(_components.code,{children:`kane-cli run`}),` stream. `,_jsx(_components.code,{children:`...`}),` marks lines and values left out, and the `,_jsx(_components.code,{children:`run_end`}),` line shows only some of its fields:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`9`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"stream_start\",\"cli_version\":\"0.9.0\",\"surface\":\"run\",\"pid\":16664,\"v\":1,\"ts\":\"2026-10-15T08:47:26.889Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"bifurcation\",\"flows\":[\"Navigate to https://example.com then verify the page heading says Example Domain\"],\"count\":1,\"v\":1,\"ts\":\"2026-10-15T08:47:39.435Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"step\":2,\"status\":\"running\",\"remark\":\"Step 1\",\"v\":1,\"ts\":\"2026-10-15T08:47:39.957Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"step\":2,\"status\":\"done\",\"remark\":\"navigate: Navigate to https://example.com\",\"v\":1,\"ts\":\"2026-10-15T08:47:39.958Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"step\":4,\"status\":\"done\",\"remark\":\"assert: the page heading says Example Domain\",\"v\":1,\"ts\":\"2026-10-15T08:47:54.260Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{\"type\":\"run_end\",\"status\":\"passed\",\"summary\":\"...\",\"reason\":\"Objective completed\",\"duration\":20.5,\"credits_consumed\":11.9,\"test_url\":\"https://test-manager.lambdatest.com/...\",\"session_dir\":\"...\",\"v\":1,\"ts\":\"2026-10-15T08:48:10.211Z\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Rules for parsing the stream:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`The first line is `,_jsx(_components.code,{children:`stream_start`}),`.`]}),` Its `,_jsx(_components.code,{children:`surface`}),` is `,_jsx(_components.code,{children:`run`}),`, `,_jsx(_components.code,{children:`testmd`}),`, or `,_jsx(_components.code,{children:`testrun`}),`, and `,_jsx(_components.code,{children:`cli_version`}),` names the Kane CLI release that wrote the stream.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`On a `,_jsx(_components.code,{children:`run`}),` stream, step lines have no `,_jsx(_components.code,{children:`type`}),` field.`]}),` A step prints a `,_jsx(_components.code,{children:`running`}),` line when it starts and a `,_jsx(_components.code,{children:`done`}),` or `,_jsx(_components.code,{children:`failed`}),` line when it ends, and the stream has no `,_jsx(_components.code,{children:`run_start`}),`, `,_jsx(_components.code,{children:`step_start`}),`, `,_jsx(_components.code,{children:`step_event`}),`, or `,_jsx(_components.code,{children:`step_end`}),` events. A `,_jsx(_components.code,{children:`testmd run`}),` stream is different: every line is typed, and each `,_jsx(_components.code,{children:`test_md_step_start`}),` and `,_jsx(_components.code,{children:`test_md_step_end`}),` pair wraps typed `,_jsx(_components.code,{children:`run_start`}),`, `,_jsx(_components.code,{children:`step_start`}),`, `,_jsx(_components.code,{children:`step_event`}),`, `,_jsx(_components.code,{children:`step_end`}),`, and `,_jsx(_components.code,{children:`run_end`}),` events for that step.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ignore fields and event types you do not recognize.`}),` New ones can appear in any release without a change to `,_jsx(_components.code,{children:`v`}),`. Skip any line that is not JSON.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`For a `,_jsx(_components.code,{children:`run`}),` that started, the last line is `,_jsx(_components.code,{children:`run_end`}),`.`]}),` A run refused before it starts can exit with code `,_jsx(_components.code,{children:`2`}),` and no `,_jsx(_components.code,{children:`run_end`}),` line, so check the exit code first.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Kane CLI also writes the same lines to `,_jsx(_components.code,{children:`events.ndjson`}),` in the session folder while the run is in progress.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`ndjson-event-schema`,children:`NDJSON Event Schema`}),`\n`,_jsxs(_components.p,{children:[`The tables below describe a `,_jsx(_components.code,{children:`kane-cli run`}),` stream. A `,_jsx(_components.code,{children:`testmd run`}),` stream is typed on every line and ends with `,_jsx(_components.code,{children:`test_md_done`}),`, and a `,_jsx(_components.code,{children:`testrun run`}),` stream uses its own `,_jsx(_components.code,{children:`testrun_*`}),` events. See `,_jsx(_components.a,{href:`#command-specific-completion`,children:`Command-Specific Completion`}),`.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`step-progress-lines-in-a-run-stream`,children:[`Step Progress Lines in a `,_jsx(_components.code,{children:`run`}),` Stream`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`step`})}),_jsx(_components.td,{children:`number`}),_jsxs(_components.td,{children:[`Step index. It can run one ahead of the step a person would count, because a `,_jsx(_components.code,{children:`bifurcation`}),` takes the first slot. To report steps taken, count the `,_jsx(_components.code,{children:`done`}),` and `,_jsx(_components.code,{children:`failed`}),` lines`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`running`}),` when the step starts, then `,_jsx(_components.code,{children:`done`}),` or `,_jsx(_components.code,{children:`failed`}),` when it ends`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`remark`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`What the agent did, or why the step failed`})]})]})]}),`\n`,_jsxs(Heading,{level:`3`,id:`typed-events-in-a-run-stream`,children:[`Typed Events in a `,_jsx(_components.code,{children:`run`}),` Stream`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Key Fields`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stream_start`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`cli_version`}),`, `,_jsx(_components.code,{children:`surface`}),`, `,_jsx(_components.code,{children:`pid`})]}),_jsxs(_components.td,{children:[`The first line of every stream. `,_jsx(_components.code,{children:`session_dir`}),` may also be present`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project_folder_auto_defaulted`})}),_jsx(_components.td,{children:`The project and folder Kane CLI chose (ID and name)`}),_jsx(_components.td,{children:`No Test Manager project or folder was configured, or the saved one was no longer valid, so Kane CLI picked one. Sent before the first step line`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bifurcation`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`flows[]`}),`, `,_jsx(_components.code,{children:`count`})]}),_jsx(_components.td,{children:`The agent split the objective into sub-flows`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`child_agent_start`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`child_id`}),`, `,_jsx(_components.code,{children:`objective`}),`, `,_jsx(_components.code,{children:`parent_step`})]}),_jsx(_components.td,{children:`A child agent started`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`child_agent_end`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`child_id`}),`, `,_jsx(_components.code,{children:`success`}),`, `,_jsx(_components.code,{children:`steps_taken`}),`, `,_jsx(_components.code,{children:`summary`})]}),_jsx(_components.td,{children:`A child agent finished`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ask_user`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`question`}),`, `,_jsx(_components.code,{children:`step_index`}),`, `,_jsx(_components.code,{children:`options`}),` (optional)`]}),_jsx(_components.td,{children:`The agent needs input (turned off automatically when stdin is not a TTY)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`warning`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`code`}),`, `,_jsx(_components.code,{children:`message`}),`, `,_jsx(_components.code,{children:`suggested_file`}),`, `,_jsx(_components.code,{children:`variables[]`})]}),_jsxs(_components.td,{children:[`A non-fatal warning, sent before the first step line (for example `,_jsx(_components.code,{children:`code: \"unresolved_variables\"`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`An error occurred`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`run_end`})}),_jsx(_components.td,{children:_jsx(_components.em,{children:`(see below)`})}),_jsxs(_components.td,{children:[`The final event of a `,_jsx(_components.code,{children:`run`}),` that started: always the last line`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`unresolved-variable-warning`,children:`Unresolved-Variable Warning`}),`\n`,_jsxs(_components.p,{children:[`Kane CLI checks every `,_jsx(_components.code,{children:`{{name}}`}),` in the objective before the run starts. If a name has no value, Kane CLI prints a warning and the run continues. The name is typed literally as written, unless a step sets its value first. With `,_jsx(_components.code,{children:`--agent`}),`, the warning is a single typed event, sent before the first progress event:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"warning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unresolved_variables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2 variable(s) have no value — typed as written unless a step sets them first\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"suggested_file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\".testmuai/variables/variables.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"variables\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:[{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"checkout_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"not_declared\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"used_by\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:[{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"objective\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"step\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}]},{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"login_password\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value_missing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\".testmuai/variables/variables.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"used_by\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:[{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"objective\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"step\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}]}]}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`reason`}),` is `,_jsx(_components.code,{children:`value_missing`}),`, `,_jsx(_components.code,{children:`not_declared`}),`, or `,_jsx(_components.code,{children:`not_a_dataset_column`}),`. The warning does not change the exit code. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-modes#unresolved-variables`,children:`Unresolved variables`}),` for what each reason means and which names are never checked.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`the-run_end-event`,children:[`The `,_jsx(_components.code,{children:`run_end`}),` Event`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`run_end`}),` is the last line of a `,_jsx(_components.code,{children:`kane-cli run`}),` that started, and it carries the complete result. A run refused before it starts, for example with no start URL, no sign-in, or no Chrome, can exit with code `,_jsx(_components.code,{children:`2`}),` and no `,_jsx(_components.code,{children:`run_end`}),` line. Check the exit code first, then read `,_jsx(_components.code,{children:`run_end`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"run_end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"passed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Searched for laptop and added first result to cart\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"one_liner\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Searched for laptop on Amazon and added to cart\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Objective completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45.2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"credits_consumed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`11.9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"final_state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$29.99\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"product_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Wireless Headphones\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"test_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://test-manager.lambdatest.com/projects/123/test-cases/456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_dir\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"~/.testmuai/kaneai/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"v\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-15T10:31:30.412Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`run_end`}),` can carry more fields than this example, such as `,_jsx(_components.code,{children:`context`}),` and `,_jsx(_components.code,{children:`result_code`}),`. Ignore the fields you do not need.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`run_end-fields`,children:[_jsx(_components.code,{children:`run_end`}),` Fields`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"passed\"`}),` or `,_jsx(_components.code,{children:`\"failed\"`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`summary`})}),_jsx(_components.td,{children:`What the agent did`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`one_liner`})}),_jsx(_components.td,{children:`A short, single-sentence summary for display`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reason`})}),_jsxs(_components.td,{children:[`A short label for why the run stopped, such as `,_jsx(_components.code,{children:`\"Objective completed\"`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`duration`})}),_jsx(_components.td,{children:`Run time in seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credits_consumed`})}),_jsxs(_components.td,{children:[`Credits the run used, as a decimal number, when reported. Round it for display. Older releases called this field `,_jsx(_components.code,{children:`credits`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`final_state`})}),_jsx(_components.td,{children:`Values saved with “store … as” in the objective`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`test_url`})}),_jsxs(_components.td,{children:[`Link to the test case in `,_jsx(_MdxComponentBoundary,{name:`BrandName`,children:_jsx(BrandName,{})}),` Test Manager. Present when the upload succeeded`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`session_dir`})}),_jsxs(_components.td,{children:[`The session folder. The sealed evidence pack is in its `,_jsx(_components.code,{children:`evidence/`}),` subfolder`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`run_dir`})}),_jsx(_components.td,{children:`Legacy. The folder it names is no longer created: run logs and screenshots are in the evidence pack`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`result_code`})}),_jsxs(_components.td,{children:[`Optional machine classification of the result. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-error-codes`,children:`Error Codes`}),`. With `,_jsx(_components.code,{children:`--bug-detection`}),`, a confirmed product bug arrives as `,_jsx(_components.code,{children:`result_code`}),` `,_jsx(_components.code,{children:`740`}),` with a `,_jsx(_components.code,{children:`verdict`}),` object`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`condition_results`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`--analyzer-only`}),` runs only: `,_jsx(_components.code,{children:`boolean[]`}),`, one verdict per `,_jsx(_components.code,{children:`--condition`}),`, in order. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-modes#assertion-controls-and-current-page-analysis`,children:`Assertion controls and current-page analysis`})]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`exit-codes-for-kane-cli-run`,children:[`Exit Codes for `,_jsx(_components.code,{children:`kane-cli run`})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsx(_components.td,{children:`The run passed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsxs(_components.td,{children:[`The run went ahead and did not pass, or the upload failed. Read the failing step’s `,_jsx(_components.code,{children:`remark`}),` and the evidence pack to tell a product bug from a test problem`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsxs(_components.td,{children:[`The run did not start, and no credits were used: sign-in, configuration, no start URL, Chrome, network, or an unknown subcommand. There may be no `,_jsx(_components.code,{children:`run_end`}),` line`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsxs(_components.td,{children:[`The run was canceled or hit `,_jsx(_components.code,{children:`--timeout`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`testmd run`}),`, `,_jsx(_components.code,{children:`testrun run`}),`, `,_jsx(_components.code,{children:`generate`}),`, and the assurance commands have their own exit codes. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-cli-reference#exit-codes`,children:`CLI Reference: Exit Codes`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`the-evidence-pack-for-each-run`,children:`The Evidence Pack for Each Run`}),`\n`,_jsxs(_components.p,{children:[`Every run seals an evidence pack: one `,_jsx(_components.code,{children:`.evidence`}),` file, a standard zip, that holds the test definition, a result summary, per-step screenshots (plus annotated copies that highlight the element the agent acted on), per-step browser console and network logs, run logs, and, when a step fails, a failure record for that step. The pack holds no video.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Command`}),_jsx(_components.th,{children:`Where the sealed pack is`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kane-cli run`})}),_jsxs(_components.td,{children:[`In the `,_jsx(_components.code,{children:`evidence/`}),` subfolder of `,_jsx(_components.code,{children:`session_dir`}),`. It is also copied to `,_jsx(_components.code,{children:`.testmuai/evidence/`}),` in your working directory when you name the run with `,_jsx(_components.code,{children:`--name`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kane-cli testmd run`})}),_jsxs(_components.td,{children:[`Copied to `,_jsx(_components.code,{children:`.testmuai/evidence/`}),` on every run`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kane-cli testrun run`})}),_jsxs(_components.td,{children:[`Created directly in `,_jsx(_components.code,{children:`.testmuai/evidence/`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`run_end`}),` has no field for the pack’s path. After the run, Kane CLI prints a hint line on stderr, not on stdout:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"evidence: view locally with `kane-cli evidence serve \u003cpath-to-pack>`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`kane-cli evidence serve`}),` serves sealed packs from your machine to the hosted viewer and uploads nothing. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-evidence`,children:`Evidence Packs`}),` and `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-evidence-debugging`,children:`How to Debug a Failed Kane CLI Run`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`parsing-the-run_end-result-in-a-script`,children:[`Parsing the `,_jsx(_components.code,{children:`run_end`}),` Result in a Script`]}),`\n`,_jsxs(_components.p,{children:[`Save stdout to a file, read the exit code, then pick the `,_jsx(_components.code,{children:`run_end`}),` line by its `,_jsx(_components.code,{children:`type`}),`. Selecting by `,_jsx(_components.code,{children:`type`}),` keeps the script working when a run never started and has no `,_jsx(_components.code,{children:`run_end`}),` line.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`kane-cli`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Go to https://example.com, store the page heading as 'heading', then verify it says Example Domain\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --agent`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --headless`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run.ndjson`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`$?`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"exit code: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$code`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 2: the run did not start, and there may be no run_end line`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The full result`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -cR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fromjson? | select(.type == \"run_end\")'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run.ndjson`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Just the status`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fromjson? | select(.type == \"run_end\") | .status'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run.ndjson`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# A value saved with \"store ... as 'heading'\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rR`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'fromjson? | select(.type == \"run_end\") | .final_state.heading'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run.ndjson`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fromjson?`}),` skips any line that is not JSON. When the run started, `,_jsx(_components.code,{children:`run_end`}),` is also the last line, so `,_jsx(_components.code,{children:`tail -n 1 run.ndjson`}),` returns it too.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`command-specific-completion`,children:`Command-Specific Completion`}),`\n`,_jsxs(_components.p,{children:[`Reading the last `,_jsx(_components.code,{children:`run_end`}),` event works for one-shot `,_jsx(_components.code,{children:`run`}),` only. Other commands end with their own completion event:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`testmd run`})}),`: read `,_jsx(_components.code,{children:`test_md_done`}),` for `,_jsx(_components.code,{children:`overall_status`}),`, `,_jsx(_components.code,{children:`duration_s`}),`, `,_jsx(_components.code,{children:`session_id`}),`, and the optional `,_jsx(_components.code,{children:`share_url`}),`. The stream can also contain `,_jsx(_components.code,{children:`run_end`}),` events; these finish individual steps, not the file.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Local `,_jsx(_components.code,{children:`testrun run`}),` suites`]}),`: end with `,_jsx(_components.code,{children:`testrun_done`}),`. Suites dispatched to the remote grid then also emit `,_jsx(_components.code,{children:`remote_done`}),`; keep its `,_jsx(_components.code,{children:`status`}),`, `,_jsx(_components.code,{children:`exit`}),`, and `,_jsx(_components.code,{children:`sessions_path`}),` fields.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`generate`})}),`: ends with `,_jsx(_components.code,{children:`generate_done`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Assurance commands`}),`: conversational agent streams end with `,_jsx(_components.code,{children:`done`}),`. The review and read commands have their own completion contracts.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Always check the process exit code too: an early refusal, an invalid plan, or a dry run can exit without the normal completion event.`}),`\n`,_jsxs(_components.p,{children:[`Progress events are meant for live display. When you count completions, count only `,_jsx(_components.code,{children:`done`}),` and `,_jsx(_components.code,{children:`failed`}),`. Step indices can repeat, so keep track of which child agent and execution each event belongs to.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`testrun run`}),` prints its NDJSON stream when stdin is not a TTY, or when you pass `,_jsx(_components.code,{children:`--agent`}),`. See `,_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-testrun#for-agents-ndjson-events`,children:`Batch runs (testrun)`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`handling-ask_user-events`,children:[`Handling `,_jsx(_components.code,{children:`ask_user`}),` Events`]}),`\n`,_jsxs(_components.p,{children:[`If an objective requires user input mid-run, Kane CLI fires `,_jsx(_components.code,{children:`ask_user`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ask_user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Which item should I select?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"options\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Small\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Large\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]}`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ask_user`}),` is `,_jsx(_components.strong,{children:`turned off automatically when stdin is not a TTY`}),`. In CI/CD and AI agent contexts, stdin is never a TTY, so `,_jsx(_components.code,{children:`ask_user`}),` never fires. Write objectives that don’t require interactive prompts.`]})}),`\n`,_jsx(_components.p,{children:`If stdin IS a TTY, respond by writing JSON to stdin:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"answer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`To cancel:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cancel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`agent-mode-vs-interactive-mode`,children:`Agent Mode vs Interactive Mode`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsxs(_components.th,{children:[`Agent Mode (`,_jsx(_components.code,{children:`--agent`}),`)`]}),_jsx(_components.th,{children:`Interactive Mode`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`TUI`}),_jsx(_components.td,{children:`Suppressed`}),_jsx(_components.td,{children:`Full terminal UI`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output`}),_jsx(_components.td,{children:`NDJSON to stdout`}),_jsx(_components.td,{children:`Formatted text`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Stderr`}),_jsx(_components.td,{children:`Progress UI and hint lines, such as the evidence pack path`}),_jsx(_components.td,{children:`Logs + progress UI`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Use case`}),_jsx(_components.td,{children:`AI agents, programmatic tools`}),_jsx(_components.td,{children:`Human development`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-error-codes`,children:`Error Codes`}),`: Complete reference of `,_jsx(_components.code,{children:`result_code`}),` values and recommended actions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-evidence`,children:`Evidence Packs`}),`: What every run captures and how to view it`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-parallel-execution`,children:`Parallel Execution`}),`: Run multiple tests concurrently`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-skills`,children:`Skills`}),`: Install the Kane CLI skill for Claude, Codex, or Gemini`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://www.testmuai.com/docs/kane-cli-cli-reference`,children:`CLI Reference`}),`: Full flag and command reference`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://github.com/LambdaTest/kane-cli/blob/main/skill-installer/skills/references/parsing.md`,children:`Skill parsing reference`}),`: The NDJSON schema the Kane CLI skill follows`]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`KaneCliCta`,children:_jsx(KaneCliCta,{})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{KaneCliCta,BrandName,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"How to Use Kane CLI Agent Mode","sidebarTitle":"Agent Mode","description":"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.","keywords":["kane cli agent mode","ndjson","kaneai","testmu ai","ai agent integration","claude code","codex cli"],"og:description":"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.","href":"/docs/kane-cli-agent-mode"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[149,22143,"null;const BrandName=()=>null;function _"]]},"mdxExtracts":{"tableOfContents":[{"title":"Enable Agent Mode","slug":"enable-agent-mode","depth":2,"children":[]},{"title":"NDJSON Output Format","slug":"ndjson-output-format","depth":2,"children":[]},{"title":"NDJSON Event Schema","slug":"ndjson-event-schema","depth":2,"children":[{"title":"Step Progress Lines in a run Stream","slug":"step-progress-lines-in-a-run-stream","depth":3,"children":[]},{"title":"Typed Events in a run Stream","slug":"typed-events-in-a-run-stream","depth":3,"children":[]},{"title":"Unresolved-Variable Warning","slug":"unresolved-variable-warning","depth":3,"children":[]}]},{"title":"The run_end Event","slug":"the-run_end-event","depth":2,"children":[{"title":"run_end Fields","slug":"run_end-fields","depth":3,"children":[]}]},{"title":"Exit Codes for kane-cli run","slug":"exit-codes-for-kane-cli-run","depth":2,"children":[]},{"title":"The Evidence Pack for Each Run","slug":"the-evidence-pack-for-each-run","depth":2,"children":[]},{"title":"Parsing the run_end Result in a Script","slug":"parsing-the-run_end-result-in-a-script","depth":2,"children":[]},{"title":"Command-Specific Completion","slug":"command-specific-completion","depth":2,"children":[]},{"title":"Handling ask_user Events","slug":"handling-ask_user-events","depth":2,"children":[]},{"title":"Agent Mode vs Interactive Mode","slug":"agent-mode-vs-interactive-mode","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/lambdatest-f4bdd228/3a744b38f2f2092a/custom.js","/docs/_mintlify/custom/lambdatest-f4bdd228/55cb39448772d821/scripts/generate-llms-txt.js","/docs/_mintlify/custom/lambdatest-f4bdd228/ff4b8e1ac54e68db/scripts/generate-sitemap.js"],"dynamicCss":".mint-text-left {\n text-align: left\n}","subdomain":"lambdatest-f4bdd228","siteName":"TestMu AI","title":"How to Use Kane CLI Agent Mode - TestMu AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T07:02:48.814Z","originalFileLocation":"docs/kane-cli-agent-mode.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TestMu AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"How to Use Kane CLI Agent Mode - TestMu AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TestMu AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.testmuai.com/docs/kane-cli-agent-mode\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lambdatest-f4bdd228.mintlify.site/docs/_mintlify/api/og/v2?division=Agent+Mode\u0026amp;title=How+to+Use+Kane+CLI+Agent+Mode\u0026amp;description=Use+the+--agent+flag+to+get+structured+NDJSON+output+from+Kane+CLI%3A+designed+for+AI+coding+agents+like+Claude+Code%2C+Codex+CLI%2C+and+Gemini+CLI.\u0026amp;theme=2d57483ffcf9c49b558710bf\u0026amp;signature=e1ac2528d7229784f0b4d497a418673b6976e62d136424760d346e39cedd1be2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"How to Use Kane CLI Agent Mode - TestMu AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lambdatest-f4bdd228.mintlify.site/docs/_mintlify/api/og/v2?division=Agent+Mode\u0026amp;title=How+to+Use+Kane+CLI+Agent+Mode\u0026amp;description=Use+the+--agent+flag+to+get+structured+NDJSON+output+from+Kane+CLI%3A+designed+for+AI+coding+agents+like+Claude+Code%2C+Codex+CLI%2C+and+Gemini+CLI.\u0026amp;theme=2d57483ffcf9c49b558710bf\u0026amp;signature=e1ac2528d7229784f0b4d497a418673b6976e62d136424760d346e39cedd1be2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/lambdatest-f4bdd228/8K07mt4WjvnIhLtu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TestMu AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c24e00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.testmuai.com/docs/kane-cli-agent-mode\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/docs/kane-cli-agent-mode.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.testmuai.com/#organization\",\"name\":\"TestMu AI\",\"url\":\"https://www.testmuai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lambdatest-f4bdd228/vjKoxtouKdApUfYX/logo/light.svg?fit=max\u0026auto=format\u0026n=vjKoxtouKdApUfYX\u0026q=85\u0026s=99f56597c24dac27d2534aa7dc97b091\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.testmuai.com#website\",\"name\":\"TestMu AI\",\"url\":\"https://www.testmuai.com\",\"publisher\":{\"@id\":\"https://www.testmuai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.testmuai.com/docs/kane-cli-agent-mode#webpage\",\"url\":\"https://www.testmuai.com/docs/kane-cli-agent-mode\",\"name\":\"How to Use Kane CLI Agent Mode\",\"description\":\"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\",\"dateModified\":\"2026-11-11T07:02:48.814Z\",\"isPartOf\":{\"@id\":\"https://www.testmuai.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.testmuai.com/docs/kane-cli-agent-mode#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.testmuai.com/docs/kane-cli-agent-mode#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Kane CLI\",\"item\":\"https://www.testmuai.com/docs/kane-cli-introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Kane CLI Agent Mode\",\"item\":\"https://www.testmuai.com/docs/kane-cli-agent-mode\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.testmuai.com/docs/kane-cli-agent-mode#article\",\"headline\":\"How to Use Kane CLI Agent Mode\",\"name\":\"How to Use Kane CLI Agent Mode\",\"description\":\"Use the --agent flag to get structured NDJSON output from Kane CLI: designed for AI coding agents like Claude Code, Codex CLI, and Gemini CLI.\",\"url\":\"https://www.testmuai.com/docs/kane-cli-agent-mode\",\"mainEntityOfPage\":{\"@id\":\"https://www.testmuai.com/docs/kane-cli-agent-mode#webpage\"},\"dateModified\":\"2026-11-11T07:02:48.814Z\",\"keywords\":\"kane cli agent mode, ndjson, kaneai, testmu ai, ai agent integration, claude code, codex cli\",\"publisher\":{\"@id\":\"https://www.testmuai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.testmuai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TestMu AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TestMu AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/docs/kane-cli-agent-mode.md","siteName":"TestMu AI","nav":{"global":{"anchors":[{"anchor":"Back to TestMu AI Docs","icon":"arrow-left","href":"https://www.testmuai.com/support/docs/"},{"anchor":"Status","icon":"signal","href":"https://status.lambdatest.io/"},{"anchor":"Blog","icon":"newspaper","href":"https://www.testmuai.com/blog/"}]},"tabs":[{"tab":"Docs","icon":"book-open-lines","pages":[{"group":"Kane CLI","pages":[{"group":"Getting Started","pages":[{"title":"Kane CLI: AI Test Automation Overview","sidebarTitle":"Introduction","href":"/docs/kane-cli-introduction"},{"title":"How to Install Kane CLI","sidebarTitle":"Installation","href":"/docs/kane-cli-installation"},{"title":"How to Run Your First Kane CLI Test","sidebarTitle":"Quick Start","href":"/docs/kane-cli-quickstart"},{"title":"How to Authenticate Kane CLI","sidebarTitle":"Authentication","href":"/docs/kane-cli-authentication"}]},{"group":"Core Concepts","pages":[{"title":"Kane CLI Modes: TUI, Headless \u0026 Agent","sidebarTitle":"Modes","href":"/docs/kane-cli-modes"},{"title":"How to Write Kane CLI Objectives","sidebarTitle":"Writing Objectives","href":"/docs/kane-cli-writing-objectives"},{"title":"How to Make API Calls with Kane CLI","sidebarTitle":"API Calls","href":"/docs/kane-cli-api-calls"},{"title":"How to Set Browser State in Kane CLI","sidebarTitle":"Browser State","href":"/docs/kane-cli-browser-state"},{"title":"How to Use Variables in Kane CLI","sidebarTitle":"Variables \u0026 Context","href":"/docs/kane-cli-variables-and-context"},{"title":"How to Configure Kane CLI","sidebarTitle":"Configuration","href":"/docs/kane-cli-configuration"},{"title":"How to Upload Kane CLI Tests to Test Manager","sidebarTitle":"Test Manager Integration","href":"/docs/kane-cli-tms-integration"},{"group":"Test.md","pages":[{"title":"How to Write Kane CLI Tests in Markdown","sidebarTitle":"Test.md","href":"/docs/kane-cli-testmd"},{"title":"Composing Tests (@import)","sidebarTitle":"Composing Tests (@import)","href":"/docs/kane-cli-testmd-composition"},{"title":"Running test.md Files","sidebarTitle":"Running test.md Files","href":"/docs/kane-cli-testmd-running"}]},{"group":"Batch Runs (testrun)","pages":[{"title":"Batch Runs (testrun)","sidebarTitle":"Batch Runs (testrun)","href":"/docs/kane-cli-testrun"},{"title":"Remote Runs on the Cloud Grid","sidebarTitle":"Remote Runs","href":"/docs/kane-cli-remote-execution"}]}]},{"group":"Mobile Testing","pages":[{"title":"How to Test Mobile Apps with Kane CLI","sidebarTitle":"Overview","href":"/docs/kane-cli-mobile"},{"title":"How to Test on Real Android and iOS Devices with Kane CLI","sidebarTitle":"Real Devices","href":"/docs/kane-cli-mobile-real-device"}]},{"group":"Use Cases","pages":[{"title":"Kane CLI Use Cases by Category","sidebarTitle":"Use Cases","href":"/docs/kane-cli-use-cases"},{"title":"API Testing Use Cases","sidebarTitle":"API Testing","href":"/docs/api-testing-with-kane-cli"},{"title":"How to Use Kane CLI with AI Coding Agents","sidebarTitle":"AI Coding Agents","href":"/docs/kane-cli-with-ai-coding-agents"},{"title":"E-commerce Testing Use Cases","sidebarTitle":"E-commerce Testing","href":"/docs/kane-cli-ecommerce-testing"},{"title":"Payments Testing Use Cases","sidebarTitle":"Payments Testing","href":"/docs/kane-cli-payments-testing"},{"title":"DevTools and Performance Testing Use Cases","sidebarTitle":"DevTools \u0026 Performance","href":"/docs/kane-cli-devtools-performance-testing"},{"title":"Security and Access Control Testing Use Cases","sidebarTitle":"Security \u0026 Access","href":"/docs/kane-cli-security-access-testing"},{"title":"CI/CD and DevOps Testing Use Cases","sidebarTitle":"CI/CD \u0026 DevOps","href":"/docs/kane-cli-cicd-devops-testing"},{"title":"Regression and End-to-End Testing Use Cases","sidebarTitle":"Regression \u0026 E2E","href":"/docs/kane-cli-regression-e2e-testing"},{"title":"Test Generation and Exploration Use Cases","sidebarTitle":"Test Generation \u0026 Exploration","href":"/docs/kane-cli-test-generation-exploration"},{"title":"Mobile App Testing Use Cases","sidebarTitle":"Mobile App Testing","href":"/docs/kane-cli-mobile-app-testing"}]},{"group":"Generate Test Cases","pages":[{"title":"How to Generate Test Cases with Kane CLI","sidebarTitle":"Overview","href":"/docs/kane-cli-generate"},{"title":"How to Use the Kane CLI Generate Flow","sidebarTitle":"Workflow","href":"/docs/kane-cli-generate-workflow"}]},{"group":"Assurance","pages":[{"title":"The Kane CLI Assurance Lifecycle","sidebarTitle":"Overview","href":"/docs/kane-cli-assurance"},{"title":"How to Build the Kane CLI Context Graph","sidebarTitle":"Context Graph","href":"/docs/kane-cli-assurance-context"},{"title":"Requirement Sources","sidebarTitle":"Requirement Sources","href":"/docs/kane-cli-assurance-sources"},{"title":"How to Design Kane CLI Tests from Use-Cases","sidebarTitle":"Designing Tests","href":"/docs/kane-cli-assurance-design"},{"title":"How to Measure Kane CLI Test Coverage","sidebarTitle":"Coverage","href":"/docs/kane-cli-assurance-coverage"},{"title":"How to Maintain a Kane CLI Test Suite","sidebarTitle":"Maintaining the Suite","href":"/docs/kane-cli-assurance-maintain"},{"title":"Sharing the Context Graph with Your Team","sidebarTitle":"Sharing with Your Team","href":"/docs/kane-cli-assurance-sharing"},{"title":"How to Run Kane CLI Assurance in CI","sidebarTitle":"Agents \u0026 CI","href":"/docs/kane-cli-assurance-automation"}]},{"group":"Exploration","pages":[{"title":"Exploration: Map Your App and Design Tests from It","sidebarTitle":"Exploration","href":"/docs/kane-cli-exploration"}]},{"group":"Evidence","pages":[{"title":"Kane CLI Evidence Packs Explained","sidebarTitle":"Overview","href":"/docs/kane-cli-evidence"},{"title":"Kane CLI Evidence Pack Structure","sidebarTitle":"Pack Structure","href":"/docs/kane-cli-evidence-pack-structure"},{"title":"How to View Kane CLI Evidence Packs","sidebarTitle":"Viewing Evidence","href":"/docs/kane-cli-evidence-viewing"},{"title":"How to Validate Kane CLI Evidence Packs","sidebarTitle":"Validating Packs","href":"/docs/kane-cli-evidence-validate"},{"title":"How to Merge Kane CLI Evidence Packs","sidebarTitle":"Merging Packs","href":"/docs/kane-cli-evidence-merge"},{"title":"How to Debug a Failed Kane CLI Run","sidebarTitle":"Debugging from a Pack","href":"/docs/kane-cli-evidence-debugging"},{"title":"The Kane CLI .evidence Format","sidebarTitle":"The .evidence Format","href":"/docs/kane-cli-evidence-format"}]},{"group":"Checkpoints","pages":[{"title":"How to Use Checkpoints in Kane CLI","sidebarTitle":"Overview","href":"/docs/kane-cli-checkpoints"},{"title":"How to Assert Visuals in Kane CLI","sidebarTitle":"Visual","href":"/docs/kane-cli-checkpoint-visual"},{"title":"How to Assert DOM Values in Kane CLI","sidebarTitle":"Textual (DOM)","href":"/docs/kane-cli-checkpoint-textual"},{"title":"How to Assert the URL in Kane CLI","sidebarTitle":"URL","href":"/docs/kane-cli-checkpoint-url"},{"title":"How to Assert the Page Title in Kane CLI","sidebarTitle":"Title","href":"/docs/kane-cli-checkpoint-title"},{"group":"DevTools","pages":[{"title":"How to Assert DevTools Data in Kane CLI","sidebarTitle":"Overview","href":"/docs/kane-cli-checkpoint-devtools"},{"title":"How to Assert Network Traffic in Kane CLI","sidebarTitle":"Network","href":"/docs/kane-cli-checkpoint-devtools-network"},{"title":"How to Assert Console Logs in Kane CLI","sidebarTitle":"Console","href":"/docs/kane-cli-checkpoint-devtools-console"},{"title":"How to Assert Performance in Kane CLI","sidebarTitle":"Performance","href":"/docs/kane-cli-checkpoint-devtools-performance"},{"title":"How to Assert Cookies in Kane CLI","sidebarTitle":"Cookies","href":"/docs/kane-cli-checkpoint-devtools-cookies"},{"title":"How to Assert localStorage in Kane CLI","sidebarTitle":"localStorage","href":"/docs/kane-cli-checkpoint-devtools-localstorage"},{"title":"How to Assert Clipboard in Kane CLI","sidebarTitle":"Clipboard","description":"Verify what a Copy button actually copied, extract copied values into variables, and confirm clipboard state, using an isolated test clipboard.","href":"/docs/kane-cli-checkpoint-devtools-clipboard"}]}]},{"group":"Agent Mode","pages":[{"title":"How to Use Kane CLI Agent Mode","sidebarTitle":"Agent Mode","href":"/docs/kane-cli-agent-mode"},{"title":"How to Run Kane CLI Tests in Parallel","sidebarTitle":"Parallel Execution","description":"Run multiple independent Kane CLI browser tests in parallel using shell background processes or AI agent sub-tasks.","href":"/docs/kane-cli-parallel-execution"}]},{"group":"CI/CD \u0026 Skills","pages":[{"title":"How to Run Kane CLI in CI/CD","sidebarTitle":"CI/CD","href":"/docs/kane-cli-cicd"},{"title":"How to Use Kane CLI in AI Coding Agents","sidebarTitle":"Skills","href":"/docs/kane-cli-skills"},{"title":"Kane CLI AGENTS.md: Agent MD File for Coding Agents","sidebarTitle":"AGENTS.md","href":"/docs/kane-cli-agents-md"},{"title":"Kane CLI Plugin for Claude Code","sidebarTitle":"Claude Code Plugin","href":"/docs/kane-cli-claude-code-plugin"}]},{"group":"Reference","pages":[{"title":"Kane CLI Command \u0026 Flag Reference","sidebarTitle":"CLI Reference","href":"/docs/kane-cli-cli-reference"},{"title":"Kane CLI Error \u0026 Result Codes Reference","sidebarTitle":"Error Codes","href":"/docs/kane-cli-error-codes"},{"group":"Troubleshooting","pages":[{"title":"How to Troubleshoot Kane CLI Issues","sidebarTitle":"Troubleshooting","href":"/docs/kane-cli-troubleshooting"},{"title":"sharp Install Failure","sidebarTitle":"sharp Install Failure","href":"/docs/kane-cli-troubleshooting-sharp"}]},{"title":"Kane CLI Changelog \u0026 Release Notes","sidebarTitle":"Changelog","href":"/docs/kane-cli-changelog"}]}]}]}]},"basePath":"","title":"How to Use Kane CLI Agent Mode - TestMu AI","buildId":"dpl_FGqRJUoJWfds4SqdfFGJ2v1vVNSs","deploymentId":"dpl_FGqRJUoJWfds4SqdfFGJ2v1vVNSs","dynamics":[],"chunks":[]}