toscactl CLI Reference
toscactl is a CLI for Tricentis Tosca Cloud.
Critical Rules
- Always append
--json --silent to every toscactl command. Never parse human-readable table output.
- When a command fails, first run
toscactl config --json --silent to check if authentication and workspace are configured. If not, invoke /tosca-login to guide the user through login.
Global Flags
These flags apply to every command:
| Flag |
Description |
--json |
Output results as JSON |
-s, --silent |
Suppress all output except results |
--workspace <NAME_OR_ID> |
Override the active workspace for this command (name or id); not persisted |
Use --workspace in CI pipelines to target a specific workspace without calling workspaces set. The persisted configuration is never modified. Example:
toscactl --workspace "My Project" --json --silent playlists run start <PLAYLIST_ID>
Available Slash Commands
/tosca-login — Log in to Tosca Cloud (detects configured URL or prompts for one)
/tosca-setup — Login and configure workspace
/tosca-find — Search for assets or playlists
/tosca-run — Execute a playlist and wait for results
/tosca-status — View playlist details, run results, or history
/tosca-execution — View test steps, logs, or JUnit results for a test case execution
/tosca-create-workspace — Create a new workspace
/tosca-create-playlist — Create a new playlist
/tosca-delete-workspace — Delete a workspace
/tosca-delete-playlist — Delete a playlist
/tosca-agents — List, view, shut down, or delete execution agents
/tosca-datasets — List, view, create, and manage test data sets
/tosca-import-dataset — Import a CSV, Excel, or JSON file as a new data set
/tosca-export-dataset — Export a data set to CSV, Excel, or JSON
Command Reference
Authentication
toscactl login --url <tenant>.my.tricentis.com [--headless]
- Opens browser for PKCE authentication by default.
- Use
--headless for device code flow (CI/headless environments).
- Set
TOSCA_CLIENT_ID and TOSCA_CLIENT_SECRET environment variables for non-interactive client credentials authentication.
Configuration
toscactl config
Shows current tenant URL and active workspace.
Workspaces
toscactl workspaces list
toscactl workspaces create <name> [--description TEXT] [--access-type public|private] [--import-examples] [--asset-library]
toscactl workspaces set <name_or_id>
toscactl workspaces view <name_or_id>
toscactl workspaces delete <name_or_id> [--dangerously-skip-confirmation]
<name_or_id> accepts either a workspace name or UUID.
create makes a new workspace. Name must be 1-64 characters, no special characters (/ \ : . ~ & % ; @ ' " ? < > | # $ * } { , + = [ ]).
delete is irreversible. Without --dangerously-skip-confirmation, it prompts the user to type the workspace name to confirm. In --silent/--json mode, the flag is required.
Assets
toscactl assets find [--type TYPE] [--name NAME] [--tag TAG...] [--sort FIELD:DIR] [--page-size N] [--all]
- Types: TestCase, Module, SharedAction, Playlist, ApiAction, ApiMessage, Folder, TestCaseTemplate
- Tags:
--tag is repeatable with AND logic. E.g. --tag smoke --tag regression returns assets matching both tags.
- Sort format:
fieldName:asc or fieldName:desc (common fields: updatedAt, name)
--all fetches all pages (use sparingly on large result sets).
Playlists
toscactl playlists create <name> [--description TEXT] [--test-case NAME_OR_ID...] [--run-mode parallel|sequential|sequentialOnSameAgent] [--characteristic KEY=VALUE...] [--cron-schedule EXPR] [--keep-recordings-on-success]
toscactl playlists delete <name_or_id> [--dangerously-skip-confirmation]
toscactl playlists find [--name NAME] [--sort FIELD:DIR] [--page-size N] [--all] [--results]
toscactl playlists view <name_or_id>
toscactl playlists history <name_or_id> [--page-size N] [--all]
create makes a new playlist. --test-case is repeatable and accepts names or UUIDs. Names are resolved via inventory search; ambiguous names produce an error. Test case identifiers can also be piped via stdin (one per line). Default run mode is sequential.
delete is irreversible. Without --dangerously-skip-confirmation, it prompts the user to type the playlist name to confirm. In --silent/--json mode, the flag is required.
--results includes last run result status in the find output.
view shows playlist details with test cases and last run results.
history shows run history for a playlist.
Playlist Runs
toscactl playlists run start <name_or_id> [--private] [--param KEY=VALUE...] [--wait] [--assert-success] [--report FORMAT --report-path PATH]
toscactl playlists run view <run_id> [--assert-success]
--param is repeatable for multiple parameter overrides.
--private runs the playlist as a private execution.
--wait blocks until the run completes, polling every 5 seconds and showing live progress.
--assert-success on run start makes the command exit non-zero when the final state is not succeeded. Requires --wait (passing it alone is rejected). On run view, exits non-zero only when the state is failed or canceled (non-terminal states like running/pending still exit 0). Intended for CI pipelines.
--report FORMAT writes a results report to disk after the run reaches a terminal state. Currently supports junit (JUnit XML). Requires --report-path. Implies --wait. The report is written before --assert-success is evaluated, so failing runs still produce a file.
--report-path PATH sets the output file path for the report (required when --report is used).
run view shows detailed results including per-test-case status.
Agents
toscactl agents list [--state connected|disconnected] [--agent-state idle|executing] [--hosted] [--self-hosted] [--characteristic KEY=VALUE...] [--sort FIELD:DIR] [--page-size N] [--all]
toscactl agents view <id>
toscactl agents shutdown <id> [--on-idle]
toscactl agents delete <id> [--dangerously-skip-confirmation]
toscactl agents screenshot <id> [--open]
list shows all agents (self-hosted and Tricentis-hosted). Use --hosted or --self-hosted to filter by type. --characteristic is repeatable for filtering by agent characteristics (e.g. --characteristic os=Windows --characteristic browser=Chrome).
view shows detailed agent information including characteristics. For hosted agents, also shows initialization status.
shutdown shuts down an agent. --on-idle waits until the agent finishes its current execution (self-hosted only).
delete removes a self-hosted agent registration. Irreversible. Without --dangerously-skip-confirmation, it prompts the user to type the agent ID to confirm. Not available for hosted agents.
screenshot retrieves the live view screenshot URL. --open opens the URL in the default browser. Works for both self-hosted and Tricentis-hosted agents.
Executions
toscactl executions attachments --type test-steps|logs|junit --run <run_id> --test-case <name_or_builder_id>
- Fetches an attachment for a specific test case within a playlist run.
--type test-steps shows the test step hierarchy in a table (name, action mode, state, value, duration).
--type logs prints plain-text execution logs.
--type junit prints the JUnit XML report.
--test-case matches by builder ID first, then by name. If a name matches multiple test cases, use the builder ID.
Datasets
toscactl datasets create <name> [--strategy circular|used-row]
toscactl datasets list [--page-size N] [--all]
toscactl datasets view <name_or_id> [--page-size N] [--all]
toscactl datasets import <file> [--timeout 300] [--no-wait]
toscactl datasets export <name_or_id> --format csv|excel|json [--output PATH] [--sort-column COL] [--direction asc|desc]
toscactl datasets add-column <name_or_id> --name <column> --type string|double|boolean|datetime
toscactl datasets add-row <name_or_id> --value COL=VAL [--value COL=VAL ...]
toscactl datasets delete-row <name_or_id> --row <row_id> [--dangerously-skip-confirmation]
toscactl datasets next-row <name_or_id> [--mark-as-used] [--subset <name_or_id>] [--json-flat] [--execution-run ID --unit-execution ID]
toscactl datasets list-subsets <name_or_id>
toscactl datasets view-subset <name_or_id> <subset_name_or_id> [--page-size N] [--all]
toscactl datasets use-row <name_or_id> --row <row_id> [--execution-run ID --unit-execution ID]
toscactl datasets reuse-row <name_or_id> --row <row_id> [--row <row_id> ...]
toscactl datasets lock <name_or_id>
toscactl datasets unlock <name_or_id>
toscactl datasets delete <name_or_id> [--dangerously-skip-confirmation]
<name_or_id> accepts either a dataset name (case-insensitive) or ID.
create makes an empty dataset. --strategy sets the data row consumption strategy.
import uploads a CSV, Excel, or JSON file to Azure Blob Storage and creates a dataset. --no-wait returns the job ID immediately.
export downloads the dataset in the specified format. Defaults output path to dataset_<id>.<ext>.
add-column adds a column. Column types: string, double, boolean, datetime.
add-row adds a row. --value is repeatable. Column names are resolved to IDs automatically and values are converted based on column data type.
next-row fetches the next unused row. --mark-as-used consumes the row. --subset scopes to a subset by name or ID. --json-flat outputs column-name-keyed JSON (requires --json).
list-subsets lists all subsets of a dataset.
view-subset shows subset details (metadata, filter, creation/modification info) and the subset's data rows. <subset_name_or_id> accepts a subset name (case-insensitive) or ID.
use-row marks a single row as consumed. --execution-run and --unit-execution must be provided together.
reuse-row marks one or more rows as available for reuse. --row is repeatable.
delete and delete-row are irreversible. Without --dangerously-skip-confirmation, they prompt for confirmation.
view shows metadata and row contents with a status column (Used/empty) and row IDs.
Interactive UI
toscactl ui
- Launches an interactive terminal UI with keyboard-driven navigation for browsing assets and playlists.
JSON Piping
Any JSON object piped to stdin is parsed and its keys injected as CLI flags. Named keys become --key value flags; numeric keys ("0", "1", ...) become positional arguments. CLI-provided flags take precedence over piped JSON.
This allows chaining commands without xargs or shell variable assignment:
# View the latest run of a playlist
toscactl playlists history --page-size 1 --json --silent "My Playlist" \
| jq '{"0": .[0].id}' \
| toscactl playlists run view --json --silent
# Show test steps for a test case from the latest run
toscactl playlists history --page-size 1 --json --silent "My Playlist" \
| jq '{"0": .[0].id}' \
| toscactl playlists run view --json --silent \
| jq '{ run: .id, "test-case": (.items[] | select(.name == "My Test Case") | .builderId) }' \
| toscactl executions attachments --type test-steps
Global Flags
| Flag |
Effect |
--json |
Output as JSON instead of table |
--silent / -s |
Suppress all output except results |
1---2name: toscactl-reference3description: Use when the user mentions Tosca, toscactl, test automation, playlists, test cases, modules, workspaces, or any Tricentis Tosca Cloud concepts. Provides the full toscactl CLI reference for answering questions and using the tool correctly.4---56# toscactl CLI Reference78`toscactl` is a CLI for Tricentis Tosca Cloud.910## Critical Rules1112- **Always** append `--json --silent` to every `toscactl` command. Never parse human-readable table output.13- When a command fails, first run `toscactl config --json --silent` to check if authentication and workspace are configured. If not, invoke `/tosca-login` to guide the user through login.1415## Global Flags1617These flags apply to every command:1819| Flag | Description |20|-----------------------------|----------------------------------------------------------------------------|21| `--json` | Output results as JSON |22| `-s, --silent` | Suppress all output except results |23| `--workspace <NAME_OR_ID>` | Override the active workspace for this command (name or id); not persisted |2425Use `--workspace` in CI pipelines to target a specific workspace without calling `workspaces set`. The persisted configuration is never modified. Example:2627```bash28toscactl --workspace "My Project" --json --silent playlists run start <PLAYLIST_ID>29```3031## Available Slash Commands3233- `/tosca-login` — Log in to Tosca Cloud (detects configured URL or prompts for one)34- `/tosca-setup` — Login and configure workspace35- `/tosca-find` — Search for assets or playlists36- `/tosca-run` — Execute a playlist and wait for results37- `/tosca-status` — View playlist details, run results, or history38- `/tosca-execution` — View test steps, logs, or JUnit results for a test case execution39- `/tosca-create-workspace` — Create a new workspace40- `/tosca-create-playlist` — Create a new playlist41- `/tosca-delete-workspace` — Delete a workspace42- `/tosca-delete-playlist` — Delete a playlist43- `/tosca-agents` — List, view, shut down, or delete execution agents44- `/tosca-datasets` — List, view, create, and manage test data sets45- `/tosca-import-dataset` — Import a CSV, Excel, or JSON file as a new data set46- `/tosca-export-dataset` — Export a data set to CSV, Excel, or JSON4748## Command Reference4950### Authentication5152```53toscactl login --url <tenant>.my.tricentis.com [--headless]54```5556- Opens browser for PKCE authentication by default.57- Use `--headless` for device code flow (CI/headless environments).58- Set `TOSCA_CLIENT_ID` and `TOSCA_CLIENT_SECRET` environment variables for non-interactive client credentials authentication.5960### Configuration6162```63toscactl config64```6566Shows current tenant URL and active workspace.6768### Workspaces6970```71toscactl workspaces list72toscactl workspaces create <name> [--description TEXT] [--access-type public|private] [--import-examples] [--asset-library]73toscactl workspaces set <name_or_id>74toscactl workspaces view <name_or_id>75toscactl workspaces delete <name_or_id> [--dangerously-skip-confirmation]76```7778- `<name_or_id>` accepts either a workspace name or UUID.79- `create` makes a new workspace. Name must be 1-64 characters, no special characters (`/ \ : . ~ & % ; @ ' " ? < > | # $ * } { , + = [ ]`).80- `delete` is irreversible. Without `--dangerously-skip-confirmation`, it prompts the user to type the workspace name to confirm. In `--silent`/`--json` mode, the flag is required.8182### Assets8384```85toscactl assets find [--type TYPE] [--name NAME] [--tag TAG...] [--sort FIELD:DIR] [--page-size N] [--all]86```8788- **Types:** TestCase, Module, SharedAction, Playlist, ApiAction, ApiMessage, Folder, TestCaseTemplate89- **Tags:** `--tag` is repeatable with AND logic. E.g. `--tag smoke --tag regression` returns assets matching both tags.90- **Sort format:** `fieldName:asc` or `fieldName:desc` (common fields: `updatedAt`, `name`)91- `--all` fetches all pages (use sparingly on large result sets).9293### Playlists9495```96toscactl playlists create <name> [--description TEXT] [--test-case NAME_OR_ID...] [--run-mode parallel|sequential|sequentialOnSameAgent] [--characteristic KEY=VALUE...] [--cron-schedule EXPR] [--keep-recordings-on-success]97toscactl playlists delete <name_or_id> [--dangerously-skip-confirmation]98toscactl playlists find [--name NAME] [--sort FIELD:DIR] [--page-size N] [--all] [--results]99toscactl playlists view <name_or_id>100toscactl playlists history <name_or_id> [--page-size N] [--all]101```102103- `create` makes a new playlist. `--test-case` is repeatable and accepts names or UUIDs. Names are resolved via inventory search; ambiguous names produce an error. Test case identifiers can also be piped via stdin (one per line). Default run mode is `sequential`.104- `delete` is irreversible. Without `--dangerously-skip-confirmation`, it prompts the user to type the playlist name to confirm. In `--silent`/`--json` mode, the flag is required.105- `--results` includes last run result status in the find output.106- `view` shows playlist details with test cases and last run results.107- `history` shows run history for a playlist.108109### Playlist Runs110111```112toscactl playlists run start <name_or_id> [--private] [--param KEY=VALUE...] [--wait] [--assert-success] [--report FORMAT --report-path PATH]113toscactl playlists run view <run_id> [--assert-success]114```115116- `--param` is repeatable for multiple parameter overrides.117- `--private` runs the playlist as a private execution.118- `--wait` blocks until the run completes, polling every 5 seconds and showing live progress.119- `--assert-success` on `run start` makes the command exit non-zero when the final state is not `succeeded`. Requires `--wait` (passing it alone is rejected). On `run view`, exits non-zero only when the state is `failed` or `canceled` (non-terminal states like `running`/`pending` still exit 0). Intended for CI pipelines.120- `--report FORMAT` writes a results report to disk after the run reaches a terminal state. Currently supports `junit` (JUnit XML). Requires `--report-path`. Implies `--wait`. The report is written **before** `--assert-success` is evaluated, so failing runs still produce a file.121- `--report-path PATH` sets the output file path for the report (required when `--report` is used).122- `run view` shows detailed results including per-test-case status.123124### Agents125126```127toscactl agents list [--state connected|disconnected] [--agent-state idle|executing] [--hosted] [--self-hosted] [--characteristic KEY=VALUE...] [--sort FIELD:DIR] [--page-size N] [--all]128toscactl agents view <id>129toscactl agents shutdown <id> [--on-idle]130toscactl agents delete <id> [--dangerously-skip-confirmation]131toscactl agents screenshot <id> [--open]132```133134- `list` shows all agents (self-hosted and Tricentis-hosted). Use `--hosted` or `--self-hosted` to filter by type. `--characteristic` is repeatable for filtering by agent characteristics (e.g. `--characteristic os=Windows --characteristic browser=Chrome`).135- `view` shows detailed agent information including characteristics. For hosted agents, also shows initialization status.136- `shutdown` shuts down an agent. `--on-idle` waits until the agent finishes its current execution (self-hosted only).137- `delete` removes a self-hosted agent registration. Irreversible. Without `--dangerously-skip-confirmation`, it prompts the user to type the agent ID to confirm. Not available for hosted agents.138- `screenshot` retrieves the live view screenshot URL. `--open` opens the URL in the default browser. Works for both self-hosted and Tricentis-hosted agents.139140### Executions141142```143toscactl executions attachments --type test-steps|logs|junit --run <run_id> --test-case <name_or_builder_id>144```145146- Fetches an attachment for a specific test case within a playlist run.147- `--type test-steps` shows the test step hierarchy in a table (name, action mode, state, value, duration).148- `--type logs` prints plain-text execution logs.149- `--type junit` prints the JUnit XML report.150- `--test-case` matches by builder ID first, then by name. If a name matches multiple test cases, use the builder ID.151152### Datasets153154```155toscactl datasets create <name> [--strategy circular|used-row]156toscactl datasets list [--page-size N] [--all]157toscactl datasets view <name_or_id> [--page-size N] [--all]158toscactl datasets import <file> [--timeout 300] [--no-wait]159toscactl datasets export <name_or_id> --format csv|excel|json [--output PATH] [--sort-column COL] [--direction asc|desc]160toscactl datasets add-column <name_or_id> --name <column> --type string|double|boolean|datetime161toscactl datasets add-row <name_or_id> --value COL=VAL [--value COL=VAL ...]162toscactl datasets delete-row <name_or_id> --row <row_id> [--dangerously-skip-confirmation]163toscactl datasets next-row <name_or_id> [--mark-as-used] [--subset <name_or_id>] [--json-flat] [--execution-run ID --unit-execution ID]164toscactl datasets list-subsets <name_or_id>165toscactl datasets view-subset <name_or_id> <subset_name_or_id> [--page-size N] [--all]166toscactl datasets use-row <name_or_id> --row <row_id> [--execution-run ID --unit-execution ID]167toscactl datasets reuse-row <name_or_id> --row <row_id> [--row <row_id> ...]168toscactl datasets lock <name_or_id>169toscactl datasets unlock <name_or_id>170toscactl datasets delete <name_or_id> [--dangerously-skip-confirmation]171```172173- `<name_or_id>` accepts either a dataset name (case-insensitive) or ID.174- `create` makes an empty dataset. `--strategy` sets the data row consumption strategy.175- `import` uploads a CSV, Excel, or JSON file to Azure Blob Storage and creates a dataset. `--no-wait` returns the job ID immediately.176- `export` downloads the dataset in the specified format. Defaults output path to `dataset_<id>.<ext>`.177- `add-column` adds a column. Column types: `string`, `double`, `boolean`, `datetime`.178- `add-row` adds a row. `--value` is repeatable. Column names are resolved to IDs automatically and values are converted based on column data type.179- `next-row` fetches the next unused row. `--mark-as-used` consumes the row. `--subset` scopes to a subset by name or ID. `--json-flat` outputs column-name-keyed JSON (requires `--json`).180- `list-subsets` lists all subsets of a dataset.181- `view-subset` shows subset details (metadata, filter, creation/modification info) and the subset's data rows. `<subset_name_or_id>` accepts a subset name (case-insensitive) or ID.182- `use-row` marks a single row as consumed. `--execution-run` and `--unit-execution` must be provided together.183- `reuse-row` marks one or more rows as available for reuse. `--row` is repeatable.184- `delete` and `delete-row` are irreversible. Without `--dangerously-skip-confirmation`, they prompt for confirmation.185- `view` shows metadata and row contents with a status column (Used/empty) and row IDs.186187### Interactive UI188189```190toscactl ui191```192193- Launches an interactive terminal UI with keyboard-driven navigation for browsing assets and playlists.194195## JSON Piping196197Any JSON object piped to stdin is parsed and its keys injected as CLI flags. Named keys become `--key value` flags; numeric keys (`"0"`, `"1"`, ...) become positional arguments. CLI-provided flags take precedence over piped JSON.198199This allows chaining commands without `xargs` or shell variable assignment:200201```bash202# View the latest run of a playlist203toscactl playlists history --page-size 1 --json --silent "My Playlist" \204 | jq '{"0": .[0].id}' \205 | toscactl playlists run view --json --silent206207# Show test steps for a test case from the latest run208toscactl playlists history --page-size 1 --json --silent "My Playlist" \209 | jq '{"0": .[0].id}' \210 | toscactl playlists run view --json --silent \211 | jq '{ run: .id, "test-case": (.items[] | select(.name == "My Test Case") | .builderId) }' \212 | toscactl executions attachments --type test-steps213```214215## Global Flags216217| Flag | Effect |218|------|--------|219| `--json` | Output as JSON instead of table |220| `--silent` / `-s` | Suppress all output except results |