The basics

Does xnpm replace npm?

No. xnpm calls your installed npm binary. It does not reimplement npm, does not change how packages resolve, and does not touch the registry directly. It is a workflow layer that sits in front of npm and git.

Why not just use npm scripts?

npm scripts are useful, but every repo reinvents the release flow. xnpm gives that whole flow a standard command surface — with dependency ordering, safety checks, and structured exit codes built in from the start.

Does it work with npm workspaces?

xnpm discovers packages by walking the directory tree and reading package.json files. It works alongside npm workspaces without requiring a specific monorepo structure.

What Node.js version is required?

Node.js 18 and above. Run xnpm doctor to verify your environment meets all requirements before running workflows.

Does xnpm run on Windows?

xnpm is a Node.js CLI and calls npm and git through their standard interfaces. macOS and Linux are fully supported. Windows support is in progress — current status is tracked in the issue tracker.

Safety & credentials

How does xnpm prevent credential leaks?

Before any publish, xnpm validates .npmignore, runs npm pack --dry-run --json, and checks the full file list for sensitive file patterns (.env, keys, secrets). Publish is blocked until the issue is resolved. The check also runs again after the version bump.

How does xnpm use my credentials?

xnpm uses your existing .npmrc, lockfiles, npm auth tokens, and git config. It does not store credentials, does not proxy the registry, and does not transmit auth information anywhere outside of npm and git themselves.

What if publish succeeds but push fails?

xnpm exits with code 2 (partial success) so CI pipelines can catch and handle the state correctly. The package is already on npm. The push failure is surfaced clearly — not silenced.

Ask & automation

Is xnpm ask powered by an LLM?

No. xnpm ask uses deterministic phrase catalogs. Unknown input fails safely with suggestions — it does not guess. Same input always produces the same command, which makes it safe to use in scripts and agent workflows.

Can I use ask-cli in my own CLI?

@x12i/ask-cli is the standalone library behind xnpm ask. Any CLI can use it to add deterministic natural-language command resolution without adding an LLM dependency.

Undo & history

What can xnpm undo?

xnpm can undo local file changes: package.json edits, .gitignore and .npmignore updates, override cleanup, and lockfile changes from installs. It records every file it touches before making changes, and restores the exact prior state.

Can xnpm undo a publish?

No. npm publish, git push, and remote repo creation are irreversible external effects. xnpm logs them with full details in the transaction record so you know exactly what happened, but cannot reverse them.

What happens if I edited a file after the run?

xnpm detects the hash mismatch and refuses to overwrite the file. You can preview the undo with xnpm undo --dry-run, or override the protection explicitly with xnpm undo --force.

Upstream & pricing

Is upstream bundled or separate?

Currently available as a separate install: npm install -g @x12i/xnpm-plugin-upstream. It will be bundled into xnpm in vNext so no extra install is needed.

Is xnpm free?

Yes. xnpm is free for personal use, forever. No account required, no trial period, no paid tiers, no feature gates, no expiry. Install it once and keep using it.