npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

git-fikatime

v1.0.0

Published

**Your friendly CLI that checks how many Git commits you’ve made in the last couple of hours and gently reminds you to take a well-deserved fika break.**

Readme

fikatime

Your friendly CLI that checks how many Git commits you’ve made in the last couple of hours and gently reminds you to take a well-deserved fika break.

Fika — a cherished Swedish tradition of pausing for coffee, treats, and good company — is an essential ritual to keep you energized and motivated while coding. This tool scans your recent Git commits and tells you if you might be overdoing it, encouraging you to step away for some fresh air, coffee, or a moment of mindfulness.

Table of Contents


Features

  • Commit Analysis: Looks at how many commits you’ve pushed in the last 2 hours.
  • Smart Time Check: If your coding session (earliest → latest commit) exceeds 60 minutes or you have 10+ commits, it suggests a break.
  • ASCII Coffee Vibes: A motivational ASCII banner to lighten your mood.
  • Simple & Friendly: Minimal overhead, quick to run, easy to integrate into any workflow.

Installation

  1. Install globally (recommended):

    npm install -g fikatime
  2. Or run directly via npx (no install needed):

    npx fikatime --test
  3. Or clone the repo and build from source (if you want to hack on it):

    git clone https://github.com/yourusername/fikatime.git
    cd fikatime
    npm install
    npm run build

Usage

If installed globally:

fikatime
  • Checks the last 2 hours of commits in the current Git repo.
  • If you’re coding non-stop, you’ll see a friendly ASCII reminder to take a break.
  • If you’re pacing well, you’ll get a pat on the back.

(Make sure you’re in a directory that’s a valid Git repo!)

Typical command:

fikatime --test

Shows an ASCII “FIKA TIME” preview, ignoring actual Git data. Great for verifying you installed everything correctly.


How It Works

  1. Scans your Git log for commits in the last 2 hours using:
    git log --since="2 hours ago" --pretty=format:"%H|%aI|%s"
  2. Calculates:
    • The count of commits
    • The time difference (in minutes) between the earliest & latest commits
  3. Checks:
    • If count >= 10 or minutes > 60, it prints a special ASCII banner suggesting you enjoy a Fika break.
    • Otherwise, it encourages you to keep going at a nice pace.

Configuration

For now, thresholds are hardcoded:

if (count >= 10 || minutes > 60) {
  // Time for a Fika!
}

If you want to tweak that logic (e.g., 5 commits or 30 minutes), open src/fikatime.ts (or wherever your main code is) and modify the values in the showRecommendation function. Rebuild and enjoy your custom threshold!


Demo Mode

Use --test to see the ASCII “FIKA TIME” banner without scanning commits:

fikatime --test

This is purely for fun or to ensure your installation is working properly.


FAQ

  1. Why does it say “Failed to read Git commits” in some repos?
    Likely because you’re not in a repo that has commits in the past 2 hours, or your HEAD is in a detached state. Switch to a branch and try again.

  2. How do I change the ASCII art or messages?
    The art is generated by libraries like figlet or ASCII strings in the code. Just open the code, swap in your own text, and recompile.

  3. Can I run this as part of my CI or pre-commit hook?
    Sure, but it’s probably more of a local, personal comfort tool than a production CI. Still, you do you!

  4. Does it support Windows, Mac, Linux?
    Yes. As long as you have Node and Git installed, it should work on any OS.


Contributing

We welcome any bug reports, new feature suggestions, or creative ASCII art expansions! To contribute:

  1. Fork the repo.
  2. Make changes on a new branch.
  3. Test thoroughly (npm run build && node dist/fikatime.js --test).
  4. Submit a pull request.

We’re always open to improvements, especially new break ideas or funny ASCII messages.


License

MIT License

Feel free to use, modify, or distribute this code. Just don’t forget to take your own Fika break from time to time. Caffeine and a little rest can do wonders for your code quality and sanity!


Enjoy fikatime!

Take care of your mental well-being during those intense coding sessions. Give your mind a rest, savor a snack, maybe have a little chat. After all, la vida é curta, and coffee breaks are essential to keep that developer momentum going.

Skål! (Cheers!) May your commits be green and your breaks be invigorating.