Repository navigation
Labels
Description
Summary
Port the npx wrapper from the gateway repo to the CLI, so users with Node.js (>= 18) can run the CLI via npx without a separate Go toolchain or download step.
Motivation
The original npx wrapper was implemented in inference-gateway/inference-gateway (PR #317) but was closed because this functionality is a better fit for the CLI — users who want npx convenience likely want the CLI tool, not the gateway server itself.
The gateway repo already ships a working prototype in the npx/ folder of the branch claude/issue-315-20260526-1910 that can be adapted for the CLI.
What the prototype does
- A thin Node.js shim (bin/inference-gateway.js) that spawns the platform-matching Go binary.
- A download/cache module (lib/install.js) that:
- Detects linux/darwin on x86_64/arm64/armv7.
- Downloads the matching release tarball from GitHub Releases.
- Caches it under ~/.cache/inference-gateway/ (respects XDG_CACHE_HOME and INFERENCE_GATEWAY_CACHE_DIR override).
- Extracts with tar and execs the binary.
- package.json with bin entry, engine constraints, and publishConfig: public.
- Environment variable INFERENCE_GATEWAY_VERSION to pin a specific release tag.
- Zero runtime dependencies (uses only Node.js built-ins: fs, os, path, https, child_process).
Proposed changes for CLI
- Port the npx/ folder from inference-gateway/inference-gateway to this repo.
- Update package name to @inference-gateway/cli (or similar).
- Update release automation: bump version in npx/package.json during release, include the package in release body, and wire up npm publish (needs NPM_TOKEN CI secret).
- Adapt documentation: add npx usage to the CLI README with "not recommended for production" caveat.
Out of scope
- Windows support (use WSL).
- CI workflow to automate npm publish (needs repo-admin secret setup).
Related
- Original issue: [FEATURE] Make it easy to install the inference gateway using npx inference-gateway#315
- Original PR (implementation): feat(npx): add npx wrapper to install and run the gateway inference-gateway#317
- Closing comment: Closing this because it is more important for the CLI, not the gateway. The CLI should be easily accessible within the NPM ecosystem.
Acceptance Criteria
- A Node.js npx/ package exists in this repo (@inference-gateway/cli)
- On first npx @inference-gateway/cli, the matching release binary is downloaded and cached
- Subsequent invocations reuse the cached binary
- Supports Linux and macOS (x86_64, arm64, armv7)
- Node >= 18 supported
- Zero runtime dependencies
- Version is synced automatically with releases
- Documented with "not recommended for production" caveat
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat: add npm wrapper to install and run the CLI via npx (#610)
inference-gateway-releaser commentedon Jun 6, 2026
🎉 This issue has been resolved in version 0.119.0 🎉
The release is available on:
Your semantic-release bot 📦🚀