Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Improve Handling of Multiple .nuanced Graphs and Provide Cleanup Guidance in Nuanced CLI #82

Description

@aymannadeem

Problem

Right now, if a user runs nuanced init multiple times in subdirectories of the same project (or accidentally), they can end up with multiple .nuanced/nuanced-graph.json files, for example:

.nuanced/nuanced-graph.json
json/.nuanced/nuanced-graph.json

When this happens, nuanced enrich fails or behaves inconsistently, and currently outputs:

Multiple Nuanced Graphs found in /path/to/repo:
  .nuanced/nuanced-graph.json
  json/.nuanced/nuanced-graph.json

However:

  • The Nuanced docs implicitly assume users will run nuanced init at the repo root.
  • Once multiple .nuanced directories exist, there is no CLI guidance on how to clean this up.
  • The warning message clearly outlines the issue, and it's pretty clear what to do next, but if you're using automation to initialize a bunch of nuanced packages and there's some nesting, it can be difficult to dig all of the .nuanced (without doing find . -type d -name ".nuanced" or find . -type d -name ".nuanced" -exec rm -rf {} +)

Why this is confusing

  • It’s easy to accidentally run nuanced init in subdirectories
  • Once this happens, there is no clear recovery path or built-in tool to help
  • Users may be blocked on nuanced enrich without understanding why

Proposal

1. Improve the warning message

When multiple .nuanced directories are found, update the warning to something like:

Multiple Nuanced Graphs found in /path/to/repo:
  .nuanced/nuanced-graph.json
  json/.nuanced/nuanced-graph.json

This will cause enrich to fail or behave inconsistently.
Please delete extra `.nuanced` directories so that only one remains.
Typically, you should keep `.nuanced/nuanced-graph.json` at the project root.

2. Add a CLI cleanup helper

Provide a CLI command such as:

nuanced cleanup

or maybe as part of init (?) not sure:

nuanced init cleanup

Which would:

  • Detect and list all .nuanced/nuanced-graph.json files in the repo tree.
  • Prompt the user to remove extras, or automatically remove them if confirmed.

Priority

It's just some nice UX polish that improves onboarding and reduces friction for new users. Def lower priority.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions