TGit 1.5.0
See the version list below for details.
dotnet tool install --global TGit --version 1.5.0
dotnet new tool-manifest
dotnet tool install --local TGit --version 1.5.0
#tool dotnet:?package=TGit&version=1.5.0
nuke :add-package TGit --version 1.5.0
TGit - Git Wrapper with Activity Tracking
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.
Project Structure
TGit/
├── Program.cs # CLI wrapper application
├── TGit.csproj # .NET project file (CLI)
├── api/ # ASP.NET Core Web API
│ ├── Controllers/ # API endpoints
│ ├── Services/ # Storage services (JSON, Cosmos DB)
│ ├── 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
Architecture
┌─────────┐ 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 (
api.tgit.app) — ASP.NET Core API, stores data in JSON files or Cosmos DB - Dashboard (
tgit.app) — Astro static site, polls the API and displays team activity
Installation
CLI Tool
Install via winget (recommended)
winget install MarkJamesHoward.TGit
Or build and install manually
cd TGit
dotnet pack -c Release
dotnet tool install --global --add-source ./nupkg TGit
Usage
Use tgit exactly like you would use git:
tgit status
tgit add .
tgit commit -m "Your message"
tgit push
TGit Commands
tgit --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
Tenant Configuration
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 tenant
Clearing Data
To delete all tracked data for your tenant:
tgit --clear
Tracked Commands
The following git commands trigger activity tracking:
status, add, commit, checkout, switch, restore, reset, merge, rebase, cherry-pick, revert, stash, pull, push, fetch, clone
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
TGIT_API_URL |
API endpoint for tracking data | https://api.tgit.app/api/GitActivity |
TGIT_TENANT |
Override tenant ID (takes precedence over config) | Auto-generated |
TGIT_DEBUG |
Set to 1 to enable debug output |
Not set |
Dashboard
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
API Endpoints
| 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 |
Activity Payload
{
"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"
}
Deployment
API (Azure App Service)
Deployed automatically via GitHub Actions when files in api/ change on main.
App Settings:
| Setting | Description |
|---------|-------------|
| Storage__Type | json (default) or cosmos |
| Storage__DataDir | Path for JSON storage (use /home/data for persistence on Azure) |
| Cosmos__Endpoint | Cosmos DB endpoint (when using Cosmos storage) |
| Cosmos__Key | Cosmos DB key (when using Cosmos storage) |
Dashboard (Azure Static Web App)
Deployed automatically via GitHub Actions when files in dashboard/ change on main.
Build-time environment variable:
PUBLIC_API_BASE_URL— the API base URL (e.g.,https://api.tgit.app)
CLI Release
Tag a version to trigger a release:
git tag v1.4.0
git push origin v1.4.0
This builds win-x64 and win-arm64 binaries, creates a GitHub release, and submits to winget.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.