Skip to content

Make watch the default command#60

Merged
greynewell merged 1 commit intomainfrom
make-watch-default
Apr 7, 2026
Merged

Make watch the default command#60
greynewell merged 1 commit intomainfrom
make-watch-default

Conversation

@greynewell
Copy link
Copy Markdown
Contributor

@greynewell greynewell commented Apr 7, 2026

Summary

  • Removes supermodel watch as a named subcommand — running supermodel [path] now starts the watch daemon directly
  • Moves all watch flags (--cache-file, --debounce, --notify-port, --fs-watch, --poll-interval) onto the root command
  • Fixes log prefix from [files] to [supermodel]

Test plan

  • supermodel starts the watch daemon in the current directory
  • supermodel /path/to/repo starts the watch daemon in the given directory
  • All watch flags work as before on the root command
  • supermodel watch is no longer a valid subcommand
  • Log output shows [supermodel] prefix

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Watch mode is now available directly from the root command with new flags: --cache-file, --debounce, --notify-port, --fs-watch, and --poll-interval.
  • Breaking Changes

    • The watch subcommand has been removed.
  • Chores

    • Updated log output prefix formatting.

- Remove `supermodel watch` subcommand; running `supermodel [path]` now
  starts the watch daemon directly
- Fix log prefix from [files] to [supermodel]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The watch command functionality is being moved from a dedicated watch [path] subcommand into the root command itself. The root CLI entry point now directly handles configuration loading, API key validation, path argument resolution, and watch initialization using the same flags that were previously on the watch subcommand.

Changes

Cohort / File(s) Summary
Root Command Consolidation
cmd/root.go
Root command now implements the full watch workflow (RunE): loads config, validates API key, accepts optional path argument, constructs WatchOptions from new flags (--cache-file, --debounce, --notify-port, --fs-watch, --poll-interval), and triggers files.Watch(). Added time and internal/files imports.
Subcommand Removal
cmd/watch.go
Entire watch [path] subcommand removed, including its init() registration, flag bindings, and watch invocation logic.
Log Prefix Update
internal/files/handler.go
Watch logging prefix changed from "[files] " to "[supermodel] " for consistency with branding.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🔍 The watch finds its home at the root command's door,
🚀 No more subcommand detours—just flags to explore,
🎯 Config checks and API keys, all in one flow,
📡 The files begin dancing where supermodel logs glow! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Make watch the default command' accurately describes the main change: promoting the watch functionality from a subcommand to the root command behavior.
Description check ✅ Passed The PR description covers the main changes and includes a test plan with checkboxes, though it deviates from the template by using a 'Summary' section instead of the 'What/Why/Test plan' structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch make-watch-default

Comment @coderabbitai help to get the list of available commands and usage tips.

@greynewell greynewell merged commit f830ccf into main Apr 7, 2026
6 of 7 checks passed
@greynewell greynewell deleted the make-watch-default branch April 7, 2026 21:56
jonathanpopham added a commit that referenced this pull request Apr 29, 2026
The 'watch' subcommand was removed in #60 — running 'supermodel [path]'
is now the daemon. The setup wizard's exit message and several spots
in the README still told users to run 'supermodel watch', which fails
with 'unknown command'. Reported in #149.

- internal/setup/wizard.go:133 — 'just run `supermodel watch`' → '`supermodel`'
- internal/setup/wizard.go:194 — 'Run `supermodel watch` to restart' → '`supermodel`'
- README.md — 'How it works', the agent compatibility table, and Quick
  start all updated to use the bare command.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant