This feature is currently in beta and available to select customers. The exact
CLI commands, API shapes, and workflow details may evolve during the beta
period.
Overview
Tusk’s unit test generation experience is primarily designed around pull requests, merge requests, and the Tusk web app. The CLI and agent workflow beta extends that experience to local developer environments. With this beta, developers and coding agents (e.g., Claude Code, Codex, etc) can work with Tusk-generated test results in a more direct, machine-friendly way. This is especially useful for teams that already use local coding agents and want those agents to help review, refine, and incorporate Tusk’s output within agent workflows.Use Cases
This is designed around three use cases:- Retrieve Tusk test generation results — fetch the latest run for a branch and pull its generated test scenarios and code, in JSON.
- Let local agents iterate on tests — use Tusk’s scenarios as a starting point, refine them locally without waiting on another remote cycle.
- Send feedback back to Tusk — report which scenarios were useful, which were incorporated, and what should improve in future runs.
Agent Skills
Tusk ships a ready-to-use agent skill —tusk-unit-tests — so your coding agent can pull up the tests Tusk generated, help you decide which ones are worth keeping, and apply them to your branch.
tusk-unit-tests or wire their own skill on top of the CLI primitives below.
Example Workflow
1
Tusk generates unit tests for a PR or MR
Tusk continues to generate tests in the cloud as part of its normal pull
request or merge request workflow.
2
A developer or coding agent retrieves the latest run
The CLI returns machine-readable output so a local agent can inspect the
run and its generated scenarios.
3
The agent reviews and applies selected tests
The agent surfaces which tests are worth keeping, the developer confirms
the selection, and the tests land in the local checkout ready to run.
4
Feedback is sent back to Tusk
The developer or agent reports which scenarios were useful and which tests
were incorporated, so Tusk can improve future runs.
Principles
We are designing this workflow around a few principles:- Agent-friendly by default: outputs should be easy to parse and consume programmatically
- Local iteration when it matters: developers and agents should be able to refine tests without waiting on a full remote cycle
- Clear ownership: Tusk suggests and generates, while the developer or local agent decides what to keep
- Feedback loops back into the product: beta feedback should directly improve scenario quality and incorporation UX
Example CLI Workflow
Below is an example of the kind of workflow we are targeting in the beta.1. Retrieve the latest Tusk run for a branch
in_progress, completed, cancelled, skipped, error.
2. Fetch the full run details
3. Fetch one test scenario
4. Pull the generated test changes locally
file_type is one of test_file | source_file | auxiliary_file | unknown. scenario_ids correlates each file diff back to the scenarios that contributed to it — useful when a user only wants to adopt a subset.
Returning the generated test changes as file-level unified diffs is often the safest workflow for local development. It lets a developer or coding agent review the proposed changes, apply them selectively, and resolve conflicts against local state when needed. Pipe the output through jq and git apply for a one-shot adoption:
5. Provide feedback back to Tusk
positive_feedback values: covers_critical_path, valid_edge_case, caught_a_bug, other.
Allowed negative_feedback values: incorrect_business_assumption, duplicates_existing_test, no_value, incorrect_assertion, poor_coding_practice, other.
For a run that went in the wrong overall direction (wrong mocks, wrong symbols, wrong strategy), submit run-level guidance and trigger a fresh run in the same call with --retry:
--retry only when the fixes are too broad to make locally.
This feedback helps Tusk improve future test generation, and teams that want more direct control can also manage repo-specific instructions on the Customization page.