Metadata-Version: 2.4
Name: devpulse-cli
Version: 0.3.0
Summary: DevPulse – Developer Productivity CLI and GitHub analytics
Home-page: https://github.com/yourusername/devpulse
Author: DevPulse Maintainers
Author-email: DevPulse Maintainers <maintainers@devpulse.dev>
License: MIT
Project-URL: Homepage, https://github.com/devspak-s8/devpulse-cli
Project-URL: Repository, https://github.com/devspak-s8/devpulse-cli
Project-URL: Issues, https://github.com/devspak-s8/devpulse-cli/issues
Keywords: developer-productivity,cli,github,analytics,fastapi,typer
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.21.0
Requires-Dist: rich>=13.7.0
Requires-Dist: requests>=2.31.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: pathspec>=0.12.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: tabulate>=0.9.0
Requires-Dist: tqdm>=4.66.0
Requires-Dist: pyperclip>=1.8.2
Requires-Dist: colorama>=0.4.6
Provides-Extra: api
Requires-Dist: fastapi>=0.115.0; extra == "api"
Requires-Dist: uvicorn>=0.28.0; extra == "api"
Provides-Extra: ai
Requires-Dist: openai>=1.10.0; extra == "ai"
Requires-Dist: anthropic>=0.8.0; extra == "ai"
Provides-Extra: data
Requires-Dist: pandas>=2.1.0; extra == "data"
Requires-Dist: numpy>=1.26.0; extra == "data"
Provides-Extra: viz
Requires-Dist: matplotlib>=3.8.0; extra == "viz"
Requires-Dist: plotly>=5.18.0; extra == "viz"
Provides-Extra: db
Requires-Dist: sqlalchemy>=2.0.0; extra == "db"
Requires-Dist: alembic>=1.13.0; extra == "db"
Provides-Extra: config
Requires-Dist: pydantic>=2.5.0; extra == "config"
Requires-Dist: pydantic-settings>=2.1.0; extra == "config"
Requires-Dist: python-dotenv>=1.0.0; extra == "config"
Requires-Dist: PyYAML>=6.0.1; extra == "config"
Provides-Extra: time
Requires-Dist: pendulum>=3.0.0; extra == "time"
Provides-Extra: secrets
Requires-Dist: detect-secrets>=1.4.0; extra == "secrets"
Requires-Dist: python-magic>=0.4.27; extra == "secrets"
Provides-Extra: watch
Requires-Dist: watchdog>=3.0.0; extra == "watch"
Provides-Extra: full
Requires-Dist: fastapi>=0.115.0; extra == "full"
Requires-Dist: uvicorn>=0.28.0; extra == "full"
Requires-Dist: openai>=1.10.0; extra == "full"
Requires-Dist: anthropic>=0.8.0; extra == "full"
Requires-Dist: pandas>=2.1.0; extra == "full"
Requires-Dist: numpy>=1.26.0; extra == "full"
Requires-Dist: matplotlib>=3.8.0; extra == "full"
Requires-Dist: plotly>=5.18.0; extra == "full"
Requires-Dist: sqlalchemy>=2.0.0; extra == "full"
Requires-Dist: alembic>=1.13.0; extra == "full"
Requires-Dist: pydantic>=2.5.0; extra == "full"
Requires-Dist: pydantic-settings>=2.1.0; extra == "full"
Requires-Dist: python-dotenv>=1.0.0; extra == "full"
Requires-Dist: PyYAML>=6.0.1; extra == "full"
Requires-Dist: pendulum>=3.0.0; extra == "full"
Requires-Dist: detect-secrets>=1.4.0; extra == "full"
Requires-Dist: python-magic>=0.4.27; extra == "full"
Requires-Dist: watchdog>=3.0.0; extra == "full"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# DevPulse CLI

A comprehensive command-line tool for developer productivity tracking, system monitoring, and GitHub analytics.

## Features

### Core Productivity
- **Track** - Time tracking and task management
- **Stats** - Analytics and productivity statistics
- **Health** - Real-time system monitoring and process management
- **Logs** - Log analysis and search capabilities
- **Secrets** - Security scanning for exposed credentials
- **Sync** - Cloud data synchronization
- **AI** - AI-powered productivity insights

### Time & Focus Management
- **Timer** - Pomodoro and custom interval timers
- **Focus** - Distraction-free focus sessions with website blocking
- **Breaks** - Scheduled break reminders and tracking
- **Habits** - Daily habit tracking and streak monitoring

### Organization & Reporting
- **Project** - Multi-project management and context switching
- **Notes** - Integrated note-taking system
- **Report** - Automated productivity reports (daily, weekly, monthly)
- **Dashboard** - Real-time productivity metrics dashboard

### GitHub Integration
- **GitHub Stats** - Repository statistics and health scoring
- **GitHub Activity** - Public user activity tracking and event analysis
- **GitHub Contributors** - Contributor analysis and rankings
- **GitHub Issues** - Issue metrics and trend analysis
- **GitHub Pull Requests** - List, view, and merge PRs with conflict detection and safe merge operations

### Data Management
- **Config** - Configuration management
- **Export** - Multi-format data export (CSV, JSON, Excel, PDF)

## Installation

### PyPI Installation

```bash
# Standard installation
pip install devpulse-cli

# Full installation with all optional dependencies
pip install devpulse-cli[full]

# Specific feature sets
pip install devpulse-cli[ai]      # AI features
pip install devpulse-cli[data]    # Data analysis
pip install devpulse-cli[http]    # GitHub integration
```

### Development Installation

```bash
git clone https://github.com/devspak-s8/devpulse-cli.git
cd devpulse-cli
pip install -e .
```

## Quick Start

### Time Tracking

```bash
# Start tracking a task
devpulse track start "Implement authentication feature"

# Check current status
devpulse track status

# Stop tracking
devpulse track stop

# View today's sessions
devpulse track list --today
```

### System Monitoring

```bash
# Check system health
devpulse health check

# Monitor specific services
devpulse health check --service cpu
devpulse health check --service memory

# View top processes
devpulse health processes --top 10 --sort memory

# Set up alerts
devpulse health alert --cpu 80 --memory 85
```

### GitHub Analytics

```bash
# Repository statistics
devpulse github stats --repo torvalds/linux

# User activity tracking
devpulse github activity torvalds
devpulse github activity torvalds --events push,pr,issues --since 7d

# Export as JSON
devpulse github activity torvalds --json --force-refresh

# Debug mode with rate limit info
devpulse github activity torvalds --debug

# Repository health analysis
devpulse github stats --repo microsoft/vscode --include health,contributors

# List pull requests
devpulse github prs owner/repo                           # List open PRs
devpulse github prs owner/repo --state all              # All PRs (open + closed)
devpulse github prs owner/repo --conflicts-only         # Only conflicted PRs
devpulse github prs owner/repo --json                   # JSON output

# View single PR details
devpulse github pr view owner/repo 123                  # View PR #123
devpulse github pr view owner/repo 123 --json           # JSON format

# Merge a pull request (interactive auth prompt)
devpulse github pr merge owner/repo 123 --dry-run       # Preview merge
devpulse github pr merge owner/repo 123 --strategy squash --confirm  # Squash merge
devpulse github pr merge owner/repo 123 --strategy merge --confirm   # Full merge
devpulse github pr merge owner/repo 123 --confirm --force            # Override failing checks
```

### Productivity Reports

```bash
# Generate daily report
devpulse report daily

# Weekly summary
devpulse report weekly --format html --output report.html

# Export analytics
devpulse stats show --period month
devpulse export all --format json --output backup.json
```

## Configuration

### Environment Variables

```bash
# GitHub API authentication (recommended for higher rate limits)
export GITHUB_TOKEN="your_personal_access_token"

# Authenticated: 5000 requests/hour
# Unauthenticated: 60 requests/hour
```

### Global Settings

```bash
# View current configuration
devpulse config show

# Set preferences
devpulse config set theme dark
devpulse config set timezone UTC
```

## Architecture

### Key Components

- **CLI Layer** - Typer-based command interface with Rich formatting
- **Core Services** - Business logic and data processing
- **GitHub Client** - HTTP client with caching, rate limiting, and fallback
- **Storage** - SQLite database for local data persistence
- **Cache System** - Request caching with configurable TTL and stale fallback

### GitHub Integration Features

- HTTP caching with 10-minute default TTL
- Automatic stale cache fallback on network errors
- Rate limit detection and user-friendly error messages
- Optional GitHub token authentication
- Configurable request timeouts
- Debug mode for API inspection

## Testing

```bash
# Run all tests
pytest

# Run with coverage report
pytest --cov=devpulse --cov-report=html

# Run specific test module
pytest tests/test_github_activity.py -v

# Run with output
pytest -v -s
```

### Test Coverage

- 205+ automated tests
- Unit tests for core functionality
- Integration tests for CLI commands
- Mock-based tests for external APIs

## Command Reference

For detailed command documentation, run:

```bash
devpulse --help
devpulse <command> --help
```

### Common Options

Most commands support these standard options:

- `--json` - Output raw JSON instead of formatted tables
- `--force-refresh` - Bypass cache and fetch fresh data
- `--debug` - Enable debug output with API metadata
- `--timeout N` - Set request timeout in seconds

## Contributing

Contributions are welcome. Please ensure:

1. All tests pass before submitting PRs
2. New features include corresponding tests
3. Code follows existing patterns and style
4. Documentation is updated as needed

## License

MIT License - see LICENSE file for details

## Links

- **Repository**: https://github.com/devspak-s8/devpulse-cli
- **Issues**: https://github.com/devspak-s8/devpulse-cli/issues
- **PyPI**: https://pypi.org/project/devpulse-cli/
