sekee-cli
The command-line interface for pushing XML test reports into Sekee from CI or a developer machine.
@sekee/sekee-cli
Installing
npm install -g @sekee/sekee-cli
Or run it without installing anything:
npx @sekee/sekee-cli upload-reports --help
Authentication
Every command reads a token from the SEKEE_API_TOKEN environment
variable. Create one at Administration → API Tokens; it is shown once.
# Linux / macOS
export SEKEE_API_TOKEN="your-api-token-here"
# Windows PowerShell
$env:SEKEE_API_TOKEN = "your-api-token-here"
To persist it locally, add the export to your shell profile:
echo 'export SEKEE_API_TOKEN="your-api-token-here"' >> ~/.zshrc
In CI, set it as a secret. Never commit it.
The token carries the organization, so it is also what scopes the upload. There is no separate organization argument.
Choosing a workflow
| Situation | Use |
|---|---|
| One test job, one report (or a directory of them), finishing at once | upload-reports |
| Parallel shards or suites finishing at different times | init → thread → complete |
upload-reports
Uploads one or more XML reports and creates a completed run in one step.
sekee-cli upload-reports \
--url <api-url> \
--name <run-name> \
--projectID <project-id> \
--source <source-name> \
--reports <reports-path> \
[--tags <comma-separated-tags>]
| Option | Alias | Description | Required |
|---|---|---|---|
--url | -u | Base URL of your Sekee API | Yes |
--name | -n | Name for the automation run | Yes |
--projectID | -p | Project ID (org-scoped) | Yes |
--source | -s | Source name for the run | Yes |
--reports | -r | Reports directory or glob pattern | Yes |
--tags | -t | Comma-separated tags | No |
--reports accepts either a directory — in which case every **/*.xml
underneath it is collected — or a glob pattern. If it matches nothing, the
command fails rather than creating an empty run.
sekee-cli upload-reports \
--url https://api.sekee.io \
--name "Nightly Regression Tests" \
--projectID 1 \
--source "GitHub Actions" \
--tags "regression,nightly" \
--reports "./cypress/reports"
init
Creates a run with status running and prints its Run ID. Use this when several jobs will report into the same run.
sekee-cli init \
--url <api-url> \
--name <run-name> \
--projectID <project-id> \
--source <source-name> \
[--tags <comma-separated-tags>]
| Option | Alias | Description | Required |
|---|---|---|---|
--url | -u | Base URL of your API | Yes |
--name | -n | Name for the run | Yes |
--projectID | -p | Project ID (org-scoped) | Yes |
--source | -s | Source name | Yes |
--tags | -t | Comma-separated tags | No |
sekee-cli init \
--url https://api.sekee.io \
--name "PR #42 Tests" \
--projectID 1 \
--source "CI" \
--tags "pr,automated"
# Output: Run ID: 5
Capture that id — every later call needs it.
thread
Appends a single XML report to a running run. The run's counts are incremented automatically. Call it once per worker or suite.
sekee-cli thread \
--url <api-url> \
--runId <run-id> \
--name <thread-name> \
--report <xml-file-path>
| Option | Alias | Description | Required |
|---|---|---|---|
--url | -u | Base URL of your API | Yes |
--runId | -i | Run ID returned by init | Yes |
--name | -n | Name of this thread/worker | Yes |
--report | -r | Path to one XML report | Yes |
Note the singular: thread takes --report, one file. upload-reports takes
--reports, a directory or glob.
sekee-cli thread \
--url https://api.sekee.io \
--runId 5 \
--name "Worker 1 - Login Tests" \
--report "./reports/worker1-results.xml"
complete
Marks a running run as completed. Call it after every thread has finished.
sekee-cli complete --url <api-url> --runId <run-id>
| Option | Alias | Description | Required |
|---|---|---|---|
--url | -u | Base URL of your API | Yes |
--runId | -i | Run ID returned by init | Yes |
A run left un-completed stays running forever and reads as a job that never
came back — which is sometimes exactly the signal you want, so Sekee does not
time it out for you.
The multi-step workflow end to end
# 1. Open a run
sekee-cli init \
--url https://api.sekee.io \
--name "PR #42 Tests" \
--projectID 1 --source "CI" --tags "pr,automated"
# → Run ID: 5
# 2. Each worker reports into it
sekee-cli thread --url https://api.sekee.io --runId 5 --name "Worker 1" --report "./reports/w1.xml"
sekee-cli thread --url https://api.sekee.io --runId 5 --name "Worker 2" --report "./reports/w2.xml"
sekee-cli thread --url https://api.sekee.io --runId 5 --name "Worker 3" --report "./reports/w3.xml"
# 3. Close it
sekee-cli complete --url https://api.sekee.io --runId 5
Environment variables
| Variable | Description | Required |
|---|---|---|
SEKEE_API_TOKEN | API token, from Administration → API Tokens | Yes |
Errors
| Error | Cause |
|---|---|
SEKEE_API_TOKEN not found | The environment variable is not set |
403 Forbidden | Invalid, expired, or missing API token |
400 Bad Request | Missing required fields, or the project was not found |
404 Not Found | The run id does not exist (thread / complete) |
No XML files found using pattern: … | --reports matched nothing |
What it talks to
For the endpoints behind these commands, see the ingestion API reference.