agent-thanks 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. agent_thanks-0.6.0/CHANGELOG.md +236 -0
  2. agent_thanks-0.6.0/CODE_OF_CONDUCT.md +25 -0
  3. agent_thanks-0.6.0/CONTRIBUTING.md +33 -0
  4. agent_thanks-0.6.0/LICENSE +21 -0
  5. agent_thanks-0.6.0/MANIFEST.in +9 -0
  6. agent_thanks-0.6.0/PKG-INFO +311 -0
  7. agent_thanks-0.6.0/README.md +284 -0
  8. agent_thanks-0.6.0/SECURITY.md +26 -0
  9. agent_thanks-0.6.0/SUPPORT.md +21 -0
  10. agent_thanks-0.6.0/docs/assets/agent-thanks-banner.svg +70 -0
  11. agent_thanks-0.6.0/docs/assets/agent-thanks-social-preview.png +0 -0
  12. agent_thanks-0.6.0/docs/assets/agent-thanks-social-preview.svg +68 -0
  13. agent_thanks-0.6.0/docs/assets/terminal-walkthrough.svg +89 -0
  14. agent_thanks-0.6.0/docs/design.md +296 -0
  15. agent_thanks-0.6.0/docs/integrations.md +211 -0
  16. agent_thanks-0.6.0/docs/recipes.md +242 -0
  17. agent_thanks-0.6.0/docs/troubleshooting.md +187 -0
  18. agent_thanks-0.6.0/examples/session.jsonl +4 -0
  19. agent_thanks-0.6.0/pyproject.toml +53 -0
  20. agent_thanks-0.6.0/setup.cfg +4 -0
  21. agent_thanks-0.6.0/src/agent_thanks/__init__.py +3 -0
  22. agent_thanks-0.6.0/src/agent_thanks/__main__.py +5 -0
  23. agent_thanks-0.6.0/src/agent_thanks/cli.py +1063 -0
  24. agent_thanks-0.6.0/src/agent_thanks/entry.py +149 -0
  25. agent_thanks-0.6.0/src/agent_thanks/exporter.py +121 -0
  26. agent_thanks-0.6.0/src/agent_thanks/github.py +175 -0
  27. agent_thanks-0.6.0/src/agent_thanks/manifests.py +302 -0
  28. agent_thanks-0.6.0/src/agent_thanks/models.py +159 -0
  29. agent_thanks-0.6.0/src/agent_thanks/repositories.py +130 -0
  30. agent_thanks-0.6.0/src/agent_thanks/resolver.py +85 -0
  31. agent_thanks-0.6.0/src/agent_thanks/scanner.py +298 -0
  32. agent_thanks-0.6.0/src/agent_thanks/session.py +1160 -0
  33. agent_thanks-0.6.0/src/agent_thanks/transcripts.py +1407 -0
  34. agent_thanks-0.6.0/src/agent_thanks.egg-info/PKG-INFO +311 -0
  35. agent_thanks-0.6.0/src/agent_thanks.egg-info/SOURCES.txt +50 -0
  36. agent_thanks-0.6.0/src/agent_thanks.egg-info/dependency_links.txt +1 -0
  37. agent_thanks-0.6.0/src/agent_thanks.egg-info/entry_points.txt +2 -0
  38. agent_thanks-0.6.0/src/agent_thanks.egg-info/requires.txt +3 -0
  39. agent_thanks-0.6.0/src/agent_thanks.egg-info/top_level.txt +1 -0
  40. agent_thanks-0.6.0/tests/test_assets.py +58 -0
  41. agent_thanks-0.6.0/tests/test_cli.py +422 -0
  42. agent_thanks-0.6.0/tests/test_entry.py +216 -0
  43. agent_thanks-0.6.0/tests/test_exporter.py +181 -0
  44. agent_thanks-0.6.0/tests/test_github.py +147 -0
  45. agent_thanks-0.6.0/tests/test_hooks.py +1173 -0
  46. agent_thanks-0.6.0/tests/test_manifests.py +180 -0
  47. agent_thanks-0.6.0/tests/test_models.py +91 -0
  48. agent_thanks-0.6.0/tests/test_release_metadata.py +54 -0
  49. agent_thanks-0.6.0/tests/test_repositories.py +105 -0
  50. agent_thanks-0.6.0/tests/test_resolver.py +40 -0
  51. agent_thanks-0.6.0/tests/test_scanner.py +719 -0
  52. agent_thanks-0.6.0/tests/test_transcripts.py +1073 -0
@@ -0,0 +1,236 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.6.0 - 2026-09-15
8
+
9
+ - Make `agent-thanks thanks` the primary user workflow. With no explicit
10
+ `--from` or `--session`, it selects the newest Claude Code, Codex, or Gemini
11
+ transcript that the existing transcript locator can prove belongs to the
12
+ current project, then combines that evidence with project changes before the
13
+ normal interactive Star review. If no matching transcript exists, it scans
14
+ project changes only instead of guessing.
15
+ - Reframe the product around its intended outcome: find open-source repositories
16
+ a coding agent actually used and help a person thank verified repositories
17
+ with GitHub Stars. Provenance and evidence remain the conservative safety
18
+ layer behind the Star prompt, not the end product.
19
+ - Add a dedicated top-level and `thanks` help experience while keeping `run` as
20
+ a lower-level compatibility command.
21
+ - Verify the new entry point across Python 3.10 through 3.14, Windows, macOS,
22
+ built wheels, source distributions, and an installed `thanks --dry-run`
23
+ smoke flow before release.
24
+
25
+ ## 0.5.1 - 2026-09-03
26
+
27
+ - Treat a project directory the platform cannot resolve as identifying nothing.
28
+ A transcript whose recorded directory holds an embedded null byte no longer
29
+ ends the scan with an error, and it never merges with another file recording
30
+ the same malformed directory, so one file's recorded success can never speak
31
+ for a command in another. This holds on every platform: POSIX and Windows
32
+ disagree about such paths, so they are refused before either is consulted.
33
+ - Ship `examples/session.jsonl` in the source distribution again. The packaging
34
+ list still named the `examples/*.log` file that 0.5.0 replaced, so source
35
+ distributions carried no example at all; a release check now fails when the
36
+ bundled example is missing.
37
+ - Name the evidence source in the README walkthrough after the transcript the
38
+ documented commands actually scan, instead of a file name no run produces.
39
+
40
+ ## 0.5.0 - 2026-09-03
41
+
42
+ - Count a session command as verified use only when its own successful
43
+ completion is recorded: the recorded result must carry an exact success
44
+ signal and no failure signal, the tool call must be a single logical line,
45
+ and the statement must be a single command or an `&&` chain whose other
46
+ segments are trivially safe (`cd`, `mkdir`, `echo`, and similar; `set`,
47
+ `export`, `printf`, variable assignments, and `env` wrappers with
48
+ assignments or options are not, because `set -n` skips execution and an
49
+ assignment can redirect `PATH` to a fake `git`), and every executable must
50
+ be named without a path. Failed,
51
+ conflicting, unjudgeable, and missing results, transcripts without results,
52
+ multi-line invocations, and compound statements such as
53
+ `git clone URL || true` or `eval 'exit 0' && git clone URL` stay references,
54
+ and the evidence names the reason.
55
+ - Treat plain-text session logs as review-only by default, because they record
56
+ no results; `--trust-session` attests that their commands succeeded.
57
+ - Read coding-agent transcripts (JSON and JSON Lines) with `--session`,
58
+ pairing recognized shell-tool calls in the supported structured formats
59
+ (Claude Code, Codex CLI, and Gemini CLI records) with their recorded
60
+ results. Success is read only from the structured field each agent writes,
61
+ in the position it writes it (a Claude Code `tool_result` inside a user
62
+ message, a Codex output item paired with a Codex call record of its own
63
+ `shell` or `exec_command` tool; Gemini has none), only for calls and results
64
+ at the positions the agent writes them, only for the agent's own shell tool
65
+ (`Bash` for Claude Code), only after the call it names, only when every
66
+ item's own role agrees with its record, only when the envelope can be
67
+ scanned completely and no contradictory or malformed field anywhere in the
68
+ whole result record blocks the success, and only when every transcript of
69
+ the same recorded session and project scanned together agrees about the
70
+ call, never from program output or bare text; every JSON record and
71
+ JSON-encoded result is parsed rejecting duplicate keys; a transcript with an
72
+ unparsable line promotes nothing, in any file; provenance prose counts only
73
+ at an assistant message position; several
74
+ results for one call combine failure first; a call id reused for different
75
+ calls, or a call found outside a recognized tool call position, attributes
76
+ no result; call-shaped objects inside user or tool content are never
77
+ actions; provenance phrases count in prose only, never inside a command.
78
+ Only known shell
79
+ tools count; other tools contribute references. In agent prose only
80
+ line-initial provenance statements count as use. Tool output, user prompts,
81
+ and hidden reasoning are never actions.
82
+ - Recognize Codex `exec_command` results, whose exit code is recorded in a
83
+ header ahead of the program output, and Codex hooks, whose payloads name the
84
+ shell tool `Bash`. Code-mode `exec` programs yield references only; the
85
+ hook log covers the calls they make. Gemini CLI yields review-only
86
+ references, because its
87
+ shell tool marks success only by the absence of failure signals.
88
+ - Replace the bundled plain-text example with `examples/session.jsonl`, a
89
+ transcript whose classification matches `agent-thanks demo`.
90
+ - Add `--from claude-code|codex|gemini` to `scan`, `run`, and `hook stop` to
91
+ locate the transcript whose recorded project directory equals the current
92
+ one and whose recorded session identifier matches the hook payload exactly,
93
+ never by file name alone, honoring `CLAUDE_CONFIG_DIR` and `CODEX_HOME`, and
94
+ to fail rather than guess.
95
+ - Create the `.agent-thanks` state directory and its files readable by their
96
+ owner only on POSIX, tightening every known file on each run, because hook
97
+ logs keep raw shell commands; refuse symbolic links and special files
98
+ anywhere in the state directory for reads and writes alike, write whole
99
+ files through a private temporary file, and prune only regular files inside
100
+ it.
101
+ - Add `agent-thanks hook record` and `agent-thanks hook stop`, detection-only
102
+ entry points for agent hooks. `record` keeps a structured per-session log
103
+ with each command's recorded status and basis, treating the Claude Code
104
+ success-only post-tool event as a success basis only when started with
105
+ `--from claude-code` and only for a `PostToolUse` payload of the `Bash` tool,
106
+ never recording pre-tool events; a Codex entry is `ok` only for a
107
+ `PostToolUse` payload of its canonical `Bash` tool with an explicit exit
108
+ status of 0; a Claude Code `PostToolUseFailure` payload records an error;
109
+ Gemini has no success contract. Every entry carries a schema marker, the
110
+ agent, the event, the tool, and the tool call id; a stored success counts
111
+ only while those fields still form one of the two contracts, and a log with
112
+ any corrupted line promotes nothing.
113
+ `stop` treats that log as the authority for actions, combining several
114
+ entries for one call failure first, overriding the transcript's own result
115
+ only when call id and exact command text both match and the transcript
116
+ recorded no failure, leaving mismatches and transcript commands the log
117
+ never saw unconfirmed (a failure whose call record is missing from a partial
118
+ transcript still counts), promotes successful entries only, writes
119
+ per-session reports, and announces newly verified repositories once per
120
+ session, without ever changing a Star. With `--from codex` or `--from
121
+ gemini` the hooks answer `{}` when silent, as those hook contracts require.
122
+ - Bundle a Claude Code plugin marketplace with hooks and a `/thanks` command.
123
+ - Scope hook logs, reports, and announcements by the session or thread
124
+ identifier every supported hook contract carries, or by the transcript path
125
+ when a payload lacks one; a payload with neither is not recorded and never
126
+ announced. File names are a sanitized prefix plus a hash of the whole scope,
127
+ so distinct sessions never share a file. Commands are stored and compared
128
+ with outer whitespace removed.
129
+ - Document pip and release-wheel installation for environments without `pipx`.
130
+
131
+ ## 0.4.2 - 2026-09-02
132
+
133
+ - Restore repository detection for editable VCS requirements such as
134
+ `-e git+https://github.com/owner/repository.git#egg=name`, which 0.4.1 left
135
+ unresolved.
136
+ - Never map a dependency through PyPI, npm, or crates.io when its manifest pins
137
+ a Git, URL, local path, workspace, or alternative-registry source. Such
138
+ dependencies count only when the pinned source itself names a GitHub
139
+ repository and are otherwise reported as unresolved.
140
+ - Ignore local path requirements such as `vendor/pkg` instead of reading them
141
+ as GitHub `owner/repository` shorthand.
142
+ - Treat an existing dependency that is repinned to a different repository
143
+ source as new use of that repository, with evidence that names the source
144
+ change.
145
+ - Validate evidence confidence and meaningful-use fields when reading a report,
146
+ and report malformed JSON reports as errors instead of a traceback.
147
+
148
+ ## 0.4.1 - 2026-09-02
149
+
150
+ - Match high-confidence session evidence to the exact repository targeted by a
151
+ supported command or provenance phrase, leaving nearby URLs as review-only
152
+ references.
153
+ - Parse shell options, non-mutating flags, command reachability, comments,
154
+ document examples, heredocs, and line continuations conservatively so
155
+ ambiguous session text fails closed.
156
+ - Recognize repository operands in `gh repo clone` and package-manager GitHub
157
+ shorthand without weakening the per-repository evidence boundary.
158
+ - Require direct, valid GitHub targets in commands and package metadata instead
159
+ of promoting GitHub text embedded inside unrelated or malformed URLs.
160
+
161
+ ## 0.4.0 - 2026-08-28
162
+
163
+ - Require a real interactive terminal and a default-No decision for every live
164
+ Star; the authenticated GitHub account is shown before approval.
165
+ - Check existing Stars before prompting, so one account is not asked to approve
166
+ the same repository again.
167
+ - Remove persistent `ask`/`auto` configuration and all unattended Star paths,
168
+ including `--mode`, `--yes`, and `--all --yes`.
169
+ - Make low-confidence and viewed-only references ineligible for Star even when
170
+ requested explicitly with `--repo`.
171
+ - Keep detection, JSON reports, review, Markdown export, demo, and dry-run
172
+ workflows non-interactive and free of Star mutations.
173
+ - Add `agent-thanks export` for deterministic, shareable Markdown evidence with
174
+ optional review-only references and sanitized absolute source paths.
175
+ - Require interactive confirmation for Unstar operations and preserve exact Undo
176
+ receipts for new Stars and partial failures.
177
+ - Ignore legacy 0.3.x consent configuration safely and document migration to
178
+ evidence-only automation.
179
+ - Align README, design notes, recipes, troubleshooting, terminal visuals, CI,
180
+ and package metadata with the new human-confirmation invariant.
181
+ - Publish wheel and source distributions with SHA-256 checksums in the GitHub
182
+ Release workflow.
183
+
184
+ ## 0.3.1 - 2026-08-28
185
+
186
+ - Add `agent-thanks demo`, a credential-free and network-free preview of the
187
+ evidence, review, and dry-run experience.
188
+ - Verify the demo from the built wheel in CI.
189
+ - Clarify the task-level positioning relative to whole-project dependency
190
+ starring tools.
191
+ - Document that `ATTRIBUTION.md` v0.1 parsing is planned rather than currently
192
+ implemented, and that its `mode: suggest` requires per-repository consent.
193
+
194
+ ## 0.3.0 - 2026-08-27
195
+
196
+ - Prevent renamed or relocated manifests from making existing dependencies look
197
+ newly introduced.
198
+ - Compare dependency changes against the full Git baseline so a dependency
199
+ moved between manifests is not recommended twice.
200
+ - Keep dry-run operations completely detached from GitHub authentication.
201
+ - Add live-compatible coverage for missing credentials and GitHub 401, 403, and
202
+ 404 failures without reporting false success.
203
+ - Add `agent-thanks doctor` to verify Python, Git, project state, consent mode,
204
+ and the authenticated GitHub account before the first Star.
205
+ - Check existing Star state so repeated runs report `Already starred` without
206
+ claiming a new mutation.
207
+ - Print an exact one-command Undo receipt for every newly completed batch,
208
+ including API and network failures after partial progress.
209
+ - Add direct Go module and Git submodule detection.
210
+ - Recognize bare `github.com/owner/repository` references in agent transcripts.
211
+ - Test Python 3.10 through 3.14 plus Windows and macOS smoke environments.
212
+ - Add a 60-second onboarding path, usage recipes, troubleshooting guidance,
213
+ an accessible terminal walkthrough, and a GitHub social preview.
214
+
215
+ ## 0.2.0 - 2026-08-26
216
+
217
+ - Add persistent `ask` and `auto` consent modes with interactive first-run setup.
218
+ - Add `agent-thanks config` for setting, changing, and inspecting consent policy.
219
+ - Add `agent-thanks run` to scan and apply the selected policy in one command.
220
+ - Add per-run `--mode ask|auto` overrides that do not mutate saved settings.
221
+ - Make every prompt in `ask` mode default to No and retain final batch approval.
222
+ - Restrict `auto` to verified meaningful-use candidates; viewed-only and
223
+ low-confidence references remain unstarred.
224
+ - Save configuration atomically with owner-only POSIX permissions.
225
+ - Add safe non-interactive error handling and Ctrl-C cancellation.
226
+ - Expand the test suite for setup, persistence, overrides, and both consent modes.
227
+ - Add issue forms, pull request guidance, security policy, code ownership, and
228
+ dependency update configuration for the public repository.
229
+
230
+ ## 0.1.0 - 2026-08-26
231
+
232
+ - Add Git-aware dependency scanning for Python, Node.js, and Rust manifests.
233
+ - Add agent-session GitHub repository detection with meaningful-use evidence.
234
+ - Add PyPI, npm, and crates.io repository metadata resolution.
235
+ - Add review, consent-gated star, dry-run, and unstar commands.
236
+ - Add Python 3.10–3.13 test workflow and standard-library test suite.
@@ -0,0 +1,25 @@
1
+ # Code of conduct
2
+
3
+ ## Our standard
4
+
5
+ This project welcomes people of every background and experience level.
6
+ Participants are expected to communicate respectfully, discuss technical
7
+ decisions in good faith, and give actionable feedback without personal attacks.
8
+
9
+ Harassment, discrimination, intimidation, doxxing, sexualized conduct, and
10
+ deliberate disruption are not acceptable in issues, pull requests, discussions,
11
+ or other project spaces.
12
+
13
+ ## Enforcement
14
+
15
+ Project maintainers may edit or remove inappropriate content and may temporarily
16
+ or permanently restrict participation when necessary to protect the community.
17
+ Enforcement decisions should be proportionate, documented privately, and
18
+ focused on maintaining a constructive environment.
19
+
20
+ ## Reporting
21
+
22
+ Report conduct concerns privately through the repository owner's GitHub profile.
23
+ Do not publish private information about another person while reporting an
24
+ incident. Reports will be reviewed fairly and kept confidential to the extent
25
+ practical.
@@ -0,0 +1,33 @@
1
+ # Contributing
2
+
3
+ Thanks for helping make AI-assisted open-source acknowledgment more accurate
4
+ and less noisy.
5
+
6
+ ## Local setup
7
+
8
+ ```bash
9
+ python3 -m venv .venv
10
+ source .venv/bin/activate
11
+ python -m pip install -e .
12
+ python -m unittest discover -s tests -v
13
+ ```
14
+
15
+ ## Detection changes
16
+
17
+ A detector should be conservative. Pull requests that add a new high-confidence
18
+ signal should include:
19
+
20
+ - A positive test showing substantive use.
21
+ - A negative test showing a nearby but non-meaningful reference.
22
+ - A clear evidence message suitable for human review.
23
+ - No hidden network calls or account mutations during `demo`, `scan`, `review`,
24
+ or `export`.
25
+
26
+ New account mutations must preserve the per-repository interactive-confirmation
27
+ invariant and provide a reversal path where the platform supports one. Star
28
+ mutations must never gain an unattended, bulk, or piped-confirmation path.
29
+
30
+ ## Pull requests
31
+
32
+ Keep changes focused and include tests. Explain false-positive and
33
+ false-negative tradeoffs for detection logic.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yujin Hong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include CHANGELOG.md
2
+ include CODE_OF_CONDUCT.md
3
+ include CONTRIBUTING.md
4
+ include LICENSE
5
+ include README.md
6
+ include SECURITY.md
7
+ include SUPPORT.md
8
+ recursive-include docs *.md *.png *.svg
9
+ recursive-include examples *.jsonl
@@ -0,0 +1,311 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-thanks
3
+ Version: 0.6.0
4
+ Summary: Find open-source repositories used by coding agents and thank them with human-approved GitHub Stars.
5
+ Author: Yujin Hong
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dbwls99706/agent-thanks
8
+ Project-URL: Changelog, https://github.com/dbwls99706/agent-thanks/blob/main/CHANGELOG.md
9
+ Project-URL: Documentation, https://github.com/dbwls99706/agent-thanks#readme
10
+ Project-URL: Issues, https://github.com/dbwls99706/agent-thanks/issues
11
+ Project-URL: Source, https://github.com/dbwls99706/agent-thanks
12
+ Keywords: ai-agents,coding-agents,github,github-stars,open-source,open-source-sustainability,provenance,attribution,developer-tools
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Version Control :: Git
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: tomli>=2.0.1; python_version < "3.11"
26
+ Dynamic: license-file
27
+
28
+ # agent-thanks
29
+
30
+ [![Tests](https://github.com/dbwls99706/agent-thanks/actions/workflows/tests.yml/badge.svg)](https://github.com/dbwls99706/agent-thanks/actions/workflows/tests.yml)
31
+ [![Python 3.10-3.14](https://img.shields.io/badge/Python-3.10%E2%80%933.14-3776AB.svg)](https://www.python.org/)
32
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
33
+ <a href="https://smollaunch.com" target="_blank" rel="noopener"><img src="https://smollaunch.com/badges/featured.svg" alt="agent-thanks - Featured on Smol Launch" loading="lazy" width="150" height="36"></a>
34
+
35
+ **Find the open-source repositories your coding agent actually used, then thank them with a Star.**
36
+
37
+ `agent-thanks` turns one AI coding task into a trustworthy shortlist of open-source repositories worth thanking. It checks project changes and coding-agent activity, shows the evidence behind each match, then asks you before every GitHub Star.
38
+
39
+ The evidence engine is the safety layer. **The product goal is simple: make it easy to notice the open source your agent relied on and leave a visible thank-you.**
40
+
41
+ <p align="center">
42
+ <img src="https://raw.githubusercontent.com/dbwls99706/agent-thanks/main/docs/assets/agent-thanks-banner.svg" alt="AI: done in 12 seconds. Open source: 12 years in the making. Leave a star." width="900">
43
+ </p>
44
+
45
+ ## One command after the coding task
46
+
47
+ Authenticate to GitHub once:
48
+
49
+ ```bash
50
+ gh auth login
51
+ ```
52
+
53
+ Then, after an AI coding session:
54
+
55
+ ```bash
56
+ agent-thanks thanks
57
+ ```
58
+
59
+ `thanks` tries to find the newest Claude Code, Codex, or Gemini transcript that belongs to the current project. It combines that activity with the Git diff, writes a report, shows which repositories have verified evidence, and asks whether you want to Star each eligible repository.
60
+
61
+ If no matching transcript exists, it still scans project changes such as newly declared dependencies and submodules.
62
+
63
+ Want to see exactly what would happen first?
64
+
65
+ ```bash
66
+ agent-thanks thanks --dry-run
67
+ ```
68
+
69
+ Typical flow:
70
+
71
+ ```text
72
+ AI coding task
73
+ |
74
+ v
75
+ find OSS touched by the task
76
+ |
77
+ v
78
+ verify evidence
79
+ / \
80
+ verified review-only
81
+ | |
82
+ | +--> shown, never Star-eligible
83
+ v
84
+ ask you: Star this repository? [y/N]
85
+ |
86
+ v
87
+ final confirmation
88
+ |
89
+ v
90
+ GitHub Star
91
+ ```
92
+
93
+ No unattended Star mode exists. A Star always requires an interactive terminal and an explicit human decision.
94
+
95
+ ## Try it safely in 30 seconds
96
+
97
+ Install from GitHub:
98
+
99
+ ```bash
100
+ pipx install git+https://github.com/dbwls99706/agent-thanks.git
101
+ ```
102
+
103
+ Without `pipx`:
104
+
105
+ ```bash
106
+ python -m pip install "https://github.com/dbwls99706/agent-thanks/archive/refs/heads/main.zip"
107
+ ```
108
+
109
+ Then run the built-in demo:
110
+
111
+ ```bash
112
+ agent-thanks demo
113
+ ```
114
+
115
+ The demo makes no network requests, reads no credentials, writes no files, and changes no Stars.
116
+
117
+ Example:
118
+
119
+ ```text
120
+ [verified | high] https://github.com/BehaviorTree/BehaviorTree.CPP
121
+ - Session ran a repository-use command that completed successfully
122
+
123
+ [review | low] https://github.com/example/reference-only
124
+ - Repository was referenced in the session; verify actual reuse
125
+
126
+ Would star: https://github.com/BehaviorTree/BehaviorTree.CPP
127
+ ```
128
+
129
+ <p align="center">
130
+ <img src="docs/assets/terminal-walkthrough.svg" alt="Terminal walkthrough showing the detect, inspect, approve, and thank flow." width="900">
131
+ </p>
132
+
133
+ ## Why the evidence step exists
134
+
135
+ A coding agent can mention a repository without using it. A clone can fail. A shell command can hide a failure behind `|| true`. A transcript can be incomplete or contradictory.
136
+
137
+ Automatically Starring every repository URL would make the tool noisy and the Star itself less meaningful. `agent-thanks` therefore separates **finding candidates** from **proving enough to offer a Star**.
138
+
139
+ A plain URL is a reference. A verified candidate needs stronger evidence.
140
+
141
+ | Evidence | Result | Star eligible? |
142
+ | --- | --- | --- |
143
+ | Newly declared direct dependency | Verified use | Yes |
144
+ | Clone, submodule, or Git install command with recorded success | Verified use | Yes |
145
+ | Explicit provenance statement such as `Adapted from ...` | Verified use | Yes |
146
+ | GitHub URL that merely appeared | Review only | No |
147
+ | Command with missing, conflicting, or failed result | Review only | No |
148
+ | Package that cannot be mapped to a repository | Unresolved | No |
149
+
150
+ The classifier is deterministic. It does not call another model to decide whether a repository deserves a Star.
151
+
152
+ ## Human-approved means human-approved
153
+
154
+ For live Stars, `agent-thanks` intentionally makes automation stop before the social action:
155
+
156
+ - the authenticated GitHub account is shown first,
157
+ - existing Stars are detected and skipped,
158
+ - each new repository gets its own default-No `y/N` prompt,
159
+ - review-only candidates cannot be promoted with a flag,
160
+ - there is no approve-all or unattended Star mode,
161
+ - a final confirmation is required before mutations,
162
+ - partial failures print an exact undo command,
163
+ - `unstar` can revoke Stars created by mistake.
164
+
165
+ This keeps the useful automation while preserving the meaning of a GitHub Star.
166
+
167
+ ## Choose the agent explicitly when needed
168
+
169
+ Auto-detection is the normal path, but explicit sources are available:
170
+
171
+ ```bash
172
+ agent-thanks thanks --from claude-code
173
+ agent-thanks thanks --from codex
174
+ agent-thanks thanks --from gemini
175
+ ```
176
+
177
+ Or provide a transcript directly:
178
+
179
+ ```bash
180
+ agent-thanks thanks --session path/to/session.jsonl
181
+ ```
182
+
183
+ For work that is already committed, point `--base` to the revision immediately before the task:
184
+
185
+ ```bash
186
+ agent-thanks thanks --base HEAD~1 --from codex
187
+ ```
188
+
189
+ `run` remains available as the lower-level compatibility command. Unlike `thanks`, it does not auto-detect a coding agent.
190
+
191
+ ## Read-only workflows
192
+
193
+ You can use the evidence engine without ever authenticating to GitHub.
194
+
195
+ Create a report:
196
+
197
+ ```bash
198
+ agent-thanks scan --repo . --base HEAD --from claude-code
199
+ ```
200
+
201
+ Review it:
202
+
203
+ ```bash
204
+ agent-thanks review .agent-thanks-report.json
205
+ ```
206
+
207
+ Export verified use as Markdown:
208
+
209
+ ```bash
210
+ agent-thanks export .agent-thanks-report.json --output OPEN_SOURCE_USE.md
211
+ ```
212
+
213
+ Include review-only references in a separate section when useful:
214
+
215
+ ```bash
216
+ agent-thanks export .agent-thanks-report.json \
217
+ --include-low-confidence \
218
+ --output OPEN_SOURCE_USE.md
219
+ ```
220
+
221
+ The Markdown export removes absolute local directory prefixes and is suitable for a PR description, release note, audit record, or internal review.
222
+
223
+ ## What it can detect
224
+
225
+ | Source | Coverage | Evidence level |
226
+ | --- | --- | --- |
227
+ | `requirements*.txt`, `pyproject.toml` | Python direct dependencies | High |
228
+ | `package.json` | npm direct dependencies | High |
229
+ | `Cargo.toml` | Rust direct dependencies | High |
230
+ | `go.mod` | Direct Go modules | High |
231
+ | `.gitmodules` | GitHub submodules | High |
232
+ | Claude Code transcript / hooks | Repository-use commands and provenance prose | High when success is explicit |
233
+ | Codex transcript / hooks | Repository-use commands and provenance prose | High when success is explicit |
234
+ | Gemini transcript | Repository references and provenance review | Command success is review-only today |
235
+ | Plain-text log | Commands without machine-verifiable results | Review-only unless `--trust-session` is supplied |
236
+
237
+ Supported repository-use commands include Git clone and submodule operations plus Git-based installs through pip, uv, npm, pnpm, Yarn, Cargo, and Go tooling.
238
+
239
+ Package names from PyPI, npm, and crates.io can be mapped through public registry metadata. `--offline` disables those lookups. GitHub-hosted Go modules, submodules, and direct Git URLs can resolve locally.
240
+
241
+ ## Coding-agent integrations
242
+
243
+ ### Claude Code
244
+
245
+ The repository is also a Claude Code plugin marketplace:
246
+
247
+ ```text
248
+ /plugin marketplace add dbwls99706/agent-thanks
249
+ /plugin install agent-thanks@agent-thanks
250
+ ```
251
+
252
+ The plugin records supported shell events and announces newly verified open-source use after a completed turn. `/thanks` shows the current evidence. The plugin itself never authenticates to GitHub or creates a Star. Approval happens in your terminal.
253
+
254
+ ### Codex and Gemini
255
+
256
+ Codex hooks and Gemini `AfterAgent` integration are supported. Exact setup, transcript lookup behavior, and agent-specific limitations are documented in [Coding-agent integrations](docs/integrations.md).
257
+
258
+ ## Privacy
259
+
260
+ | Operation | Network behavior |
261
+ | --- | --- |
262
+ | `demo` | None |
263
+ | Transcript scan | Transcript contents stay local |
264
+ | Package resolution | Sends package names to PyPI, npm, or crates.io unless `--offline` is used |
265
+ | `review` / `export` | None |
266
+ | `doctor` | Checks the authenticated GitHub account |
267
+ | Live Star / Unstar | Uses the GitHub API for the repositories you explicitly approve |
268
+
269
+ Hook logs live under `.agent-thanks/` and are ignored by their own `.gitignore`. On POSIX, state directories and files are tightened to owner-only permissions. Symbolic links are refused in the private state path.
270
+
271
+ Logs can contain raw shell commands, including secrets typed into commands. They are pruned after 30 days and can be deleted at any time.
272
+
273
+ ## What a Star means here
274
+
275
+ A Star is a small, visible thank-you. It is not payment, legal attribution, license compliance, or a claim about authorship.
276
+
277
+ `agent-thanks` also does not try to identify model-training sources, invisible influence from model weights, every transitive dependency, or semantic similarity inferred by another model. It only acts on observable evidence from the project and the supplied coding-agent activity.
278
+
279
+ ## Design principles
280
+
281
+ **Thank first.** The end goal is to help people notice and thank open-source maintainers.
282
+
283
+ **Evidence before the prompt.** A repository must earn its place in the Star prompt through observable evidence.
284
+
285
+ **Fail closed.** Missing or contradictory success information never becomes verified use.
286
+
287
+ **Keep Stars human.** Detection can be automated. The GitHub Star cannot.
288
+
289
+ **Explain every candidate.** The report says why each repository was found and why it is or is not eligible.
290
+
291
+ ## Documentation
292
+
293
+ - [Coding-agent integrations](docs/integrations.md)
294
+ - [Usage recipes](docs/recipes.md)
295
+ - [Design and trust model](docs/design.md)
296
+ - [Troubleshooting](docs/troubleshooting.md)
297
+ - [Changelog](CHANGELOG.md)
298
+
299
+ ## Status
300
+
301
+ `agent-thanks` is alpha software. Coding-agent transcript formats are still changing, so the evidence rules intentionally prefer a missed candidate over an unjustified Star prompt.
302
+
303
+ The current implementation is heavily tested across Python 3.10 through 3.14 and Windows, macOS, and Linux CI. Contributions that add real transcript fixtures, new ecosystem resolvers, and adversarial cases are especially useful.
304
+
305
+ ## Contributing
306
+
307
+ See [CONTRIBUTING.md](CONTRIBUTING.md). If you find a case where uncertain evidence is promoted to verified use, please report it as a correctness bug.
308
+
309
+ ## License
310
+
311
+ MIT