Skip to content

DeepakRoy58/roy-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROY-TTY

Socket Badge

pkg:npm/roy-tty-cli@1.0.9

A terminal based todo app, built from scratch to understand how CLI tools actually work under the hood.


screenshot

Why this exists

I built this not because I needed another todo app but because I wanted to understand things. Things like how a CLI command gets installed globally on a machine, how npm publishing works, how you can persist data without touching a database, and how terminal UI libraries behave when you actually use them in a real project.

This is not a product. It is a learning artifact.

Everything runs inside your terminal and everything gets saved to a local JSON file on your system. No server. No cloud. No account.

What it can do

Add tasks from the command line directly or through an interactive menu.

List everything with category grouping and current status so you can see what's done and what's still pending.

Toggle task state between done and pending whenever you need to.

Delete tasks cleanly from the list.

Organize by category so tasks like backend work, DSA practice, and system design stuff don't all pile into the same undifferentiated list.

Check your stats to see a simple progress breakdown of how many tasks you have finished.

Interactive mode gives you a menu-driven interface inside the terminal using Inquirer so you don't have to remember any commands.

Direct CLI mode lets you just fire commands if you know what you want.

How to install

npm install -g roy-tty-cli

How to use it

Run it without any arguments to open interactive mode:

roy-tty

Or use it directly from the command line:

roy-tty add "finish the auth module"
roy-tty list
roy-tty list --done
roy-tty list --pending
roy-tty list --category backend
roy-tty done 1
roy-tty delete 1

Where your data lives

All your tasks are stored in a single JSON file at:

~/.roy-tty/todos.json

Nothing leaves your machine. It's just the Node.js fs module reading and writing a file. That's the entire database layer.

How it's structured

index.js      entry point, wires up the cli
menu.js       interactive mode and the inquirer ui
commands.js   all the actual command logic lives here
store.js      the file based data layer
ui.js         terminal rendering and table formatting

What this project actually is

This is not production ready and it was never meant to be.

No sync. No auth. No cloud backup. No databases. No fancy error handling for edge cases that probably don't matter.

What it does do is show how all these pieces fit together:

  • The bin field in package.json
  • How global commands work
  • How npm publishing works
  • How Inquirer handles menu interactions
  • How Chalk styles terminal output
  • How local persistence works with the file system

If you're trying to understand how CLI tools work from first principles, the codebase is intentionally small enough to read in one sitting.

Tech used

  • Node.js
  • Inquirer
  • Chalk
  • Figlet
  • CLI Table 3
  • fs module

About

Built for fun to learn how CLI tools and terminal UIs actually work under the hood from global npm commands to file-based storage and interactive terminals:)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors