Skip to content

Commit cfc79d7

Browse files
committed
cleanup
1 parent cf27a07 commit cfc79d7

10 files changed

Lines changed: 663 additions & 134 deletions

README.md

Lines changed: 87 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,107 @@
1-
# [BETA] Git VSCode Stats Extension
1+
# Git VSCode Stats
22

3-
_Track and visualize your Git activity directly from VS Code._
3+
Track, compare, and visualize repository activity directly inside VS Code.
44

5-
A lightweight extension and CLI tool that analyzes your Git commits, tracks coding statistics, and helps you understand your productivity patterns — all within your favorite code editor.
5+
Git VSCode Stats adds a dedicated activity bar view with ready-made reports for commit trends, contributors, branches, and repository history. It is built for developers who want quick insight into project patterns without switching tools.
66

7-
### Features
7+
## What You Get
88

9-
- Commit frequency and time-of-day heatmaps
10-
- Daily/weekly/monthly coding activity stats
11-
- Author-specific stats for collaborative projects
12-
- Per-branch and per-file metrics
13-
- VS Code integration with live stats
9+
- Organized stats explorer in the VS Code activity bar
10+
- Rich report views rendered in an interactive webview
11+
- Date and author filtering for most reports
12+
- Charts for trend analysis and distribution views
13+
- Comparison mode for branches and time periods
14+
- Saved report configurations and reusable custom queries
15+
- Export options for CSV, JSON, and HTML
1416

15-
### Screenshots
17+
## Available Reports
18+
19+
- Detailed Git Stats
20+
- Commits by Author
21+
- Commits by Hour/Day
22+
- Commits by Hour/Week
23+
- Commits by Month
24+
- Commits by Weekday
25+
- Commits by Year
26+
- Contributor Stats
27+
- Branch Stats
28+
- Changelog
29+
- Code Suggestors
30+
- Git Effort
31+
- Git Activity
32+
- Comparison View
33+
- Git Insights
34+
35+
## Screenshots
1636

1737
<center>
18-
<img width="600" height="auto" alt="img1" src="https://github.com/user-attachments/assets/0b93b49f-307d-48d5-84dc-d14136715a54" />
38+
<img width="600" height="auto" alt="Git VSCode Stats main view" src="https://github.com/user-attachments/assets/0b93b49f-307d-48d5-84dc-d14136715a54" />
1939

2040
<br>
2141

22-
<img width="600" height="auto" alt="img2" src="https://github.com/user-attachments/assets/d0f9d148-6f4b-44f5-a50b-16496519a75e" />
42+
<img width="600" height="auto" alt="Git VSCode Stats chart view" src="https://github.com/user-attachments/assets/d0f9d148-6f4b-44f5-a50b-16496519a75e" />
2343
</center>
2444

25-
### Installation
45+
## Installation
46+
47+
Install from the VS Code Marketplace:
48+
49+
https://marketplace.visualstudio.com/items?itemName=git-quick-stats.git-vscode-stats
50+
51+
Or clone and run locally for development:
2652

2753
```bash
2854
git clone https://github.com/git-quick-stats/git-vscode-stats.git
55+
cd git-vscode-stats
56+
npm install
2957
```
3058

31-
Or install via VS Code Marketplace.
59+
## How to Use
3260

33-
https://marketplace.visualstudio.com/items?itemName=git-quick-stats.git-vscode-stats
61+
1. Open a folder that contains a Git repository.
62+
2. Click the Git Quick Stats icon in the activity bar.
63+
3. Pick a report from the Git Stats tree.
64+
4. Apply filters (date range, author) in the webview.
65+
5. Export or save the current setup if needed.
66+
67+
## Saved Configurations and Custom Queries
68+
69+
- Save the current filter + report combination to run it again quickly.
70+
- Save custom Git queries and execute them from the sidebar.
71+
- Custom query execution is restricted to read-only Git subcommands for safety.
72+
73+
74+
## Development
75+
76+
### Requirements
77+
78+
- Node.js 18+
79+
- npm
80+
- VS Code 1.80+
81+
82+
### Commands
83+
84+
```bash
85+
npm install
86+
npm run compile
87+
npm test
88+
```
89+
90+
- `npm run compile`: builds TypeScript to `dist/`
91+
- `npm test`: runs Node-based test suite in `test/`
92+
93+
### Run the Extension Locally
94+
95+
1. Open the project in VS Code.
96+
2. Run `npm install` and `npm run compile`.
97+
3. Press `F5` to launch the Extension Development Host.
98+
99+
## Troubleshooting
100+
101+
- If no data appears, verify the opened workspace is a valid Git repository.
102+
- If charts do not load, run `npm install` to ensure bundled dependencies are present.
103+
- If results look incomplete, widen date filters or clear author filtering.
34104

35-
### Development
105+
## License
36106

37-
- Install dependencies: `npm install`
38-
- Build: `npm run compile`
39-
- Launch in VSCode: Press `F5`
107+
This project is licensed under the terms of the `LICENSE` file in the repository root.

package-lock.json

Lines changed: 21 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
"scripts": {
162162
"vscode:prepublish": "npm run compile",
163163
"compile": "tsc -p ./",
164-
"watch": "tsc -watch -p ./"
164+
"watch": "tsc -watch -p ./",
165+
"test": "node --test test/**/*.test.js"
165166
},
166167
"devDependencies": {
167168
"@types/node": "^24.0.10",
@@ -170,6 +171,7 @@
170171
"vscode-test": "^1.6.0"
171172
},
172173
"dependencies": {
174+
"chart.js": "^4.5.1",
173175
"simple-git": "^3.28.0"
174176
}
175177
}

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010

1111
export function activate(context: vscode.ExtensionContext) {
1212
const gitStatsProvider = new GitStatsProvider();
13-
const gitStatsCommands = new GitStatsCommands();
13+
const gitStatsCommands = new GitStatsCommands(context.extensionUri);
1414
const savedConfigsProvider = new SavedConfigurationsProvider(context);
1515
const customQueriesProvider = new CustomQueriesProvider(context);
1616

0 commit comments

Comments
 (0)