@lockwise/cli
v1.1.0
Published
CLI for syncing npm dependencies between public registry and private Nexus
Maintainers
Readme
@lockwise/cli
CLI for syncing npm dependencies between a public registry and a private Nexus registry.
How It Works (main concept)
- Switch to the public npm registry and run
npm install(optimistic install) - Run
lockwise analyzeagainst the generated lockfile - Lockwise checks each package's availability on Nexus, scans for vulnerabilities via OSV.dev, and recommends safe versions
- Upload the recommended packages to Nexus
- Switch back to Nexus and install normally
Steps:
Install
npm install -g @lockwise/cliQuick Start
# Analyze your project's lockfile
lockwise analyze --nexus-url http://your-nexus/repository/npm-group
# Open the web dashboard
lockwise ui
# Print resolved config
lockwise configCommands
lockwise analyze
Parses the lockfile, checks each package against Nexus and public registries, queries OSV.dev for vulnerabilities, and generates a categorized report.
Options:
-l, --lockfile <path> Path to lockfile (auto-detects npm/yarn/pnpm)
-n, --nexus-url <url> Nexus registry URL
-o, --output <path> Output report path
--json Output raw JSONExit codes: 0 — all good, 1 — issues found.
lockwise ui
Starts the web dashboard with the built-in API server.
Options:
-p, --port <number> Server port (default: 3000)lockwise serve
Starts the API server only (without UI).
Options:
-p, --port <number> Server port (default: 3001)lockwise config
Prints the resolved configuration as JSON.
Configuration
Lockwise uses cosmiconfig. Create any of these:
lockwise.config.ts/.lockwiserc.json/.lockwiserc.yamlpackage.json→"lockwise"field
{
"nexusUrl": "https://nexus.mycompany.com/repository/npm-proxy",
"minAgeDays": 14
}CLI flags and environment variables override config file values.
Links
License
MIT
