← back
Status

GitHub - arlington-labs/gitstyle: Generate a personal engineering style wiki from your GitHub commit history

github.comoriginal ↗1mo ago4w ago

Gitstyle is a tool that creates a personalized engineering style wiki based on your GitHub commit history. It analyzes your coding patterns and style preferences, allowing you to document and reflect on your development practices. By transforming commits into a structured format, it enhances self-awareness in coding techniques and can serve as a useful reference for future projects.

# GitHub - arlington-labs/gitstyle: Generate a personal engineering style wiki from your GitHub commit history · GitHub [Skip to content](https://github.com/edgarpavlovsky/gitstyle#start-of-content) ## Navigation Menu Toggle navigation [](https://github.com/) [Sign in](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Farlington-labs%2Fgitstyle) Appearance settings * Platform * AI CODE CREATION * [GitHub Copilot Write better code with AI](https://github.com/features/copilot) * [GitHub Spark Build and deploy intelligent apps](https://github.com/features/spark) * [GitHub Models Manage and compare prompts](https://github.com/features/models) * [MCP Registry New Integrate external tools](https://github.com/mcp) * DEVELOPER WORKFLOWS * [Actions Automate any workflow](https://github.com/features/actions) * [Codespaces Instant dev environments](https://github.com/features/codespaces) * [Issues Plan and track work](https://github.com/features/issues) * [Code Review Manage code changes](https://github.com/features/code-review) * APPLICATION SECURITY * [GitHub Advanced Security Find and fix vulnerabilities](https://github.com/security/advanced-security) * [Code security Secure your code as you build](https://github.com/security/advanced-security/code-security) * [Secret protection Stop leaks before they start](https://github.com/security/advanced-security/secret-protection) * EXPLORE * [Why GitHub](https://github.com/why-github) * [Documentation](https://docs.github.com/) * [Blog](https://github.blog/) * [Changelog](https://github.blog/changelog) * [Marketplace](https://github.com/marketplace) [View all features](https://github.com/features) * Solutions * BY COMPANY SIZE * [Enterprises](https://github.com/enterprise) * [Small and medium teams](https://github.com/team) * [Startups](https://github.com/enterprise/startups) * [Nonprofits](https://github.com/solutions/industry/nonprofits) * BY USE CASE * [App Modernization](https://github.com/solutions/use-case/app-modernization) * [DevSecOps](https://github.com/solutions/use-case/devsecops) * [DevOps](https://github.com/solutions/use-case/devops) * [CI/CD](https://github.com/solutions/use-case/ci-cd) * [View all use cases](https://github.com/solutions/use-case) * BY INDUSTRY * [Healthcare](https://github.com/solutions/industry/healthcare) * [Financial services](https://github.com/solutions/industry/financial-services) * [Manufacturing](https://github.com/solutions/industry/manufacturing) * [Government](https://github.com/solutions/industry/government) * [View all industries](https://github.com/solutions/industry) [View all solutions](https://github.com/solutions) * Resources * EXPLORE BY TOPIC * [AI](https://github.com/resources/articles?topic=ai) * [Software Development](https://github.com/resources/articles?topic=software-development) * [DevOps](https://github.com/resources/articles?topic=devops) * [Security](https://github.com/resources/articles?topic=security) * [View all topics](https://github.com/resources/articles) * EXPLORE BY TYPE * [Customer stories](https://github.com/customer-stories) * [Events & webinars](https://github.com/resources/events) * [Ebooks & reports](https://github.com/resources/whitepapers) * [Business insights](https://github.com/solutions/executive-insights) * [GitHub Skills](https://skills.github.com/) * SUPPORT & SERVICES * [Documentation](https://docs.github.com/) * [Customer support](https://support.github.com/) * [Community forum](https://github.com/orgs/community/discussions) * [Trust center](https://github.com/trust-center) * [Partners](https://github.com/partners) [View all resources](https://github.com/resources) * Open Source * COMMUNITY * [GitHub Sponsors Fund open source developers](https://github.com/sponsors) * PROGRAMS * [Security Lab](https://securitylab.github.com/) * [Maintainer Community](https://maintainers.github.com/) * [Accelerator](https://github.com/accelerator) * [GitHub Stars](https://stars.github.com/) * [Archive Program](https://archiveprogram.github.com/) * REPOSITORIES * [Topics](https://github.com/topics) * [Trending](https://github.com/trending) * [Collections](https://github.com/collections) * Enterprise * ENTERPRISE SOLUTIONS * [Enterprise platform AI-powered developer platform](https://github.com/enterprise) * AVAILABLE ADD-ONS * [GitHub Advanced Security Enterprise-grade security features](https://github.com/security/advanced-security) * [Copilot for Business Enterprise-grade AI features](https://github.com/features/copilot/copilot-business) * [Premium Support Enterprise-grade 24/7 support](https://github.com/premium-support) * [Pricing](https://github.com/pricing) Search or jump to... # Search code, repositories, users, issues, pull requests... Search Clear [Search syntax tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax) # Provide feedback We read every piece of feedback, and take your input very seriously. - [x] Include my email address so I can be contacted Cancel Submit feedback # Saved searches ## Use saved searches to filter your results more quickly Name Query To see all available qualifiers, see our [documentation](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax). Cancel Create saved search [Sign in](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Farlington-labs%2Fgitstyle) [Sign up](https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=arlington-labs%2Fgitstyle) Appearance settings Resetting focus You signed in with another tab or window. [Reload](https://github.com/edgarpavlovsky/gitstyle) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/edgarpavlovsky/gitstyle) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/edgarpavlovsky/gitstyle) to refresh your session.Dismiss alert {{ message }} [arlington-labs](https://github.com/arlington-labs)/**[gitstyle](https://github.com/arlington-labs/gitstyle)**Public * [Notifications](https://github.com/login?return_to=%2Farlington-labs%2Fgitstyle)You must be signed in to change notification settings * [Fork 6](https://github.com/login?return_to=%2Farlington-labs%2Fgitstyle) * [Star 66](https://github.com/login?return_to=%2Farlington-labs%2Fgitstyle) * [Code](https://github.com/arlington-labs/gitstyle) * [Issues 0](https://github.com/arlington-labs/gitstyle/issues) * [Pull requests 0](https://github.com/arlington-labs/gitstyle/pulls) * [Actions](https://github.com/arlington-labs/gitstyle/actions) * [Projects](https://github.com/arlington-labs/gitstyle/projects) * [Security and quality 0](https://github.com/arlington-labs/gitstyle/security) * [Insights](https://github.com/arlington-labs/gitstyle/pulse) Additional navigation options * [Code](https://github.com/arlington-labs/gitstyle) * [Issues](https://github.com/arlington-labs/gitstyle/issues) * [Pull requests](https://github.com/arlington-labs/gitstyle/pulls) * [Actions](https://github.com/arlington-labs/gitstyle/actions) * [Projects](https://github.com/arlington-labs/gitstyle/projects) * [Security and quality](https://github.com/arlington-labs/gitstyle/security) * [Insights](https://github.com/arlington-labs/gitstyle/pulse) [](https://github.com/arlington-labs/gitstyle) # arlington-labs/gitstyle main [Branches](https://github.com/arlington-labs/gitstyle/branches)[Tags](https://github.com/arlington-labs/gitstyle/tags) [](https://github.com/arlington-labs/gitstyle/branches)[](https://github.com/arlington-labs/gitstyle/tags) Go to file Code Open more actions menu ## Folders and files | Name | Name | Last commit message | Last commit date | | --- | --- | --- | --- | | ## Latest commit ## History [46 Commits](https://github.com/arlington-labs/gitstyle/commits/main/) [](https://github.com/arlington-labs/gitstyle/commits/main/)46 Commits | | [demo](https://github.com/arlington-labs/gitstyle/tree/main/demo "demo") | [demo](https://github.com/arlington-labs/gitstyle/tree/main/demo "demo") | | | | [docs](https://github.com/arlington-labs/gitstyle/tree/main/docs "docs") | [docs](https://github.com/arlington-labs/gitstyle/tree/main/docs "docs") | | | | [examples](https://github.com/arlington-labs/gitstyle/tree/main/examples "examples") | [examples](https://github.com/arlington-labs/gitstyle/tree/main/examples "examples") | | | | [src/gitstyle](https://github.com/arlington-labs/gitstyle/tree/main/src/gitstyle "This path skips through empty directories") | [src/gitstyle](https://github.com/arlington-labs/gitstyle/tree/main/src/gitstyle "This path skips through empty directories") | | | | [tests](https://github.com/arlington-labs/gitstyle/tree/main/tests "tests") | [tests](https://github.com/arlington-labs/gitstyle/tree/main/tests "tests") | | | | [.gitignore](https://github.com/arlington-labs/gitstyle/blob/main/.gitignore ".gitignore") | [.gitignore](https://github.com/arlington-labs/gitstyle/blob/main/.gitignore ".gitignore") | | | | [LICENSE](https://github.com/arlington-labs/gitstyle/blob/main/LICENSE "LICENSE") | [LICENSE](https://github.com/arlington-labs/gitstyle/blob/main/LICENSE "LICENSE") | | | | [README.md](https://github.com/arlington-labs/gitstyle/blob/main/README.md "README.md") | [README.md](https://github.com/arlington-labs/gitstyle/blob/main/README.md "README.md") | | | | [pyproject.toml](https://github.com/arlington-labs/gitstyle/blob/main/pyproject.toml "pyproject.toml") | [pyproject.toml](https://github.com/arlington-labs/gitstyle/blob/main/pyproject.toml "pyproject.toml") | | | | View all files | ## Repository files navigation * [README](https://github.com/edgarpavlovsky/gitstyle#) * [MIT license](https://github.com/edgarpavlovsky/gitstyle#) # gitstyle [](https://github.com/edgarpavlovsky/gitstyle#gitstyle) Generate a personal engineering style wiki from your GitHub commit history. **gitstyle** ingests a developer's or organization's GitHub commits and compiles them into a portable markdown wiki that any coding agent (Claude Code, Cursor, Aider, etc.) can load as context to write code in that style. Inspired by [Karpathy's post on LLM Knowledge Bases](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) — the idea that an LLM works best when it has a structured, personal knowledge base to draw from. [![Image 1: gitstyle demo](https://github.com/arlington-labs/gitstyle/raw/main/demo/demo.gif)](https://github.com/arlington-labs/gitstyle/blob/main/demo/demo.gif) ## Why [](https://github.com/edgarpavlovsky/gitstyle#why) Every developer and engineering org has a style: naming conventions, error handling patterns, testing philosophy, commit hygiene, preferred libraries. When you bring a coding agent into your workflow, it starts from zero. **gitstyle** fixes that by mining real commit history for patterns and packaging them as a wiki any agent can read. Works for individual developers and GitHub organizations — gitstyle auto-detects which and adjusts its analysis accordingly. The output is plain markdown — no tool lock-in, no proprietary format. Browse it with the built-in web viewer (`gitstyle serve`), Obsidian, any coding agent, or as standalone documentation of your engineering preferences. ## Install [](https://github.com/edgarpavlovsky/gitstyle#install) undefinedshell pip install gitstyle undefined Or from source: undefinedshell git clone https://github.com/edgarpavlovsky/gitstyle.git cd gitstyle pip install -e . undefined ### Requirements [](https://github.com/edgarpavlovsky/gitstyle#requirements) * Python 3.9+ * A GitHub token for API rate limits: `export GITHUB_TOKEN=ghp_...` * An Anthropic API key for LLM stages: `export ANTHROPIC_API_KEY=sk-ant-...` ## Quickstart [](https://github.com/edgarpavlovsky/gitstyle#quickstart) undefinedshell # Generate a developer's engineering style wiki gitstyle run karpathy # Or generate an org's engineering patterns wiki gitstyle run anthropic # Output lands in wiki/ by default ls wiki/ undefined That's it. The tool runs a 5-stage pipeline: 1. **Fetch** — Pull commits + diffs via GitHub API 2. **Sample** — Cluster by repo/language, select representative commits 3. **Extract** — LLM analyzes each cluster for style patterns 4. **Compile** — LLM synthesizes observations into wiki articles 5. **Lint** — LLM health check for contradictions and weak evidence ### Incremental Updates [](https://github.com/edgarpavlovsky/gitstyle#incremental-updates) Re-run `gitstyle run` at any time — the wiki **evolves** with new commits: undefinedshell # First run: full analysis gitstyle run karpathy # Later: only fetches new commits, evolves existing articles gitstyle run karpathy # Force a full rebuild from scratch gitstyle run karpathy --fresh undefined The incremental pipeline only fetches commits since the last run, extracts observations from new data only, and uses the LLM to evolve existing articles (preserving valid insights, incorporating new patterns, noting contradictions). This saves API calls, LLM costs, and time. ## Output Format [](https://github.com/edgarpavlovsky/gitstyle#output-format) gitstyle produces a directory of markdown files with YAML frontmatter, designed to be Obsidian-compatible and agent-readable: ``` wiki/ index.md # Master index with links to all articles code-structure.md # File/folder organization, module boundaries naming-conventions.md # Variable, function, file naming patterns patterns.md # Error handling, async, state management type-discipline.md # Typing style and strictness testing.md # Test structure, coverage philosophy comments-and-docs.md # Documentation density and style dependencies.md # Preferred libraries and tools commit-hygiene.md # Commit message style, branching patterns languages/ python.md # Python-specific idioms typescript.md # TypeScript-specific idioms ... _meta/ sources.md # Repos and commit counts analyzed generation-config.md # Pipeline configuration used log.md # Generation log ``` ### Article format [](https://github.com/edgarpavlovsky/gitstyle#article-format) Each article has YAML frontmatter: undefinedyaml --- title: "Naming Conventions" category: style confidence: high sources: [user/repo-a, user/repo-b] related: [code-structure, patterns] last_updated: 2026-04-07 --- undefined Cross-references use `[[wikilinks]]` (Obsidian-compatible). Every claim cites specific commits by SHA. ## Web Viewer [](https://github.com/edgarpavlovsky/gitstyle#web-viewer) gitstyle includes a built-in web viewer with an interactive knowledge graph: undefinedshell # Launch the viewer (opens browser automatically) gitstyle serve # Serve a specific wiki directory gitstyle serve -w examples/karpathy # Custom port, no auto-open gitstyle serve -w wiki/ --port 3000 --no-open undefined The viewer features a full-bleed force-directed graph with floating navigation and a slide-over article reader. Click any node to read the article. Built with Vue 3 + Tailwind CSS. ## How to Plug Into Your Coding Agent [](https://github.com/edgarpavlovsky/gitstyle#how-to-plug-into-your-coding-agent) ### Claude Code [](https://github.com/edgarpavlovsky/gitstyle#claude-code) Add to your project's `CLAUDE.md`: undefinedmd ## My Engineering Style Load and follow the engineering style wiki in the `wiki/` directory for all code in this project. Start with wiki/index.md for an overview, then reference individual articles for specific conventions. undefined ### Cursor [](https://github.com/edgarpavlovsky/gitstyle#cursor) Add to `.cursorrules` in your project root: ``` When writing code for this project, follow the engineering style conventions documented in the wiki/ directory: - wiki/naming-conventions.md for naming patterns - wiki/patterns.md for error handling and architecture patterns - wiki/testing.md for test structure and conventions - wiki/code-structure.md for file organization Every article includes specific examples from real commits. Follow these patterns. ``` ### Any Agent (generic pattern) [](https://github.com/edgarpavlovsky/gitstyle#any-agent-generic-pattern) Include the wiki contents in your agent's system prompt or context window: undefinedpython from pathlib import Path # Load the full wiki as context wiki_dir = Path("wiki") style_context = "" for md_file in sorted(wiki_dir.rglob("*.md")): style_context += f"\n\n--- {md_file.relative_to(wiki_dir)} ---\n" style_context += md_file.read_text() # Feed to your agent's system prompt system_prompt = f"""You are writing code for a developer with specific engineering preferences. Their style guide: {style_context} Follow these conventions when writing or reviewing code.""" undefined ## CLI Reference [](https://github.com/edgarpavlovsky/gitstyle#cli-reference) undefinedshell # Full pipeline gitstyle run <username> [options] # Individual stages (each requires cached data from prior stages) gitstyle fetch-cmd <username> gitstyle sample-cmd <username> gitstyle extract-cmd <username> gitstyle compile-cmd <username> gitstyle lint-cmd <username> # Launch web viewer with interactive graph gitstyle serve [-w wiki_dir] # Clean cached data gitstyle clean # Show version gitstyle --version undefined ### Options for `run` [](https://github.com/edgarpavlovsky/gitstyle#options-for-run) | Flag | Default | Description | | --- | --- | --- | | `--output, -o` | `wiki/` | Output directory | | `--cache` | `.gitstyle/` | Cache directory | | `--max-commits, -n` | `2000` | Max commits to fetch | | `--samples, -s` | `20` | Samples per repo/language group | | `--repos, -r` | all | Comma-separated repo filter (`owner/name`) | | `--since` | — | Start date (ISO 8601) | | `--until` | — | End date (ISO 8601) | | `--model, -m` | `claude-sonnet-4-20250514` | LLM model | | `--token, -t` | `$GITHUB_TOKEN` | GitHub token | | `--dry-run` | `false` | Show what would happen without LLM calls | | `--fresh` | `false` | Force full rebuild, ignoring cache | ### Options for `serve` [](https://github.com/edgarpavlovsky/gitstyle#options-for-serve) | Flag | Default | Description | | --- | --- | --- | | `--wiki-dir, -w` | `wiki/` | Wiki directory to serve | | `--port, -p` | `8080` | Port to listen on | | `--no-open` | `false` | Don't auto-open browser | ### Environment Variables [](https://github.com/edgarpavlovsky/gitstyle#environment-variables) | Variable | Description | | --- | --- | | `GITHUB_TOKEN` | GitHub personal access token (recommended for rate limits, required for private repos) | | `ANTHROPIC_API_KEY` | Anthropic API key for LLM stages | | `ANTHROPIC_AUTH_TOKEN` | Alternative: Anthropic OAuth token | If no API credentials are set, gitstyle will show a clear error before starting the pipeline. ## Caching & Incremental Runs [](https://github.com/edgarpavlovsky/gitstyle#caching--incremental-runs) gitstyle caches intermediate data in `.gitstyle/`: ``` .gitstyle/ commits.jsonl # Fetched commit data samples.json # Sampled clusters extractions.json # LLM extraction results articles.json # Compiled article data lint.json # Lint report ``` When you re-run `gitstyle run`, it automatically detects cached data and runs incrementally — only fetching new commits and evolving existing articles. This means your wiki grows richer over time without redundant API calls or LLM costs. * `gitstyle run <user>` — incremental (default when cache exists) * `gitstyle run <user> --fresh` — full rebuild from scratch * `gitstyle clean` — delete all cached data ## Examples [](https://github.com/edgarpavlovsky/gitstyle#examples) See the `examples/` directory for complete wiki outputs: ### Individual developers [](https://github.com/edgarpavlovsky/gitstyle#individual-developers) * [`examples/karpathy/`](https://github.com/arlington-labs/gitstyle/blob/main/examples/karpathy) — Andrej Karpathy's Python + C style (nanoGPT, llm.c, micrograd) * [`examples/torvalds/`](https://github.com/arlington-labs/gitstyle/blob/main/examples/torvalds) — Linus Torvalds' kernel C style ### Organizations [](https://github.com/edgarpavlovsky/gitstyle#organizations) * [`examples/anthropics/`](https://github.com/arlington-labs/gitstyle/blob/main/examples/anthropics) — Anthropic's SDK and developer tools patterns (anthropic-sdk-python, anthropic-cookbook, claude-code) * [`examples/openai/`](https://github.com/arlington-labs/gitstyle/blob/main/examples/openai) — OpenAI's SDK + research code patterns (openai-python, tiktoken, whisper, CLIP) ## Development [](https://github.com/edgarpavlovsky/gitstyle#development) undefinedshell git clone https://github.com/edgarpavlovsky/gitstyle.git cd gitstyle pip install -e ".[dev]" pytest undefined ## License [](https://github.com/edgarpavlovsky/gitstyle#license) [MIT](https://github.com/arlington-labs/gitstyle/blob/main/LICENSE) ## About Generate a personal engineering style wiki from your GitHub commit history ### Resources [Readme](https://github.com/edgarpavlovsky/gitstyle#readme-ov-file) ### License [MIT license](https://github.com/edgarpavlovsky/gitstyle#MIT-1-ov-file) ### Uh oh! There was an error while loading. [Please reload this page](https://github.com/edgarpavlovsky/gitstyle). [Activity](https://github.com/arlington-labs/gitstyle/activity) [Custom properties](https://github.com/arlington-labs/gitstyle/custom-properties) ### Stars [**66** stars](https://github.com/arlington-labs/gitstyle/stargazers) ### Watchers [**1** watching](https://github.com/arlington-labs/gitstyle/watchers) ### Forks [**6** forks](https://github.com/arlington-labs/gitstyle/forks) [Report repository](https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Farlington-labs%2Fgitstyle&report=arlington-labs+%28user%29) ## [Releases 12](https://github.com/arlington-labs/gitstyle/releases) [v0.7.0 — Org support, wikilink quality, JSON retry Latest Apr 8, 2026](https://github.com/arlington-labs/gitstyle/releases/tag/v0.7.0) [+ 11 releases](https://github.com/arlington-labs/gitstyle/releases) ## [Packages 0](https://github.com/orgs/arlington-labs/packages?repo_name=gitstyle) ### Uh oh! There was an error while loading. [Please reload this page](https://github.com/edgarpavlovsky/gitstyle). ## [Contributors](https://github.com/arlington-labs/gitstyle/graphs/contributors) * * * ### Uh oh! There was an error while loading. [Please reload this page](https://github.com/edgarpavlovsky/gitstyle). ## Languages * [Python 87.9%](https://github.com/arlington-labs/gitstyle/search?l=python) * [HTML 12.1%](https://github.com/arlington-labs/gitstyle/search?l=html) ## Footer [](https://github.com/) © 2026 GitHub,Inc. ### Footer navigation * [Terms](https://docs.github.com/site-policy/github-terms/github-terms-of-service) * [Privacy](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement) * [Security](https://github.com/security) * [Status](https://www.githubstatus.com/) * [Community](https://github.community/) * [Docs](https://docs.github.com/) * [Contact](https://support.github.com/?tags=dotcom-footer) * Manage cookies * Do not share my personal information You can’t perform that action at this time.
Intent
software-developmentpersonalized-documentationgithub-toolsengineering-practicesdeveloper-productivity

Notes