TGit is a CLI tool that wraps Git commands, passing them through to Git while sending activity tracking data to an API. It includes a real-time web dashboard to visualize team activity, with tenant isolation for multi-team support.
- Single user on a single machine with multiple repositories
- If you regularly switch between repos, TGit helps you stay tidy by showing repo state and recent activity.
- This makes it easier to decide what to commit, what to clean up, and when to remove temporary/test branches.
- Single user across multiple machines
- TGit provides the same visibility across your devices (for example, laptop and desktop).
- Before changing files, you can see where work already happened, reducing duplicate work and merge conflicts.
- Teams in a company (including managers)
- Developers can share a tenant and see who is working on what in real time.
- Managers get a live, lightweight view of current team activity across repositories.
TGit/
βββ cli/ # CLI application
β βββ Program.cs # CLI wrapper entrypoint
β βββ TGit.csproj # .NET project file (CLI)
βββ api/ # ASP.NET Core Web API
β βββ Controllers/ # API endpoints
β βββ Services/ # Storage services (JSON, SQL)
β βββ Models/ # Data models
β βββ TGitApi.csproj
βββ dashboard/ # Astro.js static web dashboard
β βββ src/pages/ # Dashboard UI
β βββ package.json
βββ winget/ # Winget package manifests
βββ .github/workflows/ # CI/CD
βββ release.yml # CLI release (tag-triggered)
βββ azure-api-deploy.yml # API deploy to Azure App Service
βββ dashboard.yml # Dashboard deploy to Azure Static Web App
βββββββββββ POST /api/GitActivity βββββββββββββββ
β tgit β ββββββββββββββββββββββββββββββ>β API β
β CLI β β (Azure β
βββββββββββ β App Svc) β
ββββββββ¬βββββββ
βββββββββββββββ GET /api/Users β
β Dashboard β <ββββββββββββββββββββββββββββββββββ
β (Azure β (polls every 2 seconds)
β Static App)β
βββββββββββββββ
- CLI (
tgit) β wraps git commands, sends activity data to the API - API (
tgit-api.azurewebsites.net) β ASP.NET Core API, stores data in JSON files or Azure SQL - Dashboard (
tgit.app) β Astro site, polls the API and displays team activity
winget install MarkJamesHoward.TGitcd TGit/cli
dotnet pack -c Release -o ../nupkg
dotnet tool install --global --add-source ../nupkg TGitUse tgit exactly like you would use git:
tgit status
tgit add .
tgit commit -m "Your message"
tgit pushtgit --config Show current configuration
tgit --config tenant Show current tenant ID
tgit --config tenant <name> Set tenant ID for data isolation
tgit --clear Delete all tracking data for your tenant
tgit --help Show help message
tgit --version Show version information
Each TGit installation gets a unique tenant ID on first run. All users sharing the same tenant ID can see each other's activity on the dashboard.
# Set a shared tenant for your team
tgit --config tenant mycompany
# View your current tenant
tgit --config tenantTo delete all tracked data for your tenant:
tgit --clearThe following git commands trigger activity tracking:
status, add, commit, checkout, switch, restore, reset, merge, rebase, cherry-pick, revert, stash, pull, push, fetch, clone
CLI (used by the tgit command):
| Variable | Description | Default |
|---|---|---|
TGIT_CLI_API_URL |
Base URL of the API (the CLI appends /api/GitActivity) |
https://tgit-api.azurewebsites.net |
TGIT_TENANT |
Override tenant ID (takes precedence over config) | Auto-generated |
TGIT_DEBUG |
Set to 1 to enable verbose debug output |
Not set |
Dashboard (used at build time by the Astro dashboard):
| Variable | Description | Default |
|---|---|---|
PUBLIC_TGIT_DASHBOARD_API_URL |
Base URL of the API (the dashboard appends /api/users) |
https://tgit-api.azurewebsites.net |
View your team's activity at tgit.app. Enter your tenant ID to see activity for your team.
The dashboard polls the API every 2 seconds and shows:
- Active users and their current branches
- Modified files per repository
- Time since last activity
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/GitActivity |
Record git activity |
DELETE |
/api/GitActivity?tenant=xxx |
Delete all data for a tenant |
GET |
/api/Users?tenant=xxx |
Get all users for a tenant |
GET |
/api/Users?tenant=xxx&active=true |
Get active users only |
GET |
/swagger |
Swagger UI |
{
"timestamp": "2026-01-30T12:00:00Z",
"userName": "John Doe",
"userEmail": "john@example.com",
"repoName": "my-project",
"branch": "main",
"remoteUrl": "https://github.com/user/my-project.git",
"modifiedFiles": [
{
"filePath": "src/file.cs",
"status": "Modified",
"isStaged": true
}
],
"machineName": "DESKTOP-ABC123",
"tenant": "mycompany"
}To run the full stack locally (CLI β API β Dashboard):
The API uses JSON file storage by default (api/appsettings.json has Storage:Type set to json). In production, the Azure app setting Storage__DataDir overrides the data directory to /home/data for persistence across redeploys. Locally, data is stored in api/data/.
Start the API:
cd api
dotnet runThe API will start on http://localhost:5000.
To use Azure SQL locally instead of JSON, change Storage:Type to sql in api/appsettings.json (requires Azure AD credentials configured).
$env:TGIT_CLI_API_URL = "http://localhost:5000"
tgit statusOr to run the CLI from source (without installing via NuGet):
dotnet run --project cli -- status$env:PUBLIC_TGIT_DASHBOARD_API_URL = "http://localhost:5000"
cd dashboard
npm run devThe dashboard will start on http://localhost:4321 and fetch data from your local API.
Enable debug output for the CLI:
$env:TGIT_DEBUG = "1"
tgit statusThis shows the HTTP request/response details. Tracking errors (non-200 responses, timeouts, connection failures) are always shown on stderr even without debug mode.
Deployed automatically via GitHub Actions when files in api/ change on main.
App Settings:
| Setting | Description |
|---|---|
Storage__Type |
json (default) or sql |
Storage__DataDir |
Path for JSON storage (use /home/data for persistence on Azure) |
Sql__ConnectionString |
Azure SQL connection string (when using SQL storage) |
Deployed automatically via GitHub Actions when files in dashboard/ change on main.
Build-time environment variable:
PUBLIC_TGIT_DASHBOARD_API_URLβ the API base URL (e.g.,https://tgit-api.azurewebsites.net)
Tag a version to trigger a release:
git tag v1.4.0
git push origin v1.4.0This builds win-x64 and win-arm64 binaries, creates a GitHub release, and submits to winget.
For Terraform in Docker, set these values in .terraform/azure_secrets.txt:
ARM_CLIENT_IDARM_CLIENT_SECRETARM_TENANT_IDARM_SUBSCRIPTION_ID
Then run the commands in .terraform/docker run details.txt to execute init, validate, plan, and apply with --env-file.