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

@focus-me/focus-cli

v3.0.4

Published

A configurable timer with a plugin system meant to automate various tasks when the timer starts, stops, or ticks.

Downloads

46

Readme

Focus Me

A configurable timer with a plugin system meant to automate various tasks when the timer starts, stops, or ticks.

Project Goals

The goal of this project is to help maintain focus. Start a timer and remove distraction seamlessly. When the timer ends, take a break on revisit the distracting world for a bit before setting another timer. We accomplish the goal via:

  • OS/GUI automations (applescript, powershell, etc)
  • Useful 3rd party integrations (slack, rescuetime, arbitrary http/s requests)
  • 1st party Persistence and analytics (see how focused you are, track trends over time)

To this end, most of the functionality of the Focus Me lies within the various plugins.

Plugins

  • applcation-manager - Closes distracting applications before the timer starts, and opens them back up when the timer ends.
  • bell - Plays a nice sounding bell at the start and end of the timer.
  • logger - Logs the time remaining to the terminal.
  • rain Plays the sound of rain during the duration of the timer
  • slack Toggles do not disturb and sets a status for the duration of the timer
  • spotify Plays spotify during the timer, stops it when the timer ends.
  • tracker Tracks the number of sessions completed per day, along with the focused applications in use for the duration of the timer.
  • webhooks Fire configurable HTTP requests when the timer starts and stops.

Installation

npm install -g @focus-me/focus-cli

macOS is the only supported platform at the moment, PRs welcome!

Configuration

focus will look in a platform specific folder to try to load configuration, and if cannot find it will throw. You can specify an alternative config with using the --config command line option or config environment variable.

  • config.time - The amount of time, in minutes, to count down.
  • config.plugins - An object of plugins to configure. Each key is the name of the plugin. Each plugin has an enabled property to enabled/disabled it, as well as other plugin-specific configuration.
{
  "time": 25,
  "plugins": {
    "name-of-plugin": {
      "enabled": true
    }
  }
}

Usage

focus will start the timer.

If you need to cancel the timer, you can kill the process with a SIGINT. Canceling the timer will not execute any plugins' stop methods that should only be run upon completion of the timer.

CLI options

  • --help - Display the list of options
  • --version - Display the version of FocusMe
  • --config - Specify an alternative path to a FocusMe config file.

Creating your own plugin

If you specify an additional plugin in config.plugins, we attempt to import that module. The module must implement the plugin interface

Files

Installing this module will create files in:

  • ~/Library/Application Support/FocusMe/preferences.json: Your FocusMe preferences/config.
  • ~/Library/Script Libraries/FocusMe/util.scpt: A compiled applescript that serves as a library for other applescripts to import. It is responsible for reading and parsing the user's preferences.