Skip to content

list: add --ours to show only everyhook entries across agents (#9) - #10

Merged
nrzz merged 1 commit into
nrzz:mainfrom
yoreva-01:feat/list-ours
Oct 28, 2026
Merged

nrzz merged 1 commit into
nrzz:mainfrom
yoreva-01:feat/list-ours

Conversation

@yoreva-01

Copy link
Copy Markdown
Contributor

What and why

Fixes #9.

Adds --ours to everyhook list:

  • Filters hook entries to only those written by everyhook (ours: true).
  • Drops files whose hooks are all non-everyhook (or empty), consistent with --hook <name>.
  • Count summary and JSON output reflect --ours (ours: true included in JSON).
  • Fully combinable with --agent, --event, --hook, --problems, and --project.
  • Returns exit code 0 when no ours hooks match (with standard 0 hooks summary), and exit code 1 if matching ours hooks have problems.
  • Flags passed with a value (--ours=val) or specified more than once exit code 2 as a usage error.

How it was tested

Added 4 dedicated automated tests in test/list.test.mjs:

  1. list --ours: shows only entries written by everyhook and omits files with no matching entries (verifies text and JSON output, and dropping non-everyhook files).
  2. list --ours combines with --agent, --event, --problems, and --project (verifies combinations, problem reporting on matching ours entries with exit 1).
  3. list --ours with no ours hooks reports 0 hooks in 0 files and exits 0 (verifies clean empty report in text and JSON).
  4. list --ours usage errors: with value or twice exits 2.

Ran full test suite:

  • node --test test/list.test.mjs: 32/32 tests pass.
  • node --test test/readme.test.mjs: 29/29 tests pass.
  • node --test test/repo.test.mjs: 13/13 tests pass (LF line endings and repo contracts verified).
  • Full npm test: 332 tests reported by runner, 282 passed, 0 failed, 50 skipped on Windows.

Checklist

  • npm test passes, and the change has a test
  • No new dependencies
  • Tests use a temporary folder, never a real home or config folder
  • A statement about how an agent behaves was put to the real binary (or the README and explain say docs)
  • Token cost: unchanged, or stated here and in the README's "What it costs in tokens"
  • README and CHANGELOG updated where they describe what changed

@nrzz
nrzz merged commit cae0de0 into nrzz:main Oct 28, 2026
13 checks passed
nrzz added a commit that referenced this pull request Oct 28, 2026
list --ours shows only the entries everyhook wrote, across the agents,
leaving out the files whose hooks are all someone else's, from the fifth
outside pull request, #10 by @yoreva-01, for the good first issue #9.
The next good first issue is #11: list --theirs, only the entries
everyhook did not write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nrzz

nrzz commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Merged and released as 1.5.0, with your name in the changelog and the release notes. Thank you; the four cuts of list are yours now, and this one is the set that uninstall and restore act on.

The suite was green on this machine (332 tests, 50 of them skipped without the agents' variables) and in CI on all three systems, test and real-agent jobs alike, before the merge. The README's test count you updated matched what node --test reports here, less the fifteen helper files, so the release commit changed nothing in it.

If you want the next one, #11 is the other half: list --theirs, only the entries everyhook did not write, the hooks that uninstall and restore leave alone.

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.

list --ours: only the entries everyhook wrote, across the agents

2 participants