Skip to content

Commit 2bf8bfb

Browse files
committed
Use package manager command in agent setup prompt
- print plan package manager execute command - cover pnpm agent setup path - set release binary targets for bun
1 parent 64b43aa commit 2bf8bfb

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,4 @@ jobs:
245245
env:
246246
GITHUB_TOKEN: ${{ github.token }}
247247
NPM_CONFIG_PROVENANCE: true
248+
PROOFKIT_BINARY_TARGETS: bun-linux-x64

packages/cli/src/core/executeInitPlan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function renderNextSteps(plan: InitPlan, additionalSteps: string[] = []) {
3939
"",
4040
formatHeading("Agent setup:"),
4141
"Have your agent run this in the new project and complete the interactive prompt so it can load the right skills:",
42-
` ${formatCommand("npx @tanstack/intent@latest install")}`,
42+
` ${formatCommand(`${plan.packageManagerExecuteCommand} @tanstack/intent@latest install`)}`,
4343
];
4444

4545
if (plan.request.noInstall) {

packages/cli/tests/executor.test.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,36 @@ describe("executeInitPlan command paths", () => {
370370
);
371371
});
372372

373+
it("prints package manager execute command in agent setup next steps", async () => {
374+
const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "proofkit-new-pnpm-agent-setup-"));
375+
const console = {
376+
info: [] as string[],
377+
warn: [] as string[],
378+
error: [] as string[],
379+
success: [] as string[],
380+
note: [] as Array<{ message: string; title?: string }>,
381+
};
382+
const plan = planInit(
383+
makeInitRequest({
384+
projectName: "pnpm-app",
385+
scopedAppName: "pnpm-app",
386+
appDir: "pnpm-app",
387+
packageManager: "pnpm",
388+
noInstall: true,
389+
noGit: true,
390+
cwd,
391+
}),
392+
{
393+
templateDir: getSharedTemplateDir("nextjs-shadcn"),
394+
packageManagerVersion: "11.0.0",
395+
},
396+
);
397+
398+
await Effect.runPromise(executeInitPlan(plan).pipe(makeTestLayer({ cwd, packageManager: "pnpm", console })));
399+
400+
expect(console.info.join("\n")).toContain("pnpx @tanstack/intent@latest install");
401+
});
402+
373403
it("fails with a typed external command error when install fails", async () => {
374404
const cwd = await fs.mkdtemp(path.join(os.tmpdir(), "proofkit-new-install-fail-"));
375405
const plan = planInit(

0 commit comments

Comments
 (0)