geethob 0.1.0

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.
package/dist/geethob ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "geethob",
3
+ "version": "0.1.0",
4
+ "description": "Turn git history into prose narrative. Open-source CLI + AI-harness skill.",
5
+ "type": "module",
6
+ "module": "src/cli.ts",
7
+ "bin": {
8
+ "geethob": "./dist/cli.js"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "skill/",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "scripts": {
17
+ "dev": "bun run src/cli.ts",
18
+ "build": "bun build src/cli.ts --target=node --outfile=dist/cli.js --minify",
19
+ "build:bin": "bun build src/cli.ts --compile --outfile=dist/geethob",
20
+ "build:bin:darwin-arm64": "bun build src/cli.ts --compile --target=bun-darwin-arm64 --outfile=dist/geethob-darwin-arm64",
21
+ "build:bin:darwin-x64": "bun build src/cli.ts --compile --target=bun-darwin-x64 --outfile=dist/geethob-darwin-x64",
22
+ "build:bin:linux-x64": "bun build src/cli.ts --compile --target=bun-linux-x64 --outfile=dist/geethob-linux-x64",
23
+ "test": "bun test",
24
+ "typecheck": "tsc --noEmit"
25
+ },
26
+ "engines": {
27
+ "node": ">=20"
28
+ },
29
+ "keywords": [
30
+ "git",
31
+ "github",
32
+ "changelog",
33
+ "ai",
34
+ "narrative",
35
+ "cli",
36
+ "claude",
37
+ "mcp",
38
+ "skill"
39
+ ],
40
+ "author": "Hemant Bangar",
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/hemant1996/geethob"
45
+ },
46
+ "dependencies": {
47
+ "@anthropic-ai/sdk": "^0.40.0",
48
+ "@octokit/rest": "^21.0.0",
49
+ "commander": "^12.1.0",
50
+ "simple-git": "^3.27.0",
51
+ "smol-toml": "^1.3.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/bun": "latest",
55
+ "@types/node": "^20.0.0",
56
+ "typescript": "^5.5.0"
57
+ }
58
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: geethob
3
+ description: Turn git history into prose narrative. Use when the user asks "what changed in this repo," "summarize these commits," "narrate the history of <feature>," "what did <person> ship last week," or any "tell me the story of …" question against a git repository or a GitHub user. Two modes — `story` (history of a repo/path) and `digest` (a developer's recent activity). Output is prose, not bullet lists.
4
+ ---
5
+
6
+ # geethob
7
+
8
+ You have access to the `geethob` CLI, which turns git history into prose narrative. Use it whenever the user asks for a story-grained summary of code changes, instead of reading individual commits or diffs yourself.
9
+
10
+ ## When to invoke
11
+
12
+ Invoke geethob for any of these:
13
+
14
+ - "What changed in `<repo or path>` lately?"
15
+ - "Summarize the last N commits / week / month."
16
+ - "Tell me the story of how `<feature>` was built."
17
+ - "What did `<author>` ship this week?"
18
+ - Before extending an existing feature — pull a narrative of its history first to ground your work.
19
+
20
+ Do **not** invoke geethob for:
21
+
22
+ - Reading a specific PR or diff line-by-line — use `gh pr view` / `git show` instead.
23
+ - File-level code questions ("what does this function do") — read the file directly.
24
+ - Anything outside a git repository.
25
+
26
+ ## Usage
27
+
28
+ The binary lives on the user's `$PATH` as `geethob`. Run it via shell tool.
29
+
30
+ ### `geethob story <scope>`
31
+
32
+ Narrate the history of a path or repo.
33
+
34
+ ```bash
35
+ # Local repo, whole history (capped at 200 commits)
36
+ geethob story /path/to/repo
37
+
38
+ # Local repo, restricted to a subpath
39
+ geethob story /path/to/repo --path src/auth --since 30d
40
+
41
+ # Public GitHub repo
42
+ geethob story bun-sh/bun --max-commits 50
43
+
44
+ # Stream off (one-shot, useful if you're capturing output)
45
+ geethob story . --no-stream
46
+ ```
47
+
48
+ ### `geethob digest`
49
+
50
+ Narrate a developer's recent work.
51
+
52
+ ```bash
53
+ # Current working tree, last 7 days
54
+ geethob digest --since 7d
55
+
56
+ # A single remote repo
57
+ geethob digest --repo facebook/react --since 14d
58
+
59
+ # A specific developer's public activity (when no local repo applies)
60
+ geethob digest --author tj --since 7d
61
+ ```
62
+
63
+ ### `geethob configure`
64
+
65
+ Writes `~/.config/geethob/config.toml` with an Anthropic API key. Skip if `ANTHROPIC_API_KEY` is already in the environment.
66
+
67
+ ## Auth
68
+
69
+ - **Model API:** `ANTHROPIC_API_KEY` env var, or the stored config file.
70
+ - **GitHub (for remote scopes):** `gh auth status` session OR `GH_TOKEN` env var. Optional for `story` against a local clone.
71
+
72
+ ## Exit codes
73
+
74
+ - 0 — Success (including empty commit range, which is not an error)
75
+ - 1 — Usage error
76
+ - 2 — Not a git repo or `git` missing
77
+ - 3 — Missing/invalid Anthropic key
78
+ - 4 — Model API error after one retry
79
+ - 5 — GitHub auth required, rate limited, or repo not found
80
+
81
+ ## Notes for the agent
82
+
83
+ - Output is **prose**, not structured data. Don't post-process it into bullet lists.
84
+ - For long histories, geethob truncates to the most recent N commits and prints a warning. If the user needs older history, they should pass `--since <ref>` or raise `--max-commits`.
85
+ - geethob never sees the full diff — only commit messages + diffstats. This keeps narratives at the story grain. If the user needs line-level analysis, read the diff yourself.
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # Install the geethob skill into the user's Claude Code skill directory.
3
+ set -euo pipefail
4
+
5
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
+ TARGET="${CLAUDE_SKILLS_DIR:-$HOME/.claude/skills}/geethob"
7
+
8
+ if ! command -v geethob >/dev/null 2>&1; then
9
+ echo "geethob binary not found on \$PATH." >&2
10
+ echo "Install it first (see https://github.com/hemant1996/geethob#install), then re-run this script." >&2
11
+ exit 1
12
+ fi
13
+
14
+ mkdir -p "$TARGET"
15
+ cp "$SCRIPT_DIR/SKILL.md" "$TARGET/SKILL.md"
16
+
17
+ echo "Installed geethob skill to $TARGET"
18
+ echo "Restart Claude Code (or reload skills) to pick it up."