An open API service indexing awesome lists of open source software.

https://github.com/krikera/dev-grind

A productivity tracker for developers that measures time spent in terminal, git, editor, and builds
https://github.com/krikera/dev-grind

analytics cli developer-tools git metrics productivity time-tracking

Last synced: 5 months ago
JSON representation

A productivity tracker for developers that measures time spent in terminal, git, editor, and builds

Awesome Lists containing this project

README

          

# Dev Grind

A developer productivity tracking tool that measures time spent in terminal, git operations, editor activity, and build processes.

## Features

- **Terminal Tracking**: Monitor shell command usage, execution time and exit codes
- **Git Activity**: Track commits, branches, merges and other git operations
- **Editor Usage**: Track time spent in your editor and which files you work on most
- **Build Time**: Measure how much time you spend waiting for builds to complete
- **Custom Tags**: Label your work sessions with custom tags for better reporting
- **Privacy-Focused**: All data stored locally by default, no cloud uploads
- **Cross-Platform**: Works on macOS, Linux and Windows

## Installation

### Via npm

```bash
npm install -g dev-grind
```

### From Source

```bash
git clone https://github.com/yourusername/dev-grind.git
cd dev-grind
npm install
npm run build
npm link
```

## Quick Start

Start tracking your development activity:

```bash
dev-grind start
```

This will start the dev-grind daemon that tracks your activity. You'll need to integrate with your shell, git, and build tools for full functionality (see setup instructions below).

View your daily report:

```bash
dev-grind report
```

## Setup Instructions

### Terminal Tracking

For Bash, add this to your `~/.bashrc` or `~/.bash_profile`:

```bash
source ~/.dev-grind/temp/bash_hook.sh
```

For Zsh, add this to your `~/.zshrc`:

```bash
source ~/.dev-grind/temp/zsh_hook.sh
```

### Git Tracking

To track Git operations in your repositories:

```bash
# For a single repository
git config --local core.hooksPath ~/.dev-grind/temp/git_hooks

# For all repositories globally
git config --global init.templateDir ~/.dev-grind/temp/git_hooks
```

### Build Tracking

Add these aliases to your shell profile:

```bash
alias npm="~/.dev-grind/temp/build_hooks/npm-hook.sh"
alias yarn="~/.dev-grind/temp/build_hooks/yarn-hook.sh"
alias pnpm="~/.dev-grind/temp/build_hooks/pnpm-hook.sh"
```

### Editor Tracking (Coming Soon)

We're working on plugins for:
- VS Code
- JetBrains IDEs
- Sublime Text
- Atom

## Usage

### Basic Commands

```bash
# Start tracking
dev-grind start

# Check daemon status
dev-grind status

# Stop tracking
dev-grind stop

# Tag your current work session
dev-grind tag "feature-login" --description "Working on login feature"

# Generate daily report
dev-grind report

# Generate weekly report
dev-grind report --week

# Generate monthly report
dev-grind report --month

# Export data
dev-grind export --format json --output my-data.json
dev-grind export --format csv --start 2023-01-01 --end 2023-01-31
```

## Reports

Dev Grind generates reports showing:

- **Time Summary**: How much time you spent in each development activity
- **Activity Summary**: Count of commands, git operations, builds, etc.
- **Timeline**: Chronological view of your day's activities
- **Tags**: Summary of tags you've used to categorize your work
- **Daily Breakdown**: For weekly or monthly reports

### Sample Report

```
📊 DEV GRIND PRODUCTIVITY REPORT
📅 Apr 15, 2025

🕐 Time Summary
📋 Total tracking time: 7h 45m
💻 Terminal time: 2h 15m (29%)
📝 Editor time: 4h 30m (58%)
🏗️ Build time: 35m (8%)
⌛ Other time: 25m (5%)

📈 Activity Summary
🔡 Terminal commands: 145
🔄 Git operations: 22
🏗️ Builds: 12

🏷️ Tags
feature-login: 8
bug-fix: 5
refactor: 3
```

## Configuration

Configuration is stored in `~/.dev-grind/config.json`. You can edit this file directly or use the CLI:

```bash
dev-grind config set autoStart true
dev-grind config set reportStyle compact
```

## Data Storage

By default, all data is stored locally in SQLite format at `~/.dev-grind/dev-grind.db`.

## Contributing

Contributions are welcome! Please check out our [Contributing Guide](CONTRIBUTING.md).

## License

[MIT](LICENSE)