Skip to content

crapthings/clarity

Clarity

Clarity Logo

AI-powered productivity tracker that automatically captures your screen activity and provides intelligent insights. All data stays local for maximum privacy.

License: MIT GitHub stars GitHub release

Features β€’ Quick Start β€’ Documentation β€’ Contributing β€’ Support


✨ Features

  • πŸŽ₯ Automatic Screen Recording: Captures screenshots at 1 FPS with minimal CPU usage
  • πŸ€– AI-Powered Analysis: Uses Google Gemini API to generate intelligent activity summaries
  • πŸ“Š Rich Visualizations: Beautiful charts and statistics for daily, weekly, monthly, and yearly insights
  • 🌍 Multi-language Support: Full support for English and Chinese (δΈ­ζ–‡)
  • πŸ”’ Privacy First: All data is stored locally on your device - nothing leaves your computer
  • πŸ“ˆ Activity Timeline: Visual timeline showing your daily activities with AI-generated summaries
  • ⚑ High Performance: Optimized screenshot capture and JPEG compression (quality 85)
  • πŸ–₯️ Cross-Platform: Works on macOS, Windows, and Linux

πŸš€ Quick Start

Prerequisites

  • Node.js (v18 or higher) and pnpm
  • Rust (latest stable) and Cargo
  • Tauri CLI v2: cargo install tauri-cli@^2

Installation

# Clone the repository git clone https://github.com/crapthings/clarity.git cd clarity # Install dependencies pnpm install # Run in development mode pnpm tauri dev # Build for production pnpm tauri build

Platform-Specific Setup

macOS

The app requires Screen Recording permission. When you first run the app, macOS will prompt you to grant this permission. You can also grant it manually:

  1. Open System Settings β†’ Privacy & Security β†’ Screen Recording
  2. Enable clarity

Windows

The app may require administrator privileges for screen capture depending on your security settings.

Linux

On X11 systems, this typically works out of the box. On Wayland, you may need to grant permissions through your desktop environment's settings.

πŸ“– Usage

  1. Start Recording: Click the "Start Recording" button to begin capturing screenshots at 1 FPS
  2. View Timeline: Navigate to the Trace page to see your activity timeline with AI-generated summaries
  3. Check Statistics: Visit the Statistics page to see detailed metrics and API usage
  4. Generate Daily Summary: Go to the Summary page to generate comprehensive daily reports with charts
  5. Configure Settings: Set up your Google Gemini API key, adjust summary intervals, and customize AI prompts

First-Time Setup

  1. Get a Google Gemini API key from Google AI Studio
  2. Open Settings and paste your API key
  3. Configure your preferred AI model (default: gemini-3-flash-preview)
  4. Customize the AI prompt for summaries (supports both English and Chinese)
  5. Set your preferred language and video resolution

πŸ—οΈ Architecture

Clarity is built with modern web technologies:

  • Frontend: React 19 + Vite + TailwindCSS + BaseUI
  • Backend: Rust + Tauri v2
  • Database: SQLite (local storage)
  • AI: Google Gemini API (File API for video processing)
  • Charts: Recharts for data visualization

Project Structure

clarity/ β”œβ”€β”€ src/ # React frontend β”‚ β”œβ”€β”€ components/ # React components β”‚ β”œβ”€β”€ pages/ # Page components (Trace, Summary, Statistics, Settings) β”‚ β”œβ”€β”€ i18n/ # Internationalization β”‚ └── store.js # Zustand state management β”œβ”€β”€ src-tauri/ # Rust backend β”‚ β”œβ”€β”€ src/ β”‚ β”‚ β”œβ”€β”€ lib.rs # Main application logic β”‚ β”‚ β”œβ”€β”€ db.rs # Database operations β”‚ β”‚ └── video_summary.rs # Video processing and AI integration β”‚ └── Cargo.toml # Rust dependencies └── package.json # Node.js dependencies 

πŸ”§ Configuration

AI Settings

  • API Key: Your Google Gemini API key (required for AI summaries)
  • Model: AI model to use (default: gemini-3-flash-preview)
  • Summary Interval: How often to generate summaries (default: 45 seconds)
  • Video Resolution: Low (~100 tokens/sec) or Default (~300 tokens/sec) for better text recognition
  • Custom Prompts: Customize AI prompts in both English and Chinese

Storage

Screenshots are automatically stored in platform-specific directories:

  • macOS: ~/Library/Application Support/clarity/recordings/
  • Windows: %LOCALAPPDATA%/clarity/recordings/
  • Linux: ~/.local/share/clarity/recordings/

All data is organized by date (YYYY-MM-DD) for easy browsing.

πŸ“š Documentation

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ’ Support

If you find Clarity useful, please consider:

πŸ™ Acknowledgments

πŸ“Έ Screenshots

Clarity Main Interface

Clarity - AI-Powered Productivity Tracker


Made with ❀️ by crapthings

Report Bug β€’ Request Feature β€’ Documentation

About

AI-powered productivity tracker that records screen activity locally and generates intelligent insights.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors