tracecli
v1.1.0
Published
A privacy-first, local-only activity tracker and productivity assistant for developers.
Maintainers
Readme
TraceCLI
A privacy-first, local-only activity tracker and productivity assistant for developers. TraceCLI runs in your terminal, monitoring your active window to provide detailed insights into your work habits without ever sending your data to the cloud.
Features
- Privacy-First Architecture: All activity data is stored locally in a SQLite database on your machine. No data is ever uploaded to external servers.
- Contextual Focus Mode: A smart focus timer that locks to your specific work context (e.g., a specific project in VS Code or a documentation page in Chrome). Switching to unrelated applications or browser tabs is flagged as a distraction.
- Agentic AI Assistant: Use the
askcommand to query your data in natural language or request productivity actions. The AI runs locally aware (via API) but respects your data privacy by only processing the necessary context. - Pomodoro Timer: Integrated Pomodoro technique support with customizable work/break intervals and strict distraction blocking.
- Browser Insights: Automatically extracts and categorizes search queries and specific documentation pages to distinguish between "Research" and "Distraction".
Installation
From NPM (Recommended)
Note: Once the package is available on the registry.
npm install -g tracecliFrom GitHub
You can install the latest version directly from the GitHub repository:
npm install -g Haseeb-Arshad/tracecli-npmLocal Installation (For Developers)
If you have the repository cloned locally, you can use npm link to make the tracecli command available globally:
- Navigate to the project directory:
cd trace-cli-node - Install dependencies and build:
npm install npm run build - Link the package:
npm link
After linking, you can use the tracecli command anywhere in your terminal.
Quick Start
Start the background tracker:
tracecli startThis will launch the daemon process that monitors your active window.
View your status:
tracecli statusGenerate a daily report:
tracecli report
Usage
Activity Tracking
tracecli start- Start the background tracking daemon.tracecli stop- Stop the background tracker.tracecli status- Check if the tracker is running and view current session stats.
Productivity & Focus
tracecli focus <minutes> --goal "Your Goal"Starts a focus session. The system will lock to your current application (Context Lock). If you switch to an unrelated app or website, it will be recorded as a distraction.Example:
tracecli focus 45 --goal "Refactoring API"tracecli pomodoroStarts a standard Pomodoro timer (25 minutes work, 5 minutes break). Cycles automatically.
Data & Insights
tracecli reportShows a summary of today's activity, including top apps, categories, and productivity score.tracecli report --date YYYY-MM-DDView a report for a specific date.tracecli exportExport your activity data to a CSV or JSON file for external analysis.
AI Assistant
tracecli ask "Question"Ask natural language questions about your productivity or request actions.Examples:
- "How much time did I spend on VS Code yesterday?"
- "What were my top distractions this week?"
- "Export my focus sessions to CSV."
tracecli config setupConfigure your AI provider (Gemini, OpenAI, or Claude) and API key. This is required for theaskcommand and advanced distraction detection in Focus Mode.
Configuration
TraceCLI stores its configuration and database in your home directory under .tracecli.
- Database:
~/.tracecli/trace_data.db(SQLite) - Config:
~/.tracecli/config.json
Development
To build and run TraceCLI locally:
- Clone the repository.
- Install dependencies:
npm install - Build the project:
npm run build - Run the CLI:
node dist/index.js <command>
License
MIT License. See LICENSE for details.
