A native macOS menu bar app for developers to track coding activity across all their projects. Built with SwiftUI and SwiftData.
- Overview Tab: Quick stats cards showing lines of code and commits for today, this week, this month, and all time
- Activity Heatmap: GitHub-style contribution calendar showing your coding activity over the past year
- Recent Projects: Grid view of your most recently active projects
- Automatic Discovery: Scans your code directory to find all git repositories
- Project Details: View line counts, file counts, commit history, README previews, and more
- Project Grouping: Combine related projects (monorepos, multi-version projects) into logical groups
- Status Tracking: Projects are automatically categorized as Active, In Progress, or Dormant based on commit recency
- JSON Stats Integration: Reads
projectstats.jsonfiles for pre-computed accurate statistics
- Quick Access: Always-available menu bar icon showing today's stats and recent projects
- One-Click Actions: Open projects in your editor, Finder, or GitHub directly from the menu bar
- File Browser: Navigate project files without leaving the app
- File Viewer: Syntax-highlighted code viewing
- Prompt Manager: Manage AI prompt files in your projects
- Commit History: View recent commits with line change stats
- Branch Info: See current branch, total commits, and first commit date
- Activity Metrics: Track commits and line changes over 7-day and 30-day windows
- GitHub Stats: Fetch stars, forks, and issues for your public repositories (requires token)
Dashboard with activity heatmap and project grid
Project detail view with git metrics and README preview
- macOS 14.0 (Sonoma) or later
- Xcode 15.0 or later (for building from source)
-
Clone the repository:
git clone https://github.com/Snootypants/projectStats.git cd projectStats/projectStats -
Open in Xcode:
open projectStats.xcodeproj
-
Build and run (⌘R)
Access settings via the gear icon in the sidebar or ProjectStats > Settings in the menu bar.
| Setting | Description | Default |
|---|---|---|
| Code Directory | Root folder to scan for projects | ~/Code |
| Default Editor | Editor to open projects in | VS Code |
| Default Terminal | Terminal app for command line access | Terminal |
| Refresh Interval | How often to rescan projects (minutes) | 15 |
| Launch at Login | Start ProjectStats when you log in | Off |
| Show in Dock | Display app icon in the Dock | Off |
| Setting | Description | Default |
|---|---|---|
| Theme | Light, Dark, or System | System |
| Setting | Description |
|---|---|
| Personal Access Token | Optional. Enables fetching repository stats (stars, forks, issues). Requires repo scope. |
ProjectStats can read pre-computed statistics from projectstats.json files placed at the root of each project. When present, these files are used as the primary data source instead of scanning.
{
"name": "Project Name",
"description": "Brief project description",
"status": "active",
"language": "TypeScript",
"languages": {
"TypeScript": 5000,
"JavaScript": 1200,
"CSS": 800
},
"lineCount": 7000,
"fileCount": 45,
"structure": "monorepo",
"structureNotes": "pnpm workspace with apps/ and packages/",
"sourceDirectories": ["src/", "lib/"],
"excludedDirectories": ["node_modules/", "dist/"],
"techStack": ["React", "TypeScript", "Vite", "Tailwind CSS"],
"git": {
"remoteUrl": "https://github.com/user/repo.git",
"currentBranch": "main",
"defaultBranch": "main",
"firstCommitDate": "2024-01-15T10:30:00Z",
"lastCommitDate": "2024-03-20T14:22:00Z",
"lastCommitMessage": "feat: add new feature",
"totalCommits": 156,
"branches": ["main", "develop", "feature/new-thing"]
},
"generatedAt": "2024-03-20T15:00:00Z",
"generatedBy": "claude-code-audit"
}| Status | Description | Counts in Totals |
|---|---|---|
active |
Currently being worked on | Yes |
paused |
Temporarily on hold | Yes |
experimental |
Proof of concept or playground | Yes |
archived |
Complete, no longer maintained | No |
abandoned |
Discontinued | No |
Projects with archived or abandoned status appear dimmed in the UI and are excluded from aggregate statistics.
projectStats/
├── App/
│ └── ProjectStatsApp.swift # App entry point
├── Models/
│ ├── Project.swift # Project model
│ ├── CachedModels.swift # SwiftData persistence
│ ├── Commit.swift # Git commit model
│ ├── ActivityStats.swift # Daily activity aggregation
│ ├── GitRepoInfo.swift # Git repository metadata
│ └── ProjectGroup.swift # Project grouping
├── Services/
│ ├── ProjectScanner.swift # Repository discovery
│ ├── JSONStatsReader.swift # projectstats.json parser
│ ├── LineCounter.swift # Source code analysis
│ ├── GitService.swift # Git operations
│ ├── GitRepoService.swift # Git repo inspection
│ └── GitHubClient.swift # GitHub API client
├── ViewModels/
│ ├── DashboardViewModel.swift # Main data orchestration
│ ├── ProjectListViewModel.swift # Project filtering/sorting
│ └── SettingsViewModel.swift # App preferences
├── Views/
│ ├── Dashboard/ # Overview, stats, charts
│ ├── Projects/ # Project list and details
│ ├── MenuBar/ # Menu bar extra
│ ├── IDE/ # File browser and viewer
│ └── Settings/ # Preferences UI
└── Utilities/
├── Shell.swift # Shell command execution
├── DateExtensions.swift # Date utilities
├── URLExtensions.swift # File system helpers
└── ReadmeParser.swift # README extraction
ProjectStats detects and counts lines for these file types:
| Category | Extensions |
|---|---|
| Web | .ts, .tsx, .js, .jsx, .html, .css, .scss, .sass, .less, .vue, .svelte, .astro |
| Backend | .py, .rb, .php |
| Systems | .swift, .rs, .go, .c, .cpp, .h, .hpp, .cs, .java, .kt, .kts |
| Data/Config | .sql, .json, .yaml, .yml, .toml, .xml |
| Scripts | .sh, .bash, .zsh |
| Docs | .md, .markdown |
| Shortcut | Action |
|---|---|
| ⌘R | Refresh project data |
| ⌘, | Open Settings |
| ⌘1 | Overview tab |
| ⌘2 | Projects tab |
| ⌘3 | Activity tab |
ProjectStats stores data locally using SwiftData:
- Cache Location:
~/Library/Application Support/projectStats/ - Cached Data: Project metadata, daily activity stats
- Settings: Stored in UserDefaults
No data is sent to external servers except:
- GitHub API requests (if you provide a token)
- Git operations to your configured remotes
- Ensure your code directory is set correctly in Settings
- Projects must have a
.gitfolder or recognized project files (package.json,Cargo.toml, etc.) - Check that the directory isn't in the excluded list (node_modules, .build, etc.)
- Verify your Personal Access Token in Settings
- Use the "Test Connection" button to validate
- Token requires
reposcope for private repositories
- Large repositories with many files take longer to scan
- Consider using
projectstats.jsonfor large projects to skip file counting
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with SwiftUI and SwiftData
- Git operations inspired by libgit2
- Activity heatmap inspired by GitHub's contribution graph