Flaunt GitHub is a Visual Studio Code / Cursor extension that quietly:
- Tracks your coding activity (saves, autosave snapshots, and workspace diffs)
- Writes human-readable summaries to
coding_summary.txt - Periodically commits and pushes those summaries to a private GitHub repository
If you keep autosave on and never press Ctrl+S/Cmd+S, it still captures your work and ships meaningful summary commits.
- 🧠 Edit-aware & autosave-friendly – works even if you never manually save
- 🔐 Secure GitHub auth – uses VS Code’s GitHub authentication and Secret Storage
- 📁 Automatic repo management – ensures a
code-trackingrepo exists and is kept in sync - 🧾 Rolling coding journal – appends timestamped entries to
coding_summary.txt - 📊 Built-in metrics – language usage, session durations, and diff stats
- ✅ Clean Git behavior – only commits & pushes when there are real changes
Version: 2.1.2
Downgraded vscode to ^1.90.0 to make it compatible with a wider range of VS Code versions.
Version: 2.1.1
This release focuses on reliability and completeness of tracking, especially in tricky autosave and “modified but not dirty” scenarios:
-
✅ Workspace diff fallback (smarter tracking):
- At the end of each interval, if:
- No manual saves were seen, and
- No dirty documents are present, but
- The workspace Git diff (vs
HEAD) shows changes,
- The extension logs a synthetic entry:
[timestamp]: Workspace diff snapshot (+X/−Y) - This guarantees that intervals with real Git changes still yield a summary commit, even if our usual signals didn’t fire.
- At the end of each interval, if:
-
🔁 Refined interval logic:
- Priority order per interval:
- Log manual saves.
- Log auto-snapshots for dirty docs and auto-save them.
- If still no activity, log workspace diff snapshot (when needed).
- Only then commit & push when there is something to record.
- Priority order per interval:
-
🧹 No-op intervals are truly no-op:
- If the tracking repo has no changes for that interval:
- No commit.
- No push.
- A log entry explains that nothing happened.
- If the tracking repo has no changes for that interval:
- Switched to VS Code’s GitHub authentication as the primary mechanism:
- Uses
vscode.authentication.getSession('github', ['read:user', 'repo'], { createIfNone: true }). - Token and username are stored securely in Secret Storage.
- Uses
- Backup auth path:
- If configured,
codeTracking.githubTokenandcodeTracking.githubUsernameinsettings.jsonare used once and then cached in Secret Storage.
- If configured,
- Only creates commits when the tracking repo actually changed.
- Only pushes when a commit occurred (no more push calls on completely clean intervals).
- Minor logging and internal cleanups.
- Introduced autosave-friendly tracking and edit-based auto snapshots:
- If there were edits but no manual saves, the extension auto-saves and logs:
[timestamp]: Auto-snapshot path/to/file.ts
- If there were edits but no manual saves, the extension auto-saves and logs:
- Extended metrics (language counts, session durations) via the Show Code Tracking Metrics command.
On activation (per VS Code / Cursor window with a workspace):
- Resolves GitHub credentials (see “Authentication” below).
- Ensures a private
code-trackingrepo exists in your GitHub account:- If missing, it creates it (
private,auto_init: true).
- If missing, it creates it (
- Clones that repo into the extension’s global storage directory, e.g.:
<globalStorage>/utkarshsingh.flaunt-github/code-tracking
- Configures the remote with an authenticated URL so it can push commits.
Flaunt GitHub resolves credentials in this order:
-
Secret Storage (preferred)
- If
codeTracking.githubTokenandcodeTracking.githubUsernamewere previously stored in Secret Storage, those are used.
- If
-
Backup: Settings (
settings.json)-
If
codeTracking.githubTokenandcodeTracking.githubUsernameare present:- They are used for the session.
- They are then persisted into Secret Storage for future activations.
-
-
VS Code GitHub Auth Provider (auto-login)
-
If nothing is available, the extension calls:
vscode.authentication.getSession('github', ['read:user', 'repo'], { createIfNone: true });
-
VS Code shows the standard “Sign in with GitHub” UI.
-
The returned access token and username are stored in Secret Storage.
-
💡 Recommendation: Let VS Code handle GitHub sign-in and Secret Storage. Only use
codeTracking.githubTokenas a fallback if you can’t use the built-in auth flow.
The extension builds up a text buffer (codingSummary) during each interval.
For every file:// document save (not triggered by the extension itself):
[timestamp]: Saved relative/path/to/file.ts
- Recorded into
codingSummary. - Used to increment per-language save counts.
Autosave controlled by VS Code still triggers the same save events; the extension just ignores saves that it knows it initiated itself.
At the end of each interval:
-
If no manual save was detected:
-
The extension looks for dirty documents (
isDirty === true) withfile://URIs. -
If found:
-
It logs one
Auto-snapshot ...line per file:[timestamp]: Auto-snapshot src/extension.ts -
Calls
vscode.workspace.saveAll(false)while marking that it’s in an auto-save cycle (to avoid double-logging the save events). -
Tracks language usage for these docs as well.
-
-
If, after (a) and (b):
codingSummaryis still empty, and- A Git diff exists between your workspace and
HEAD:
Then the extension logs a snapshot based on git diff --stat/diffSummary() output:
[timestamp]: Workspace diff snapshot (+X/−Y)
This ensures commits are created for real Git changes even if:
- The files weren’t open in the editor,
- No dirty docs were visible,
- Or some edge case bypassed file events.
At the end of an interval:
-
Skip no-op intervals
-
If
codingSummaryis still empty:- Logs:
No coding summary recorded this interval; skipping commit/push. - Returns early – no commit, no push.
- Logs:
-
-
Fetch & Merge
-
In the tracking repo:
git fetch git merge origin/main --strategy-option=theirs
-
Keeps the repo in sync across multiple machines, favoring remote changes for conflicts.
-
-
Write Summary & Stage
-
Appends
codingSummarytocoding_summary.txt. -
Stages it:
git add coding_summary.txt
-
-
Commit Only If Needed
-
If the repo has no staged changes after this step:
- Logs that there’s nothing to commit.
- Skips the commit and push.
-
-
Commit & Push (when there are changes)
-
Creates a commit with a message like:
[FlauntGithub] (+12/−3) Coding activity summary - 11/30/2025, 12:07:44 PM -
Pushes to
origin/main.
-
-
Milestones
- Every 10 commits, you get a small in-editor celebration message.
The command “Show Code Tracking Metrics” prints a report to the FlauntGitHubLog output channel, including:
-
Language Save Counts Aggregate counts of saves (and snapshots) per
languageId. -
Session Durations Per-file active session time, derived from
onDidOpenTextDocument/onDidCloseTextDocument, formatted like1h 12m 5s. -
Diff Summary (Tracking Repo) Uncommitted
+added/−removedlines for the tracking repo (coding_summary.txt). -
Optional Workspace Diff Overall added/removed lines for your current workspace repo (if applicable).
A status bar item shows a live countdown:
Next commit in 4m 59s
This resets each interval and gives you a quick sense for when the next summary commit will happen.
Configure via the UI or in settings.json.
Used only as a fallback if Secret Storage is empty and no GitHub auth session exists:
{
// Optional: GitHub username (e.g., "vib795")
"codeTracking.githubUsername": "your-github-username",
// Optional: GitHub PAT with "repo" scope
"codeTracking.githubToken": "ghp_your_token_here"
}🔐 Security tip: Prefer VS Code’s GitHub sign-in flow + Secret Storage. Use PATs in settings only if necessary.
-
Install the Extension
- Install the generated
.vsixin VS Code / Cursor.
- Install the generated
-
Open a Workspace
- The extension activates only when a folder/workspace is open.
-
Authenticate Once
- If needed, VS Code prompts you to sign in with GitHub.
- On first run, the extension ensures your
code-trackingrepo exists and clones it.
-
Code Normally
-
With or without autosave enabled:
- Manual saves produce
Saved ...entries. - Unsaved edits can produce
Auto-snapshot ...entries. - Workspace-level diff can produce
Workspace diff snapshot ...entries.
- Manual saves produce
-
-
Let the Timer Do Its Thing
- Watch the status bar timer.
- At each interval, a commit & push happens when there’s real tracked activity.
-
Manual Commit (Optional)
- Run Start Code Tracking from the Command Palette to force an immediate summary commit & push (if any activity has been logged).
-
Inspect Metrics
- Run Show Code Tracking Metrics to see language counts, sessions, and diffs in
FlauntGitHubLog.
- Run Show Code Tracking Metrics to see language counts, sessions, and diffs in
- VS Code / Cursor: v1.106.0 or later (aligned with
engines.vscode). - Git: Installed and available on your system
PATH. - GitHub Account: With permission to create and push to a private repo.
- Network access to
github.com.
-
Added a workspace diff fallback:
- If no saves and no dirty docs are observed, but Git diff shows changes, a
Workspace diff snapshotentry is logged so the interval still produces a meaningful commit.
- If no saves and no dirty docs are observed, but Git diff shows changes, a
-
Tightened commit/push behavior around these snapshots so every commit corresponds to actual repo changes.
- Switched to VS Code GitHub auth as the primary credential source.
- Added Secret Storage integration.
- Kept
codeTracking.githubTokenandcodeTracking.githubUsernameas optional backup paths.
- Ensured no commit and no push on completely clean intervals.
- Adjusted logging and internal logic for clarity.
- Introduced autosave-friendly tracking and edit-based auto snapshots.
- Exposed extended metrics via Show Code Tracking Metrics.
Flaunt your progress. Flaunt GitHub.
{ // Interval in minutes between automatic commits (default: 30) "codeTracking.commitInterval": 30, // Optional: prefix for commit messages "codeTracking.commitMessagePrefix": "[FlauntGithub] ", // Optional: timezone for timestamps in logs and commit messages // Defaults to your system timezone if omitted "codeTracking.timeZone": "America/Chicago", // Optional: track file open events (default: false) "codeTracking.trackFileOpens": false }