Skip to content

install.js: manifest-driven CLI detection with user consent #149

@jobordu

Description

@jobordu

Description

install.js currently hardcodes 10 CLIs, auto-registers them without checking if they're installed, and floods ~/.claude.json with 6 unwanted CCR presets. There's no way for users to control what gets registered. We need to replace the hardcoded list with a detection manifest that defines what to look for and how to detect it, and wire up install.js to scan, show, and ask before registering.

User Story

As someone running install.js, I want it to discover what CLIs are installed, show me what's available, and let me confirm what gets registered — so I never get tooling I didn't ask for and no CCR presets ever appear.

Acceptance Criteria

  • A detection manifest (e.g. nf/bin/providers.json) exists as a read-only file defining each CLI's install command and detect command
  • install.js reads the manifest and runs detect commands for each entry on every run
  • install.js prints a clear found/not-found status per CLI before prompting
  • install.js prompts for confirmation per CLI before registering (y/N), unless --auto or explicit flags are used
  • All CCR preset references are removed from install.js — no conditional logic, no config flag, hard deleted
  • install.js never writes back to the manifest or any other state file
  • When the manifest is missing, install.js exits with a clear error message

Decomposition

  1. Open question: confirm manifest filename and path (proposed: nf/bin/providers.json)
  2. Create manifest with detect+install entries for claude, opencode, gemini, codex
  3. Refactor install.js: replace hardcoded selectedRuntimes with manifest reader
  4. Add detectRunner() that runs command -v per manifest entry and returns found/not-found
  5. Add confirmation prompt per found CLI (y/N), skip if --auto or explicit flags set
  6. Remove all ccr references from install.js (runtime detection, MCP server, everything)
  7. Test: run install.js with no flags — should prompt, not auto-register
  8. Test: run install.js --auto — should register detected without prompting
  9. Test: run install.js --claude — should register only claude without prompting

Difficulty

M — Medium. The logic is straightforward (read manifest, run detect, prompt, register), but it touches multiple sections of install.js and introduces a new file. The CCR removal is clean and isolated. Main risk is the prompt UX interaction with the existing flag parsing — keep it simple.

Routing

Claude — Complex refactor of a large, stateful script with branching logic and UX interaction — needs careful reading of the existing code to avoid regressions.

Labels

install feature priority:P2 refactor

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions