Skip to content

A local storage CLI for engineering types who want to track their task without ever leaving the terminal πŸ‘©β€πŸ’» πŸ’» I built this for myself but, since I couldn't find an existing version I could use, I figured I'd share it here in case others could use it!

License

Notifications You must be signed in to change notification settings

udemonia/node-todo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple Command Line Tool For Tasks

Local storage task CLI built with Commander

npm download

> npm i udemonia-to-do

For NPM package use after installing the NPM package

$ touch cli.js

In the cli.js file, require the package

const toDoCLI = require('udemonia-to-do')

The basic data structure of a to-do

[
  {
    "name": "Example Task",
    "dateAdded": "2021-06-08",
    "notes": "Example Notes - things to keep in mind",
    "completed": false,
    "dateCompleted": null
  }
]

Basic To Do Commands

Add a new to-do

> node cli.js new

You will be prompted for the name of the task and any notes you'd want to add

$ node cli.js new
? To Do
? Notes

Notes default to an empty string if you press enter without adding notes

You can also skip the 'To Do' prompt by adding the name after the new command

> node cli.js new My Task Title

Find all non-completed to-dos and mark them completed

> node cli.js new mc

note: this will update the completed to true while adding today's date as the date completed

[
  {
    "name": "Example Task",
    "dateAdded": "2021-06-08",
    "notes": "Example Notes - things to keep in mind",
    "completed": true,
    "dateCompleted": "2021-08-08"
  }
]

View all open to-dos

> node cli.js lo

View all completed to-dos

> node cli.js lc

Help

> node cli.js help
πŸ˜€ $node cli.js help
Usage: cli [options] [command]

to-do-cli

Options:
  -V, --version     output the version number
  -h, --help        display help for command

Commands:
  new|n             Add a new task to the list
  markComplete|mc   Mark a task as completed! βœ…
  listAll|la        List all the tasks (open & completed)
  listCompleted|lc  List all of the completed tasks βœ…
  listOpen|lo       List all the open tasks ❌
  help [command]    display help for command

~/.bash_profile alias

You can add an alias to your .bash_profile and run the alias from any directory

e.g.

Get the present working directory

> pwd

copy the present working directory, open vim or any other text editor and paste it inside the bash shell alias

> vim ~/.bash_profile

alias task='node /Users/my-path-to-download/to-do-cli

Once saved, open a new terminal session and any of the commands above can be ran from any directory with the alias

e.g.

> task new my task title

About

A local storage CLI for engineering types who want to track their task without ever leaving the terminal πŸ‘©β€πŸ’» πŸ’» I built this for myself but, since I couldn't find an existing version I could use, I figured I'd share it here in case others could use it!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published