Skip to main content

Initialize Config

Generate or update the Nova config file with an interactive wizard by guiding you towards each step, and saving when you're done.

Summary

The initialize command scaffolds and maintains the nova.config.json file by opening a guided flow across project metadata, key entities, and canonical URLs.

Existing values populate each prompt so you can edit an accurate snapshot and only persist changes when you confirm them.

Why Use This Command?

  • The wizard writes the JSON with only the fields you confirm, no extra cleanup required.
  • The wizard lists each field, explains what each field is for, and guides you to fill known values.
  • Avoid typos and mismatched formats with built-in validation for slugs, emails, and URLs.
  • Dry run lets you walk through the questions without touching the config file until you're ready.

Use Cases

  • Onboarding — Create the first nova.config.json for a new or migrated repository.
  • Metadata refresh — Keep project descriptions, entities, and canonical URLs in sync after ownership changes.
  • Normalization — Clean up manually edited entries without hunting for typos in raw JSON.
  • Generator support — Feed consistent metadata to Nova generators so docs, README files, and release notes stay accurate.

Requirements

  • Node.js runtime — Use any Node.js LTS release with either the installed nova CLI or npx.
  • Project root — Run the command from the directory containing the top-level package.json (monorepos included).
  • Interactive terminal — Make sure the session can display the wizard's prompts.

Usage

You can run this command in two ways:

# Original
nova utility version

# Shorthand
nova util ver

Note: If Nova is installed only locally (inside a project), the command will work only within that project's directory. See the npm docs for details.

Options

FlagDescription
-d, --dry-runSkip saving to disk (warning will display).

Flow Overview

The command loops until you choose Save & Exit or Cancel. You can edit any category multiple times during the same run.

Editing an existing config?

Existing values are pre-filled in each prompt. Press Enter to keep a value, type a new value to replace it, or enter a single space to clear that field.

Project

  • Captures the project display name, package slug, short and long descriptions, and comma-separated keywords.
  • Slug validation only accepts letters, numbers, hyphen, and underscore characters.

Entities

  • Manages people or organizations related to the project (authors, contributors, supporters).
  • For each entity you can set a name, email, URL, and roles; emails follow a simple pattern check and URLs must be valid http:// or https://.
  • Menu supports Add, Edit, and Remove with confirmation before deletion; duplicates and blank roles are trimmed automatically.

URLs

  • Repository URLs accept git:, git+https:, git+ssh:, git+http:, and standard http:// or https://.
  • Normalizes all canonical project links: homepage, repository, issues, license, logo, docs, github, npm, and comma-separated funding sources.
  • Funding sources are sanitized individually and stored as an array, skipping invalid entries.

URL Sanitization and Validation

  • Enter a single space in any URL prompt to clear the value.
  • All URLs pass through sanitization, which trims whitespace, parses with the WHATWG URL class, and only persists allowed protocols.
  • Funding URLs share the same validation, and any values Nova cannot normalize are ignored.

Saving and Canceling

  • Choosing Save & Exit writes to a file called nova.config.json.
  • Choosing Cancel exits immediately without persisting changes and prints a debug log.

Output Example

nova.config.json
{
"project": {
"name": {
"title": "Example Project",
"slug": "example-project"
},
"description": {
"short": "Sample settings for a Nova-powered JavaScript toolkit.",
"long": "Use Nova to keep linting, typing, and release metadata consistent across your JavaScript and TypeScript projects."
},
"keywords": [
"example",
"nova",
"tooling",
"config"
]
},
"entities": [
{
"name": "Example Author",
"email": "author@example.com",
"url": "https://example.com/author",
"roles": [
"author"
]
},
{
"name": "Example Collaborator",
"email": "collab@example.com",
"url": "https://example.com/collaborator",
"roles": [
"contributor",
"supporter"
]
}
],
"urls": {
"homepage": "https://example.com",
"repository": "https://github.com/example/example-project",
"bugs": "https://github.com/example/example-project/issues",
"license": "https://github.com/example/example-project/blob/main/LICENSE",
"logo": "https://example.com/assets/logo.svg",
"documentation": "https://docs.example.com/project",
"github": "https://github.com/example/example-project",
"npm": "https://www.npmjs.com/package/example-project",
"fundSources": [
"https://github.com/sponsors/example",
"https://opencollective.com/example"
]
}
}

Troubleshooting

  • "Must be run inside the project root directory." — Verify you execute the command where the project root package.json resides. App or package folders inside monorepos are not allowed.
  • Validation loops keep reappearing. — Fix the highlighted email or URL before continuing. To drop the value, enter a single space and press Enter.
  • No file was created. — Make sure nova.config.json is writable and that you did not pass --dry-run or choose Cancel.