Skip to content

fix: npm global install bin wrapper and postinstall message#14

Merged
simaonogueira101 merged 1 commit intomainfrom
fix/npm-bin-and-postinstall
Feb 11, 2026
Merged

fix: npm global install bin wrapper and postinstall message#14
simaonogueira101 merged 1 commit intomainfrom
fix/npm-bin-and-postinstall

Conversation

@simaonogueira101
Copy link
Member

Summary

  • Fix talent-agent not working after npm install -g: the bin field pointed to src/index.ts (TypeScript), so npm's wrapper invoked node instead of bun. Replaced with bin/cli.mjs, a Node.js-compatible wrapper that checks for bun and spawns it with full stdio/signal forwarding.
  • Add postinstall message: after install, users now see getting-started instructions (login, search example, --help) and a warning if Bun is not found.
  • Add tests: 10 new tests covering both the bin wrapper (argument forwarding, exit codes) and the postinstall script (output, bun detection).

Test plan

  • All 195 tests pass (bun run test)
  • node bin/cli.mjs --version prints version
  • node bin/cli.mjs --help prints help
  • node scripts/postinstall.js prints welcome message

Made with Cursor

The `bin` field pointed directly at `src/index.ts` (a TypeScript file),
so npm's generated wrapper would invoke `node` instead of `bun`, failing
on every global install. Replace it with a Node.js-compatible wrapper
(`bin/cli.mjs`) that checks for `bun` and spawns it transparently.

Add a `postinstall` script that prints getting-started instructions and
warns when the required Bun runtime is missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@simaonogueira101 simaonogueira101 merged commit 9f73dae into main Feb 11, 2026
1 check passed
@simaonogueira101 simaonogueira101 deleted the fix/npm-bin-and-postinstall branch February 11, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant