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 🙏

© 2024 – Pkg Stats / Ryan Hefner

playtime

v1.0.1

Published

A command line tool for earning and spending your leisure time.

Downloads

8

Readme

Playtime

oclif Version Downloads/week License

A command line tool for earning and spending your leisure time. Spend some time doing a more "virtuous" task (e.g. study Chinese for 30 minutes or work on the book for 2 hours) and convert that into minutes you can use later to do something a little less "productive" (like playing computer games or binge watching that new series).

Adding play time example

Usage

$ npm install -g playtime
$ playtime COMMAND
running command...
$ playtime (-v|--version|version)
playtime/0.0.1 darwin-x64 node-v14.7.0
$ playtime --help [COMMAND]
USAGE
  $ playtime COMMAND
...

Commands

playtime add

Add time spent on an activity in order to earn play time.

$ playtime add
# You'll be prompted to enter a time source and amount of time spent.
> 5 minutes added. 25 minutes of play time now available.

See code: src/commands/add.ts

playtime use

Use play time that you've previously earned.

$ playtime use
# You'll be prompted to enter the time to use
> 5 minutes used. 20 minutes remaining.

See code: src/commands/add.ts

playtime ls

Show how much playtime you've previously earned.

$ playtime ls
> 5 minutes of play time available

See code: src/commands/add.ts

Configuration

Config Directory

The default config directory is ~/.playtime/. You can set a custom directory by adding the following to your shell config:

PLAYTIME_DIR=/whatever/path/you/like

Custom times / time modifiers

By default the times available are 25 minutes, 50 minutes (both inspired by the Pomodoro Technique), and 90 minutes (inspired by Cal Newport's Deep Work). The 90 minutes time has a modifier of 1.5 applied, so an extra 50% of play time is awarded.

You can add custom times (with optional modifiers) by editing the file data.json in the config directory (see the Config Directory section above for more info). You can add a customTimes field to the json with an array of objects containing a minutes field and an optional modifier field. E.g.

{
  "version":1,
  "availableTime":17,
  "timeSources":[{"name":"Study Spanish","modifier":0.2}],
  "customTimes": [
    { "minutes": 30 },
    { "minutes": 60, "modifier": 1.2 }
  ]
}

Inspiration / Concept

Not surprisingly, this app was written on New Year's Eve as I reflected on some of my habits in 2020. Two in particular stuck out. The first was that I was rarely spending my time doing "deep work". Some of this was to blame on externalities - working from home full-time, adapting to having a first child, my day job evolving into more of a management role, etc. - but the biggest difficulty I could identify was that I rarely have a good trigger to start on deep work. When it comes down to the small, well-defined, surface level task vs the large, ill-defined deep work, the former tends to be the default option.

The second issue, was much simpler - I'm really bad at moderating my leisure time! While it's not bad enough to impact my relationships or work life, it does mean that when it comes to a choice between working on a cool side project or playing that new video game, the latter tends to win. I didn't want to quit playing games, and I didn't want to arbitrarily limit myself (I've tried this in the past and it didn't stick), rather I wanted to find a way to bring some sort of balance to how I spend my time.

The objective then of playtime is to pit these two issues against each other in the hope of solving both. Do deep work, enter it into playtime, and it gets transformed into time you can use later for your leisure activities! It's still a somewhat arbitrary cap, but in the past I've found that systemising habits in this way makes me more likely to stick to them. I can't speak to it's efficiency just yet, but I'm hoping I can revisit this sentence in a few months and update it with a postive outcome!

Development

Releasing

Currently releasing is a manual process:

  • Create a release branch from main
  • Run npm publish
  • Merge the branch back into main (the only change should be the version number)