Skip to content

feat(cli): add npm package wrapper for Codra CLI#25

Merged
Abdulmuiz44 merged 1 commit into
mainfrom
feat/npm-packaged-codra-cli
Jun 2, 2026
Merged

feat(cli): add npm package wrapper for Codra CLI#25
Abdulmuiz44 merged 1 commit into
mainfrom
feat/npm-packaged-codra-cli

Conversation

@Abdulmuiz44
Copy link
Copy Markdown
Collaborator

  • 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".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +32 to +35
const key = platformArchKey();
const name = binaryFileName();
const src = path.join(repoRoot, 'target', 'release', name);
const destDir = path.join(packageRoot, 'bin', 'native', key);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Abdulmuiz44 Abdulmuiz44 merged commit 1297740 into main Jun 2, 2026
1 check 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.

1 participant