feat(cli): add npm package wrapper for Codra CLI#25
Conversation
Abdulmuiz44
commented
Jun 2, 2026
- Adds @codra/cli npm package wrapper for the Rust Codra CLI.
- Provides global "codra" binary entrypoint through Node wrapper.
- Adds build/test scripts that package the current platform binary.
- Keeps Rust CLI behavior unchanged.
- Does not publish to npm yet.
- Prepares Codra for "npm install -g @codra/cli".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c08e0eb292
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const key = platformArchKey(); | ||
| const name = binaryFileName(); | ||
| const src = path.join(repoRoot, 'target', 'release', name); | ||
| const destDir = path.join(packageRoot, 'bin', 'native', key); |
There was a problem hiding this comment.
Package binaries for every install target
When this single @codra/cli package is packed after npm run build on one machine, only that machine's bin/native/<platform>-<arch>/codra is copied into the tarball; I checked npm pack --dry-run and it only includes files present under bin/. On any other supported platform, the wrapper computes a different key and exits with “native binary not found”, so a package published from a Linux CI runner would not work for macOS or Windows global installs unless the release process adds all platform binaries or uses per-platform optional packages/os/cpu constraints.
Useful? React with 👍 / 👎.