Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

CLI command reference

Reference for every tc command, covering the test lifecycle, Test Management, mobile apps, sessions, rules, and skills.

Each command hands a prepared task to the same agent that answers a plain prompt. When no command fits, describe the task in plain language instead.

Test lifecycle

Command Description
tc generate [subject] Generate test cases for the current project, or for a live page with --url <url>. Add --save-to-tm to save them to Test Management.
tc test [instructions] Run the project’s test suite on BrowserStack and report the build URL and a pass or fail summary. The command detects Playwright, Cypress, and WebdriverIO.
tc rca --build <url\|number> Analyze the root cause of a failing build. The command summarizes each failing test and its likely cause.
tc fix [description] \| --build <id> Diagnose and fix a failing test. The agent locates the test in your repository, finds the root cause, applies a fix, and explains the change. Add --app or --platform for a mobile test.
tc validate <path\|description> Validate test cases for structure, coverage, and correctness, and report issues with suggested fixes.
tc results [--build <id>] Fetch BrowserStack test results and summarize pass and fail counts and notable failures.

Test Management

The tc tm commands read and write BrowserStack Test Management directly. List commands return results without the agent. When you push an update, the last write wins.

Browse

Command Description
tc tm projects List projects. Filter with --search. Paginate with --page, --limit, or --all.
tc tm folders -p <project> List the folders in a project.
tc tm cases -p <project> -f <folder> List the test cases in a folder.

Create, edit, and sync

Command Description
tc tm create Scaffold a test case template, or create one or more test cases in Test Management.
tc tm create-project <name> Create a project.
tc tm create-folder [project] <name> Create a folder or subfolder in a project.
tc tm pull [TC-id...] Export test cases to local YAML or CSV files.
tc tm push <file...> Push local YAML test case files back to Test Management. The last write wins.
tc tm edit Edit a test case.
tc tm review [TC-id...] Review pending generated test cases. List, edit, approve, or reject them.

Automate a saved test case

Command Description
tc automate <TC-id> [TC-id...] Turn one or more Test Management test cases into automated tests. The agent writes each test and runs it.

Most tc tm commands accept --json for scripting. When you omit -p or --project, the command uses your selected project.

Mobile apps

The tc app commands drive a real device on BrowserStack App Automate. Upload an app to get a bs:// ID, then explore or automate the app.

Command Description
tc app apps List your recently uploaded apps.
tc app upload <path> Upload an .apk, .ipa, or .aab file and print its bs:// ID.
tc app run --app <bs://id\|path> "<task>" Run a mobile testing task on a real device.
tc app generate --app <bs://id\|path> [instructions] Explore the app on a real device and generate test cases. Add --save-to-tm to save them to Test Management.

Inside an interactive session, type /app <id|path> [android|ios] to switch to mobile mode. Type /app with no arguments to open a searchable picker of your uploaded apps. In the picker, press Enter to automate the highlighted app, or press g to explore it and generate test cases.

The tc mobile command is a deprecated alias for tc app. It still works, but use tc app in new scripts.

Sessions and history

The CLI saves every run. You can resume a past session or inspect what happened in it.

Command Description
tc history list List your past sessions.
tc history show Show the details of a past session.
tc resume <task-id> [message] Resume a past session. Add a message to continue it with a new instruction.

On every task, tc takes a checkpoint, which is a snapshot of your workspace, so you can roll changes back. The CLI keeps the snapshots of the 100 most recently active tasks and removes older ones automatically. To keep fewer, run tc checkpoints prune --keep 20. Add --dry-run to preview what the command removes.

Rules and skills

Rules give the agent always-on guidance. Skills give it reusable capabilities. Both live in your project under .claude/ and load automatically. To learn how to write them, see Rules and Skills.

Command Description
tc rules <list\|new\|edit\|rm> Manage agent rules. List them, create and open a new one, edit one, or delete one.
tc skills <list\|new\|edit\|rm> Manage agent skills. List them, scaffold a new one from a prompt, edit one, or delete one.
tc agent-skill Install the tc skill into Claude Code so that Claude Code can drive tc headlessly. Add --print claude-code, --print cursor, or --print generic to print the skill or rules file instead of installing it.

More commands

Command Description
tc pr Open a GitHub pull request for the current changes.
tc usage Show AI credit usage against your plan or group allowance.
tc feedback [task_id] Send feedback for a task as a thumbs up, a thumbs down, or a rating from 1 to 5.
tc report-bug [message] Report a bug to the Test Companion team.
tc config Read and write settings.
tc upgrade Update tc to the latest released version.
tc version Print the installed version. Same as tc --version.
tc mcp ... Run tc as a Model Context Protocol (MCP) server, or manage the external MCP servers the agent connects to. Available only when MCP is enabled for your account.

Next steps

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle