Metadata-Version: 2.5
Name: dev-wrapped
Version: 0.1.0
Summary: Your year as a developer, as a shareable card: shell history, git and AI-agent sessions, 100% local.
Project-URL: Homepage, https://github.com/rampangeni/dev-wrapped
Project-URL: Issues, https://github.com/rampangeni/dev-wrapped/issues
Author: Ram Pangeni
License-Expression: MIT
License-File: LICENSE
Keywords: claude-code,cli,developer-tools,git,shell-history,wrapped,year-in-review
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: png
Requires-Dist: playwright>=1.45; extra == 'png'
Description-Content-Type: text/markdown

# dev-wrapped

**Your year as a developer, as a card you'll want to post.** `dev-wrapped` reads your shell history,
your git commits across every repo, and your AI coding-agent sessions, and turns them into a stack of
shareable 4:5 cards: top commands, your peak hour, longest streak, languages, how much you worked with
agents, your most mistyped command, and a rule-based developer personality.

![sample cards](docs/sample.png)
<sub>Sample cards generated from synthetic data.</sub>

```console
$ pip install dev-wrapped
$ dev-wrapped --open
```

That writes `wrapped-2026.html`: one file, no JavaScript, no network. Add `--png cards/` to save each
card as a 1080×1350 image for posting (needs `pip install 'dev-wrapped[png]' && playwright install chromium`).

## Why another "wrapped"?

Existing tools each cover one source: shell history *or* Claude Code usage. Your year is all three at once —
the terminal, the commits, and the agents you pair with. dev-wrapped merges them, so "busiest day", "streak"
and "peak hour" reflect everything you actually did, not just what one tool could see.

## What it reads

| Source | Where | What is extracted |
|---|---|---|
| Shell history | zsh (`~/.zsh_history`), bash, fish; or `--history FILE` | command **names** and timestamps |
| Git | every repo under `~/code`, `~/dev`, `~/projects`, `~/Workspace`, … or `--root DIR` | your commits (by your e-mail): time, lines, file extensions |
| Claude Code | `~/.claude/projects/*/*.jsonl` | timestamps, tool names, token counts |
| Codex CLI | `~/.codex/sessions/**/*.jsonl` | timestamps, tool names, token counts |

## Privacy

Everything runs on your machine; there is no network code and no telemetry. Privacy is enforced by what the
parsers keep, not by a filter at the end:

- Shell: only the command name is stored (plus the subcommand for tools like `git commit` or `docker run`).
  Arguments, paths, URLs and environment values are dropped while parsing. Tests assert that planted secrets
  in arguments never reach the output.
- Agents: prompt text, tool inputs and outputs are never stored — only roles, timestamps, tool names and counts.
- Git: author e-mails are used for matching only; commit messages and file contents are not stored.
- `--hide-repos` replaces repository names with "repo 1", "repo 2". Repo names are the only personal detail
  on the cards by default, so check them before posting.

## Usage

```console
dev-wrapped [--year 2026] [-o wrapped-2026.html] [--open] [--png DIR] [--json]
            [--root DIR]... [--email ADDR]... [--history FILE]...
            [--no-shell] [--no-git] [--no-agents] [--hide-repos]
```

- `dev-wrapped --year 2025` — wrap last year.
- `dev-wrapped --email me@work.com --email me@home.com` — count commits under several addresses.
- `dev-wrapped --json` — print the computed numbers instead of rendering.
- zsh needs `setopt EXTENDED_HISTORY` for timestamps; bash needs `HISTTIMEFORMAT` set. Without timestamps the
  command counts still work, but the hour, streak and calendar cards fall back to git and agents.
- Shell history files are often capped (`HISTSIZE`). dev-wrapped warns when your history starts late in the year.

## The personality

Ten rule-based types, chosen deterministically from your numbers: Night Owl, Early Bird, Weekend Warrior,
Streak Machine, The Delegator, Commit Machine, The Deletion Artist, Polyglot, Terminal Native and Steady Hand.
No LLM involved.

## "Most mistyped command"

A command counts as a typo when it is **not installed** on your machine and is one keystroke (insert, delete,
substitute or swap) away from a common command — `gti`, `claer`, `sl`.

## Development

```console
pip install -e ".[dev]"
ruff check . && pytest
```

MIT licensed.
