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

t2-notes

v1.0.3

Published

A beautiful terminal-based note-taking app with git-backed storage

Downloads

347

Readme

Terminal Notes App 📝

A beautiful terminal-based note-taking app with git-backed storage, similar to nb.

✨ Features

  • 📝 Markdown notes with live preview
  • 🎨 Beautiful terminal UI with multiple themes
  • ⚙️ Configurable via CLI or config file
  • 📂 Local vault storage with automatic organization
  • 🔄 Git-backed with auto-commits on every change
  • 🌐 Remote sync support (push/pull to GitHub, GitLab, etc.)
  • ⌨️ Keyboard-driven workflow
  • 📅 Date-based note naming with auto-numbering
  • 🔍 Quick navigation and search
  • ✏️ External editor support (nvim, vim, nano, etc.)

🚀 Install

npm install --global t2-notes

📖 Usage

Starting the App

t2-notes

The app will automatically create a vault at ~/.notes and initialize it as a git repository.

Configuration

You can configure the application directly from the terminal using the configuration interface.

t2-notes --config

This will open the configuration menu where you can:

  • Set Vault Path: Choose where your notes are stored (defaults to ~/.notes).
  • Select Theme: Choose from a variety of built-in themes.

Configuration is saved to ~/.t2/config.json.

Manual Configuration

You can also manually edit the configuration file at ~/.t2/config.json:

{
  "theme": "tokyo-night",
  "vaultPath": "/Users/username/my-notes"
}

Environment Variables

You can override the vault path using environment variables (highest priority):

export VAULT_PATH=/path/to/your/notes
t2-notes

Or:

export NOTES_VAULT=/path/to/your/notes
t2-notes

⌨️ Keyboard Shortcuts

| Key | Action | |-----|--------| | 1 | Focus Notes pane | | 2 | Focus Preview pane | | 3 | Focus TODOs pane | | n | Create new note | | e | Edit selected note | | d | Delete selected note | | ↑/↓ | Navigate notes | | Enter | Select note | | Ctrl+C | Quit |

📝 Creating Notes

  1. Press n to open the create note dialog
  2. Enter a title (defaults to today's date: YYYY-MM-DD)
  3. Press Enter to create

Notes are automatically named by date:

  • First note of the day: 2025-11-13.md
  • Second note: 2025-11-13-2.md
  • Third note: 2025-11-13-3.md

✏️ Editing Notes

  1. Select a note using arrow keys
  2. Press e to open in your editor
  3. Make changes and save
  4. Changes are auto-committed to git

The app uses your $EDITOR or $VISUAL environment variable, defaulting to nvim.

To set your preferred editor:

export EDITOR=nano  # or vim, emacs, code, etc.

🌐 Git Remote Sync

The vault is automatically initialized as a git repository. You can sync it with a remote repository (GitHub, GitLab, Bitbucket, etc.).

Initial Setup

  1. Create a repository on your git hosting service (GitHub, GitLab, etc.)

  2. Add the remote to your vault:

cd ~/.notes # Or your custom vault path
git remote add origin https://github.com/yourusername/notes.git
git branch -M main
git push -u origin main

Pushing Changes

After making changes in the app, push to remote:

cd ~/.notes
git push

Pulling Changes

If you edit notes from another device, pull changes:

cd ~/.notes
git pull

Auto-Sync Script

Create a script for automatic sync (optional):

#!/bin/bash
# ~/.local/bin/notes-sync

cd ~/.notes
git pull --rebase
git push

echo "Notes synced!"

Make it executable:

chmod +x ~/.local/bin/notes-sync

Run it periodically or before/after using the app.

Using Git Hooks

You can set up git hooks to auto-sync. Create ~/.notes/.git/hooks/post-commit:

#!/bin/bash
git push origin main &

Make it executable:

chmod +x ~/.notes/.git/hooks/post-commit

📂 Vault Structure

~/.notes/
├── .git/              # Git repository
├── README.md          # Vault info
└── notes/             # Your notes
    ├── 2025-11-13.md
    ├── 2025-11-13-2.md
    └── ...

📄 Note Format

Notes use Markdown with YAML frontmatter:

---
title: My Note Title
created: 2025-11-13T20:00:00.000Z
modified: 2025-11-13T20:30:00.000Z
pinnedAt: 2025-11-13T20:15:00.000Z
---

# My Note Title

Your content here...

## Lists

- Item 1
- Item 2

## Code

\`\`\`javascript
console.log('Hello, world!');
\`\`\`

## TODOs

- [x] Completed task
- [ ] Pending task

🎨 Themes

The app comes with several built-in themes including:

  • tokyo-night (default)
  • synthwave-84
  • forest-night
  • material-ocean
  • sunset-glow
  • nord-frost
  • rose-pine-dawn
  • neon-jungle
  • midnight-amethyst
  • desert-mirage
  • cherry-blossom
  • electric-storm
  • deep-sea
  • volcanic-ash
  • cyberpunk-mint

Change themes using t2 --config.

🔧 Development

# Install dependencies
npm install

# Run in development
npm start

# Build
npm run build

# Test
npm test

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit PRs.

📝 License

MIT

🙏 Acknowledgments

Inspired by nb - a command-line note-taking tool.