aniqa.dev

Selected work 03

Rflect CLI

A command-line journal with guided prompts, moods, streaks and writing stats. Published on npm.

Released
Dec 2024
Type
CLI tool
Stack
Node / Commander / Inquirer
Links
npm ↗Code ↗
Rflect’s help screen in a macOS Terminal window, listing its options and commands: write, show, prompts, tags, moods, init, config, stats, delete, upcoming and help.
Click the screenshot to open the live sitenpmjs.com/package/rflect ↗

Why

Not everything has to be a website. I wanted to build something that lives in the terminal.

What it does

  1. Guided prompts in five categories: growth, gratitude, mindfulness, questions and quotes.
  2. Tag and mood each entry, then find entries by date, tag, prompt type or mood.
  3. Streaks, word counts, writing goals and a monthly mood calendar.
  4. Everything stays on your computer, so it works offline.

What I learned

  1. Commands people can remember, built with Commander and Inquirer: write, show, prompts, tags, moods, stats and config.
  2. Storing entries as local files in ~/.rflect, and working out stats from them.
  3. Testing with Jest, and versioning and publishing a package to npm.