Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
62aa6d0
refactor(prompts): add text/password/editor wrappers in lib/prompts.ts
wyattjoh May 12, 2026
d1985f7
refactor(init): route input through lib/prompts.ts
wyattjoh May 12, 2026
a80c7c1
refactor(api): route input/editor through lib/prompts.ts
wyattjoh May 12, 2026
c449bf9
refactor(deploy): route input/password through lib/prompts.ts
wyattjoh May 12, 2026
da54512
refactor(users): route input/password through lib/prompts.ts
wyattjoh May 12, 2026
0c466c8
refactor(app-picker): route input through lib/prompts.ts
wyattjoh May 12, 2026
1bbc206
test: stub new lib/prompts.ts exports in existing mocks
wyattjoh May 12, 2026
a7c87a0
build(deps): add @clack/prompts and external-editor
wyattjoh May 12, 2026
f3439fe
feat(prompts): swap confirm to @clack/prompts
wyattjoh May 12, 2026
645d1e7
feat(prompts): swap text to @clack/prompts
wyattjoh May 12, 2026
c4110d1
feat(prompts): swap password to @clack/prompts
wyattjoh May 12, 2026
d0fdddd
feat(prompts): implement editor via external-editor
wyattjoh May 12, 2026
0a64cac
refactor(prompts): adopt clack validator contract at call sites
wyattjoh May 12, 2026
d0cce06
test: route prompt mocks through lib/prompts.ts
wyattjoh May 12, 2026
ec91309
feat(listage): swap select/search internals to @clack/prompts
wyattjoh May 12, 2026
6516d6d
test(listage): rewrite tests against @clack/prompts internals
wyattjoh May 12, 2026
a7c6353
test(listage): drop ttyContext from stubs and integration harness
wyattjoh May 12, 2026
cc36dbb
feat(spinner): swap intro/outro/spinner to @clack/prompts
wyattjoh May 12, 2026
492954f
refactor(cli): drop ExitPromptError handling; rely on UserAbortError
wyattjoh May 12, 2026
b60a053
refactor(prompts): route doctor and update confirms through lib/promp…
wyattjoh May 12, 2026
fe50a7f
build(deps): remove @inquirer/* packages
wyattjoh May 12, 2026
57138ff
docs(changeset): refresh prompt UI with @clack/prompts
wyattjoh May 12, 2026
3f0448b
feat(intro): wrap apps commands
wyattjoh May 12, 2026
14b5ddd
feat(intro): wrap users commands
wyattjoh May 12, 2026
36f43bf
feat(intro): wrap config commands
wyattjoh May 12, 2026
30b9d9b
feat(intro): wrap orgs and billing toggles
wyattjoh May 12, 2026
ea12f54
feat(intro): wrap auth, link, whoami, switch-env, unlink
wyattjoh May 12, 2026
ad6fb08
feat(intro): wrap env pull, api, skill install
wyattjoh May 12, 2026
e4da42e
refactor(intro): retitle init, doctor, update, and open to operation …
wyattjoh May 12, 2026
a79d149
feat(intro): route human output through prompt rail
wyattjoh May 13, 2026
92c20a7
feat(intro): route apps list through clack ui
wyattjoh May 21, 2026
8ab8957
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh May 21, 2026
a4b1990
fix(review): address prompt lifecycle feedback
wyattjoh May 21, 2026
0d95ad6
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh May 25, 2026
bf912ca
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh May 25, 2026
7938fa0
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh May 25, 2026
f1bdbd9
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh May 29, 2026
1cb2d50
fix(prompts): preserve clack prompt edge cases
wyattjoh May 29, 2026
b3acf18
Merge remote-tracking branch 'origin/main' into wyattjoh/clack-prompt…
wyattjoh Jun 1, 2026
189e8b5
fix(prompts): correct interactive command outro statuses
wyattjoh Jun 1, 2026
06e233a
fix(review): address PR #305 prompt gutter feedback
wyattjoh Jun 1, 2026
10cbda5
chore: merge origin/main
wyattjoh Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clack-prompts-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"clerk": minor
---

Refresh the visual style of prompts, lists, spinners, and intro/outro brackets to use `@clack/prompts`, and make interactive command endings reflect success, failure, or paused cancellation status.
62 changes: 21 additions & 41 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
"@changesets/cli": "^2.31.0",
"@clerk/testing": "^2.0.33",
"@types/bun": "^1.3.14",
"@types/semver": "^7.7.1",
"nano-staged": "^1.0.2",
"oxfmt": "^0.47.0",
"oxlint": "^1.62.0",
"playwright": "^1.60.0",
"semver": "^7.8.0",
"typescript": "^6"
},
"nano-staged": {
Expand Down
6 changes: 2 additions & 4 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
"test": "bun test src/ --parallel"
},
"dependencies": {
"@clack/prompts": "^1.3.0",
"@clerk/cli-extras": "workspace:*",
"@commander-js/extra-typings": "^14.0.0",
"@inquirer/ansi": "^2.0.5",
"@inquirer/core": "^11.1.9",
"@inquirer/figures": "^2.0.5",
"@inquirer/prompts": "^8.4.3",
"@napi-rs/keyring": "^1.3.0",
"commander": "^14.0.3",
"env-paths": "^4.0.0",
"external-editor": "^3.1.0",
"magicast": "^0.5.3",
"semver": "^7.8.1",
"yaml": "^2.9.0"
Expand Down
29 changes: 26 additions & 3 deletions packages/cli-core/src/commands/api/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { test, expect, describe, beforeEach, afterEach, spyOn, mock } from "bun:
import { mkdtemp, rm } from "node:fs/promises";
import { join } from "node:path";
import { tmpdir } from "node:os";
import { CliError, ERROR_CODE } from "../../lib/errors.ts";
import { CliError, ERROR_CODE, UserAbortError } from "../../lib/errors.ts";
import {
useCaptureLog,
credentialStoreStubs,
gitStubs,
configStubs,
promptsStubs,
libPromptsStubs,
stubFetch,
} from "../../test/lib/stubs.ts";

Expand Down Expand Up @@ -171,7 +171,11 @@ mock.module("../../lib/config.ts", () => ({
},
}));

mock.module("@inquirer/prompts", () => promptsStubs);
const mockConfirm = mock(async (_config?: unknown) => true);
mock.module("../../lib/prompts.ts", () => ({
...libPromptsStubs,
confirm: (config: unknown) => mockConfirm(config),
}));

const { _setConfigDir } = (await import("../../lib/config.ts")) as any;
const { setMode } = (await import("../../mode.ts")) as any;
Expand Down Expand Up @@ -209,6 +213,8 @@ describe("api command", () => {
throw new Error("process.exit");
});
stubFetch(async () => new Response(JSON.stringify(mockUsers), { status: 200 }));
mockConfirm.mockReset();
mockConfirm.mockResolvedValue(true);
});

afterEach(async () => {
Expand Down Expand Up @@ -479,12 +485,29 @@ describe("api command", () => {
});

test("prints API error response body to stdout and exits 1", async () => {
setMode("human");
const errorBody = { errors: [{ message: "not found", code: "resource_not_found" }] };
stubFetch(async () => new Response(JSON.stringify(errorBody), { status: 404 }));

await runApi("/users/bad_id");
expect(process.exitCode).toBe(1);
expect(captured.out).toContain(JSON.stringify(errorBody, null, 2));
expect(captured.err).toContain("Failed");
expect(captured.err).not.toContain("Done");
});

test("shows Paused with instructions when a confirmation prompt is cancelled", async () => {
setMode("human");
mockConfirm.mockImplementation(async () => {
throw new UserAbortError();
});

await expect(
runApi("/users", { method: "POST", data: "{}", yes: false }),
).rejects.toBeInstanceOf(UserAbortError);
expect(captured.err).toContain("Paused");
expect(captured.err).toContain("Run this command again to continue.");
expect(captured.err).not.toContain("Done");
});

test("--include shows headers on error responses too", async () => {
Expand Down
Loading