Skip to content

Commit 18f6e6e

Browse files
committed
release: v0.1.2
- Onboarding consolidated into `testsprite setup` (formerly `init`); the granular auth commands remain as hidden, deprecated aliases. - CLI reports its version in the User-Agent header. - README: the launch video no longer renders as a bare URL on npm.
1 parent 4b33601 commit 18f6e6e

31 files changed

Lines changed: 1092 additions & 294 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to `@testsprite/testsprite-cli` are documented here. The for
44

55
## [Unreleased]
66

7+
## [0.1.2] - 2026-06-19
8+
9+
### Added
10+
11+
- **`testsprite setup`** — the onboarding command is now named `setup` (formerly `init`): configure your API key, verify it, and install the verification-loop skill for your coding agent in one shot. The old `init` name keeps working as a hidden, deprecated alias.
12+
13+
### Changed
14+
15+
- Onboarding consolidation — `setup` is now the single credential-writing command. The former granular commands are kept as hidden, deprecated aliases: `auth configure``setup`, `auth whoami``auth status`, `auth logout``auth remove`.
16+
- The CLI now reports its version in the `User-Agent` header on each request.
17+
718
## [0.1.1] - 2026-06-12
819

920
### Changed

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ npm run test:coverage # Vitest with v8 coverage (>= 80% gate)
3333
```
3434

3535
Unit tests are mock-based and run with no external dependencies — this is the
36-
suite contributors run locally and in CI. A separate live end-to-end suite
37-
(`npm run test:dev`) runs against an internal TestSprite backend and requires
38-
maintainer credentials; it is not needed to contribute.
36+
full suite contributors need to run locally and in CI.
3937

4038
## Lint, format, and type-check
4139

DOCUMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ testsprite project list --dry-run --output json
4848

4949
## Manual setup
5050

51-
The recommended path is `testsprite init` (see the [README quickstart](./README.md#quickstart)). If you prefer to configure each step separately:
51+
The recommended path is `testsprite setup` (see the [README quickstart](./README.md#quickstart)). If you prefer to configure each step separately:
5252

5353
### 1. Authenticate
5454

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<a href="https://www.testsprite.com">
44
<picture>
5-
<source media="(prefers-color-scheme: dark)" srcset="assets/testsprite-logo-dark.svg">
6-
<source media="(prefers-color-scheme: light)" srcset="assets/testsprite-logo-light.svg">
7-
<img src="assets/testsprite-logo-dark.svg" alt="TestSprite" width="420">
5+
<source media="(prefers-color-scheme: dark)" srcset="assets/testsprite-logo-dark.png">
6+
<source media="(prefers-color-scheme: light)" srcset="assets/testsprite-logo-light.png">
7+
<img src="assets/testsprite-logo-light.png" alt="TestSprite" width="420">
88
</picture>
99
</a>
1010

@@ -34,9 +34,9 @@ AI ships code in minutes — verifying it hasn't. `testsprite` opens your live a
3434

3535
</div>
3636

37-
https://github.com/user-attachments/assets/eca90a91-93ef-49f6-8d13-86b4eb25f4cf
37+
<video src="https://github.com/user-attachments/assets/eca90a91-93ef-49f6-8d13-86b4eb25f4cf" controls muted></video>
3838

39-
<p align="center"><sub><b>▶ Watch the launch video</b> — the three hard limits every coding agent hits, and the loop that breaks them (4 min).</sub></p>
39+
<p align="center"><sub><b><a href="https://github.com/user-attachments/assets/eca90a91-93ef-49f6-8d13-86b4eb25f4cf">▶ Watch the launch video</a></b> — the three hard limits every coding agent hits, and the loop that breaks them (4 min).</sub></p>
4040

4141
---
4242

@@ -58,15 +58,17 @@ Requires **Node.js ≥ 20**. (No global install? `npx @testsprite/testsprite-cli
5858

5959
```bash
6060
npm install -g @testsprite/testsprite-cli
61-
testsprite init
61+
testsprite setup
6262
```
6363

64-
`testsprite init` prompts for your [API key](https://www.testsprite.com), verifies it, and installs the verification-loop skill for your coding agent (`claude`, `cursor`, `cline`, `antigravity`, `codex`, etc.). Non-interactive (CI / onboarding scripts):
64+
`testsprite setup` prompts for your [API key](https://www.testsprite.com), verifies it, and installs the verification-loop skill for your coding agent (`claude`, `cursor`, `cline`, `antigravity`, `codex`, etc.) — one command, so your agent is wired to verify its own work. Non-interactive (CI / onboarding scripts):
6565

6666
```bash
67-
TESTSPRITE_API_KEY=sk-... testsprite init --from-env --yes --agent claude
67+
TESTSPRITE_API_KEY=sk-... testsprite setup --from-env --yes --agent claude
6868
```
6969

70+
> **Pointing a coding agent (Claude Code, Cursor, Codex, Cline, …) at TestSprite?** Have it run `testsprite setup` first — that installs the verification skill, so the agent knows how to create, run, and triage tests on its own (instead of guessing from this README). New here? Start with the **[getting-started overview](https://docs.testsprite.com/cli/getting-started/overview)**.
71+
7072
From there, the loop runs on its own — an example session, typed by the coding agent:
7173

7274
```bash
@@ -89,10 +91,9 @@ Prefer to configure each step by hand (or learn the surface offline with `--dry-
8991

9092
| Group | Command | What it does |
9193
| --------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
92-
| **Init** | `init` | One-shot onboarding: auth configure + whoami + agent install |
93-
| **Auth** | `auth configure` | Store an API key at `~/.testsprite/credentials` |
94-
| | `auth whoami` _(alias `status`)_ | Resolve the active profile to its user, key, env, and scopes |
95-
| | `auth logout` | Remove the active profile from the credentials file |
94+
| **Setup** | `setup` | **Start here** — one command: configure your API key, verify it, and install the agent verification skill |
95+
| **Auth** | `auth status` | Resolve the active profile to its user, key, env, and scopes |
96+
| | `auth remove` | Remove the active profile from the credentials file |
9697
| **Read** | `project list` / `project get` | List projects / fetch one by id |
9798
| | `test list` / `test get` | List tests under a project / fetch one by id |
9899
| | `test code get` | Print (or write) the generated test source |
@@ -109,7 +110,9 @@ Prefer to configure each step by hand (or learn the surface offline with `--dry-
109110
| | `test rerun` | Cheap replay of one/many tests (FE verbatim; BE with deps); `--all --project <id>` reruns all tests |
110111
| | `test wait` | Block on a `runId` until terminal |
111112
| | `test artifact get` | Download the failure bundle for a specific `runId` |
112-
| **Agent** | `agent install` / `agent list` | Onboard a coding agent (pure-local); targets: `claude`, `codex`, `cursor`, `cline`, `antigravity` |
113+
| **Agent** | `agent install` / `agent list` | Add or list coding-agent targets (pure-local): `claude`, `codex`, `cursor`, `cline`, `antigravity` |
114+
115+
> The earlier command names — `init`, `auth configure`, `auth whoami`, `auth logout` — still work as hidden, deprecated aliases (each prints a one-line notice pointing at the new name), so existing scripts keep running. `auth configure` now runs the full `setup` (it also installs the skill).
113116
114117
📚 **Full reference — every command, flag, and example:** [DOCUMENTATION.md](./DOCUMENTATION.md), including [configuration & profiles](./DOCUMENTATION.md#configuration), [scripting](./DOCUMENTATION.md#output--scripting), and [exit codes](./DOCUMENTATION.md#exit-codes).
115118

assets/testsprite-logo-dark.png

10.7 KB
Loading

assets/testsprite-logo-light.png

12 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@testsprite/testsprite-cli",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Official TestSprite command-line interface",
55
"type": "module",
66
"main": "dist/index.js",
@@ -9,9 +9,12 @@
99
},
1010
"files": [
1111
"dist",
12+
"skills",
1213
"!dist/**/*.map"
1314
],
1415
"scripts": {
16+
"generate:version": "node scripts/generate-version.mjs",
17+
"prebuild": "node scripts/generate-version.mjs",
1518
"build": "tsc -p tsconfig.build.json && node scripts/postbuild.mjs",
1619
"clean": "rm -rf dist coverage",
1720
"lint": "eslint .",

scripts/generate-version.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env node
2+
// Writes src/version.ts from package.json.version so the runtime version
3+
// reported in the User-Agent header always matches the stamped package version.
4+
//
5+
// Called automatically via the "prebuild" npm lifecycle script, which runs
6+
// before "build" (tsc). The release workflows run:
7+
// npm version --no-git-tag-version <semver> ← stamps package.json
8+
// npm run build ← triggers prebuild first
9+
// ...so the compiled binary always reflects the actual published version.
10+
import { readFileSync, writeFileSync } from 'node:fs';
11+
import { fileURLToPath } from 'node:url';
12+
import { join, dirname } from 'node:path';
13+
14+
const root = dirname(fileURLToPath(import.meta.url));
15+
const pkg = JSON.parse(readFileSync(join(root, '..', 'package.json'), 'utf8'));
16+
const { version } = pkg;
17+
18+
const out = join(root, '..', 'src', 'version.ts');
19+
const content = `// AUTO-GENERATED by scripts/generate-version.mjs — do not edit by hand.
20+
// Run \`npm run build\` (or \`npm run generate:version\`) to regenerate.
21+
export const VERSION = '${version}';
22+
`;
23+
24+
writeFileSync(out, content, 'utf8');
25+
console.log(`generate-version: wrote src/version.ts → ${version}`);

scripts/postbuild.mjs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
#!/usr/bin/env node
2-
// Post-build hook: make dist/index.js executable and copy asset tree.
2+
// Post-build hook: make dist/index.js executable.
33
//
44
// Replaces the previous `chmod +x dist/index.js` shell command, which
55
// fails on Windows (`'chmod' is not recognized`). On Windows Node only
66
// honors the writable/read-only bit so 0o755 is effectively a no-op for
77
// execute permissions, but the call is harmless. On POSIX it sets the
88
// executable bit as before.
99
//
10-
// Asset copy: tsc only emits .ts → .js; .md assets (e.g. the agent skill
11-
// body) are not copied by the compiler. This step mirrors src/assets/ into
12-
// dist/assets/ so the built binary resolves them at the same relative path.
13-
import { chmodSync, cpSync, rmSync } from 'node:fs';
10+
// Skill assets (skills/*.md) live at the repo/package ROOT and ship verbatim
11+
// via package.json `files`. agent-targets.ts resolves them with `../../skills`,
12+
// which points at the package root from BOTH `src/lib` (vitest) and `dist/lib`
13+
// (built) — so no asset copy into dist/ is needed (the old src/assets →
14+
// dist/assets mirror is gone).
15+
import { chmodSync } from 'node:fs';
1416
chmodSync(new URL('../dist/index.js', import.meta.url), 0o755);
15-
rmSync(new URL('../dist/assets', import.meta.url), { recursive: true, force: true });
16-
cpSync(new URL('../src/assets', import.meta.url), new URL('../dist/assets', import.meta.url), {
17-
recursive: true,
18-
});

0 commit comments

Comments
 (0)