git-sense
v0.1.0
Published
AI-powered CLI tool to make sense of git history
Maintainers
Readme
git-sense
AI-powered CLI tool to make sense of git history. Uses Claude to generate summaries, answer questions, analyze contributors, and create changelogs from your repository's commit and PR history.
Features
- Summary - Get a narrative overview of recent repository activity
- Contributors - Analyze who's working on what and their focus areas
- Ask - Ask natural language questions about your repo's history
- Changelog - Generate formatted changelogs between releases
Requirements
- Node.js 18+
- A GitHub account (for OAuth)
- An Anthropic API key (get one here)
Installation
npm install -g git-senseOr install from source:
git clone https://github.com/tshields86/git-sense.git
cd git-sense
npm install
npm run build
npm linkQuick Start
Authenticate with GitHub:
git-sense authThis opens a browser flow to authorize the app.
Set your Anthropic API key:
git-sense config --anthropic-key sk-ant-xxxxxOr set the
ANTHROPIC_API_KEYenvironment variable.Navigate to a GitHub repository and run:
git-sense summary
Commands
git-sense auth
Authenticate with GitHub using the OAuth device flow. Required for accessing repository data.
git-sense authgit-sense config
Manage configuration settings.
# Show current configuration
git-sense config --show
# Set Anthropic API key
git-sense config --anthropic-key sk-ant-xxxxx
# Clear all configuration
git-sense config --cleargit-sense summary
Generate an AI-powered summary of repository activity.
# Last 2 weeks (default)
git-sense summary
# Last 4 weeks
git-sense summary --weeks 4
# Last 3 months
git-sense summary --months 3
# Entire history
git-sense summary --allgit-sense contributors
Analyze contributor activity and focus areas.
# Last 4 weeks (default)
git-sense contributors
# Last 8 weeks
git-sense contributors --weeks 8
# Last 2 months
git-sense contributors --months 2git-sense ask
Ask natural language questions about your repository's history.
git-sense ask "When was authentication added?"
git-sense ask "Who knows the API code best?"
git-sense ask "What changed in the last release?"
git-sense ask "Why did we remove Redux?"git-sense changelog
Generate a changelog between two git references.
# Between two tags
git-sense changelog --from v1.0.0 --to v1.1.0
# From a tag to HEAD
git-sense changelog --from v1.0.0
# Output as markdown (for CHANGELOG.md)
git-sense changelog --from v1.0.0 --format markdownConfiguration
Environment Variables
ANTHROPIC_API_KEY- Your Anthropic API key (takes precedence over stored config)GITHUB_TOKEN- GitHub token (takes precedence over OAuth token)
Config File Location
Configuration is stored using the conf package:
- macOS:
~/Library/Preferences/git-sense-nodejs/config.json - Linux:
~/.config/git-sense-nodejs/config.json - Windows:
%APPDATA%/git-sense-nodejs/config.json
Development
# Install dependencies
npm install
# Run in development mode
npm run dev -- summary
# Build for production
npm run build
# Run built version
npm start