Skip to content

feat: monorepo restructure + @flight/claude-code shim package#11

Merged
lewisnsmith merged 2 commits intomainfrom
claude/create-claude-code-package-XhmgM
Apr 19, 2026
Merged

feat: monorepo restructure + @flight/claude-code shim package#11
lewisnsmith merged 2 commits intomainfrom
claude/create-claude-code-package-XhmgM

Conversation

@lewisnsmith
Copy link
Copy Markdown
Owner

Summary

  • Monorepo restructure: moves all source, tests, bench, and config into packages/flight-proxy/ so it becomes a proper npm workspace member — this is required so "flight-proxy": "^1.4.0" resolves via symlink rather than a file: path that breaks on npm publish
  • New packages/claude-code/: thin shim published as @flight/claude-code; npx @flight/claude-code@latest init calls runSetupWizard() from flight-proxy with no global install required
  • Root package.json becomes a private workspace manager (flight-monorepo); all scripts delegate to the appropriate workspace
  • TSX_BIN path fix in 5 test files — after workspace hoisting, tsx lives at ../../../node_modules/.bin/tsx not ../node_modules/.bin/tsx

Note: flight is already taken on npm (unrelated "flat file database" package since 2013), so the publishable CLI package stays flight-proxy.

New package: @flight/claude-code

npx @flight/claude-code@latest init
npx @flight/claude-code@latest init --no-proxy --no-pd
npx @flight/claude-code@latest init --remove

Flags mirror flight claude setup: --hooks/--no-hooks, --proxy/--no-proxy, --pd/--no-pd, --slash-commands/--no-slash-commands, --banner/--no-banner, --remove.

Test plan

  • packages/flight-proxy: 37 test files, 252 tests pass (npm run check --workspace flight-proxy)
  • packages/claude-code: 5 tests pass — --help exits 0, -h exits 0, unknown subcommand exits nonzero, no subcommand exits nonzero, idempotent double-init smoke test (asserts exactly one hook entry per event type after two consecutive runs)
  • npm run check from root runs both workspaces cleanly (257 total tests)
  • Manual end-to-end: HOME=$(mktemp -d) npx --prefix /tmp/scratch ./packages/claude-code-0.1.0.tgz init — asserts ~/.claude/settings.json hook entries + slash commands created, no duplicates on second run

https://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK

claude added 2 commits April 19, 2026 22:14
Converts the repo to an npm workspaces monorepo so `npx @flight/claude-code init`
works without a global flight-proxy install.

- Move all source, tests, bench, and config into packages/flight-proxy/ so it
  becomes a proper workspace member (fixes the file: dep issue that breaks npm publish)
- Add packages/claude-code/ — a thin wrapper that calls runSetupWizard() from
  flight-proxy; published as @flight/claude-code with bin flight-claude-code
- Root package.json becomes private workspace manager (flight-monorepo)
- Fix TSX_BIN paths in 5 test files after npm workspace hoisting moves tsx to
  root node_modules/.bin/
- Add 5 tests covering --help, -h, unknown subcommand, no subcommand, and
  idempotent double-init smoke test

https://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK
bin/init.js imports from flight-proxy which resolves to dist/index.js;
tests were running before the build step so the import failed on CI.

https://claude.ai/code/session_016gsNArY6RLGbsyazamTQAK
@lewisnsmith lewisnsmith merged commit ff48461 into main Apr 19, 2026
2 checks passed
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.

2 participants