Nyron

nyron fix

Validate and repair your Nyron setup

nyron fix

Validate and repair your Nyron setup by synchronizing config, package versions, and .nyron metadata.

Usage

npx @nyron/cli fix

This command is safe to run whenever your configuration or metadata drift out of sync.

What It Does

The fix command:

  • Creates missing .nyron/meta.json and .nyron/versions.json files
  • Synchronizes .nyron metadata with nyron.config.ts
  • Uses each project's package.json version as the source of truth
  • Prompts you to create missing project directories or package.json files when needed
  • Updates the stored latest Nyron release tag when one exists in git

When to Use

Run nyron fix when:

  • You've manually edited nyron.config.ts and added/removed projects
  • You suspect inconsistencies between config and metadata files
  • You're getting errors from other Nyron commands
  • You've manually modified package versions
  • .nyron/ is missing and you want to repair the setup without rerunning init

Example Output

$ npx @nyron/cli fix

🔍 Scanning Nyron setup for issues...

🔧 Auto-fixing issues...

============================================================
📋 Fix Summary
============================================================

Applied fixes:

  1. Created missing .nyron metadata files
  2. Synchronized .nyron metadata with nyron.config.ts and package.json versions

 Total: 2 fix(es) applied.

No Issues Found

If everything is in good shape, you'll see:

🔍 Scanning Nyron setup for issues...

 No issues found! Your Nyron setup is in good shape.

Source of Truth

Nyron treats:

  • nyron.config.ts as the source of truth for which projects exist
  • each project's package.json as the source of truth for its current version

Nyron Release Tag Sync

The fix command automatically checks and updates the latest Nyron release tag in meta.json to match your git repository. This happens every time you run fix, even if there are no other issues.

What it does:

  • Fetches the latest nyron-release@ tag from your git repository
  • Compares it with the tag stored in meta.json
  • Updates meta.json if they don't match (or if no tag is set)
  • Shows (not set) in the output if this is the first time setting the tag

This tag is used internally to track releases and generate changelogs between versions. The tag follows the format nyron-release@YYYY-MM-DD@HH-MM-SS.mmm and is created when you use nyron push-tag.

Best Practices

  1. Run after config changes - Use fix after editing nyron.config.ts
  2. Commit metadata changes - Commit the updated .nyron/ files after fixing
  3. Review the summary - Read the fix summary to understand what changed
  4. Safe to rerun - The command is idempotent and safe to run multiple times