Skip to content

docs: document CLI flags, config gotchas and library tuning in README - #60

Merged
ak9024 merged 1 commit into
mainfrom
docs/readme-refresh
Aug 1, 2026
Merged

ak9024 merged 1 commit into
mainfrom
docs/readme-refresh

Conversation

@ak9024

@ak9024 ak9024 commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

The README had drifted behind the crate — it still pointed at a git-only install, listed no watch flags, and said nothing about the behaviours that most often trip people up. This brings it back in line with the code as it stands after the builder-API and monorepo-init work.

  • Install from crates.io first, git as the fallback; state the 1.85.0 MSRV.
  • New watch-options flag table (-d/-c/-i/--bin_path/--bin_arg/--cfg/--monitor), with the note that --cmd is required in flags-only mode.
  • New "things that surprise people" section: ignore replaces the defaults rather than extending them, a cmd list runs in parallel, commands need no cd prefix, a relative bin_path resolves against the workspace dir, env_file's leading / means project root (not filesystem-absolute), only data-modification events reload, and the config file wins over CLI flags.
  • Monitor section documents the keybindings and that it matches running processes against rustywatch.yaml.
  • Library section covers extend_ignore, the up-front validation in builder()/from_config*(), debounce tuning via debounce_delay/max_debounce_delay, and the full list of supported re-exports.
  • cargo install rustywatch --force for updates (the plain form is a no-op when already current).
  • Supported-languages list becomes a marker-file table including Python.

Test plan

  • cargo test --doc passes (7 tests). The README itself is not wired into doctests, so the snippets were checked against the source instead: extend_ignore at src/config/schema.rs:131, debounce_delay/max_debounce_delay at src/watcher.rs:181,190, and the flag table against WatchArgs in src/args.rs.
  • Docs-only change — no source files touched.

Note: a stale local branch docs/update-readme still exists from #51 (already merged as f430ff6), which is why this one is named docs/readme-refresh.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded setup guidance for multi-project workspaces and installation.
    • Documented monitoring controls, library validation, debounce configuration, and CLI watch options.
    • Added supported language detection details, troubleshooting notes, and library API examples.
    • Clarified process-monitor behavior and Rust 1.85 compatibility requirements.
    • Updated the upgrade command to use forced installation.

Bring the README back in line with the crate as it stands after the
builder-API and monorepo-init work:

- install from crates.io first, git as the fallback; state the 1.85.0 MSRV
- add a watch-options flag table (-d/-c/-i/--bin_path/--bin_arg/--cfg/--monitor)
- add a "things that surprise people" section covering the behaviours that
  are easy to get wrong: ignore replaces the defaults rather than extending
  them, a cmd list runs in parallel, commands need no cd prefix, relative
  bin_path resolves against the workspace dir, env_file's leading slash means
  project root, only data-modification events reload, config beats CLI flags
- document the monitor keybindings and that it matches processes against
  rustywatch.yaml
- cover extend_ignore, up-front validation and debounce tuning in the library
  section, plus the full list of supported re-exports
- use --force for the update instruction, and list the init-detected languages
  with their marker files

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

README.md documents project setup, configuration, watch mode, monitoring, library usage, language detection, and package upgrades.

Changes

README documentation

Layer / File(s) Summary
Installation and project setup
README.md
Documents multi-project initialization, the Rust 1.85 MSRV, Cargo installation, and automatic language detection.
Configuration and monitoring
README.md
Explains configuration precedence, path handling, watch-mode options, workspace command matching, and process-monitor controls.
Library and upgrade guidance
README.md
Documents library validation, typed errors, ignore extensions, debounce settings, public APIs, and forced upgrade installation.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the README documentation updates for CLI flags, configuration behavior, and library tuning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-refresh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rustywatch with  Cloudflare Pages  Cloudflare Pages

Latest commit: cce34a8
Status: ✅  Deploy successful!
Preview URL: https://0923a080.rustywatch.pages.dev
Branch Preview URL: https://docs-readme-refresh.rustywatch.pages.dev

View logs

@ak9024
ak9024 merged commit 028fa22 into main Aug 1, 2026
25 of 26 checks passed
@ak9024
ak9024 deleted the docs/readme-refresh branch August 1, 2026 05:10

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 264-267: Update the validation wording in the README around
builder(), from_config(), and from_config_file(): state that builder().build()
reports builder validation errors, while from_config() and from_config_file()
return constructor-time validation errors before run(). Preserve the listed
validation cases and distinguish the timing for each construction path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bb3d0ee6-d407-49bc-a5f0-bcf2f48f58d7

📥 Commits

Reviewing files that changed from the base of the PR and between 72adc87 and cce34a8.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md
Comment on lines +264 to +267
safe to embed in a larger application. `builder()`, `from_config()` and
`from_config_file()` all validate up front (non-empty workspaces, non-blank
`dir`, non-empty `cmd`, ignore patterns compile as globs), so a bad config fails
at `build()` rather than mid-run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## README surrounding lines"
sed -n '240,285p' README.md | cat -n

echo
echo "## Files mentioning builder/from_config/from_config_file/run/build"
rg -n "builder\\(|from_config\\(|from_config_file\\(|func .*build|\\.build\\(|\\.run\\(" -S .

Repository: ak9024/rustywatch

Length of output: 7734


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "## Candidate Go files"
fd -e go . | sort | head -100

echo
echo "## Read likely implementation files around relevant symbols"
for f in $(rg -l "func (builder|from_config|from_config_file|.*build|.*run)|type .*Config|struct .*Config|Validate|non-empty workspaces|non-blank|non-empty cmd" -S .); do
  echo "### $f"
  wc -l "$f"
  rg -n "func (builder|from_config|from_config_file|.*build|.*run)|type .*Config|struct .*Config|Validate|non-empty workspaces|non-blank|non-empty cmd|build\\(|run\\(" "$f" -C 2
done

Repository: ak9024/rustywatch

Length of output: 8451


Clarify when each constructor returns validation errors.

from_config_file(...) and from_config(...) return before .run() in the documented examples, so “fails at build()” is incorrect for those paths. Split the wording: builder().build() reports builder validation, while from_config() and from_config_file() report constructor-time validation for the same errors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 264 - 267, Update the validation wording in the
README around builder(), from_config(), and from_config_file(): state that
builder().build() reports builder validation errors, while from_config() and
from_config_file() return constructor-time validation errors before run().
Preserve the listed validation cases and distinguish the timing for each
construction path.

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