
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
A small, focused command-line tool to scaffold and customize Nextra-based projects and feature apps quickly. It downloads templates, copies files into a target directory, and intelligently patches shared configuration (package.json, tsconfig.json, ESLint) so feature-level apps and monorepos get sensible defaults.
nextra-cli helps you bootstrap Nextra sites and feature apps from templates. It automates:
This repository contains the CLI entrypoint, utility modules for downloading and patching templates, and the scaffolding logic.
package.json name for feature appstsconfig.json and .eslintrc.json mergingYou can run the CLI directly with npx (recommended for one-off usage):
npx nextra-cli
# or, if installed globally
npm install -g nextra-cli
nextra-cli
If you're developing locally, run it from the project root:
node ./bin/nextra.js <args>
Assumption: the published package name is
nextra-cliand the project exposes a bin entry (nextra.js) in thebin/folder. If your package name or bin differs, replace the command accordingly.
The CLI scaffolds a template into a target directory. Example usage (adjust flags to match your CLI implementation):
# Scaffold the `nextra-blog` template into ./my-blog
npx nextra-cli init nextra-blog ./my-blog --branch main
# Or when developing locally
node ./bin/nextra.js init nextra-blog ./my-blog --branch main
Notes:
name is the name or id of the template to download.template is the destination folder to scaffold into.--feature (optional) lets you pick a branch/tag of the template source.If your CLI exposes a different command layout (for example npx nextra-cli <template> <dir>), adapt the examples above.
package.json, tsconfig.json, and .eslintrc.json, the CLI merges or patches rather than overwriting.package.json exists in the target and the template is a feature app, the tool sets the name field to the target folder name.Key files and folders in this repo:
bin/nextra.js — CLI entry script (bundled JS for publishing)src/cli.ts — CLI implementationsrc/utils/download-template.ts — download & extract logicsrc/utils/scaffold-template.ts — core scaffolding flow (copy + patch)src/utils/patch-*.ts — per-config patching helpersContributions are welcome. A few suggestions to get started:
If you open issues or PRs, include:
patch-*.ts utilities to cover merging behavior.npm run lint and npm test (or your project-specific scripts) before opening a PR.Specify your license in the repository root (for example, LICENSE file). If you use a permissive license, add a short summary here.
Add maintainer information or preferred contact channels here (GitHub issues, emails, etc.).
FAQs
CLI for bootstrapping Nextra templates.
We found that nextra-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.