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

note-mgr-cli

v0.0.4

Published

A CLI for managing notes written in markdown. Designed with publishing and searching in mind.

Downloads

4

Readme

Note-Mgr (aka nom)

nom is a CLI for managing notes written in markdown. Designed with publishing and searching in mind.

Features

  1. Organization: A .index.md file separates drafts from published notes - making it easier to hop into an unfinished draft. .index is also organized A->Z for both lists.
  2. Draft Generation: Use the interactive command line to quickly populate the frontmatter for new notes or directly via the command options
  3. Publication: A single command will move a note from draft to published. By default the note's frontmatter will be confirmed prior to publication.

Getting Started

To use the CLI, install it globally:

$ yarn global add note-mgr
# or
$ npm install note-mgr --global

At this point, nom will be installed. You can confirm by seeing the help menu

$ nom --help

Before using nom, it must be initialized with nom init

nom init gif

Usage

  • -i --init initialize nom
  • -n --new will create a new note and add it to the .contents list
  • -u --update will update the frontmatter for the selected note
  • -r --remove will prompt for a note to remove
  • -d --date will interrogate the notes to understand dates of the notes (e.g., publish date)
  • -c --count will count the notes based on flags provided

Initialization Options

  • "-t --target-dir ", "The relative path to the target directory for notes"
    % nom init -t path/to/target

If no target directory is passed, you will be prompted to provide one in an interactive session.

New Note Options

nom new

To create a new note, at a minimum nom requires either a title (-t --title) or to create the note interactively (-i --interactive).

nom new interactive All options are available for setting declaratively with the following options:

  • "-c --category <category...>", "The frontmatter for category"

    $ nom new -c "note category"
  • "-d --date ", "The frontmatter for publish"

    $ nom new -d 2020-02-20
  • "-i --interactive", "Interactively publish a note"

    $ nom new -i
  • "-p --publish ", "The frontmatter for publish"

    $ nom new -p 2020-02-20
  • "-t --title <title>", "The frontmatter for the title"

    $ nom new --title "the note's title"
  • "--custom [key:value...]", "Custom frontmatter"

    $ nom new --custom "my custom key":"my custom value" --custom "secondKey":"secondValue"
  • "--private", "Mark the note private"

    $ nom new --private
  • "--tags <tag...>", "The frontmatter for the tags"

    $ nom new --tag "tag one" --tag second --tag "a third"

Update Options

nom update --interactive

The nom update command begins by finding a note interactively using a fuzzy search of all files within the notes directory. The search is based on the file name, which is tied to the slug of the note.

Nota Bene: If a note is not updated interactively, only the options passed in from the command line will be updated. So, if no options are passed, nothing will get updated, even after the note is selected.

To update a new note, at a minimum nom requires either a title (-t --title) or to create the note interactively (-i --interactive). All options are available for setting declaratively with the following options:

  • "-c --category <category...>", "The frontmatter for category"

    $ nom update -c "note category"
  • "-d --date ", "The frontmatter for publish"

    $ nom update -d 2020-02-20
  • "-i --interactive", "Interactively publish a note"

    $ nom update --interactive
  • "-p --publish ", "The frontmatter for publish"

    $ nom update -p 2020-02-20
  • "-t --title <title>", "The frontmatter for the title"

    $ nom update --title "the note's title"
  • "--custom [key:value...]", "Custom frontmatter"

    $ nom update --custom "my custom key":"my custom value" --custom "secondKey":"secondValue"
  • "--private", "Mark the note private"

    $ nom update --private
  • "--tag <tag...>", "The frontmatter for the tags"

    $ nom update --tag "tag one" --tag second --tag "a third"

Remove Options

nom has a built in remove method for deleting notes that are no longer desired. The process is interactive by default.

Nota Bene: Use caution as this is a destructive action. It cannot currently be undone. There's an open issue to make remove a soft delete.

Date Options

The date command for nom is intended to identify certain relevant dates quickly.

  • "-f --first", "Return the earliest published note"

    $ nom date --first
  • "-l --latest", "(Default) Return the latest published note"

    $ nom date --latest
  • "-r --recent", "Return the most recent published note in the past"

    $ nom date --recent
  • WIP "-p --private", "Filters only for private notes" and "-np --no-private", "Filters only for public notes" These options are intended to be used in conjunction with other date filters.

    $ nom date --recent --private
    # or
    $ nom date --latest --no-private

Count Options

Similar to dates, the count command in nom is intended to aid simply querying of your notes. It does not currently support stacking of counters (e.g., nom count --stage --category will list the counts by stage and category independently).

Local Development

This project uses yarn to manage dependencies.

yarn build && yarn start will launch the application locally.

If you want the experience of a globally installed CLI, create a link using yarn link from the root of the project. When done, clean up the link with yarn unlink.

Troubleshooting

If you run into a permission denied error, make sure the script is executable:

zsh: permission denied: note-mgr
$ chmod +x index.js

Commit Log Standards

This project follows SemVer and an adaptation of the conventional commit standard.

Commits are prefixed with the following emoji to indicate their purpose.

| Symbol | code | Interpretation | | ------ | ------------------------- | ------------------------ | | ✨ | :sparkles: | feature | | 🐛 | :bug: | fix | | 💅 | :nail-polish: | style | | 🧼 | :soap: | chore | | 📝 | :memo: | docs | | 🐎 | :racehorse: | perf | | 🧪 | :lab: | test | | 🏗️ | :building-construction: | refactor | | 🧰 | :toolbox: | tooling / infrastructure | | 🚀 | :rocket: | major version bump | | 📦 | :package: | minor version bump |