Three small non-interactive flags that let AI agents and shell scripts talk to fileview without spinning up the TUI or the MCP server.
Added
fv --tokens <path>prints a cl100k_base token estimate for the file to stdout and exits. Useful for budgeting context before assembling a prompt. Falls back to thechars / 4heuristic when theaifeature is off.fv --snapshot-create <name>captures a working-tree manifest (path / size / mtime, dotfiles skipped) to.fileview/snapshots/<name>.json.fv --snapshot-diff <name>then prints+ added,- removed, andM modifiedlines for every change since the snapshot. Lets a long-running agent answer "what have I touched since this session started" without committing intermediate state.fv --watch <path> [--watch-timeout-secs N]blocks until the path is modified externally, prints the changed paths, and exits. Exit code0on change,1on timeout. Drains the initial filesystem-event burst (notably macOS FSEvents replays) before waiting so a freshly created file does not register as an immediate "change".
Internal
- New modules
integrate::snapshotandintegrate::watch. - 21 new tests across unit (
src/integrate/) and e2e (tests/e2e/).
What's Changed
- Add
--tokens <path>CLI for one-shot token estimates (#204) - Add
--snapshot-create/--snapshot-difffor ad-hoc working-tree diffs (#205) - Add
--watch <path>for block-until-changed detection (#206) - Release 2.7.0: document the new flags (#207)
Full Changelog: v2.6.0...v2.7.0