Todo List CLI by Steve
Command-line based task list
Challenge
·
DevChallenge
DevChallenge allows you to evolve your skills as a programmer! Join our community o/
Your challenge is to create a command-line interface that allows you to maintain a task list with pending and done activities!
The most interesting projects created by users will be displayed at this section to serve as inspiration for other people doing this challenge. Therefore, do not only fulfill the requirements, take your project to the next level.
- Task Master CLI (JavaScript and Node.js) by Steve.
The following requirements should be implemented in a command-line interface. This CLI should be controlled by using commands (including subcommands and arguments), a menu with options or other creative methods.
- [optional] If you decide to use commands keep in mind that they have to be an explicit action, while arguments use a dash (
-a
or--argument
) and are responsible for modifying a command's behavior. Example:
task <subcommand> # Accepts add, complete, delete, list and next as subcommands
task add <description> [-p <priority>] # Adds a pending task. Can set the task's priority to low, normal or high with the -p (or --priority) option
task complete <id> # Marks a task as done
task delete <id> # Deletes a task
task list [-a] # Shows pending tasks. The -a (or --all) option shows all tasks
task next # Shows the next task of each priority
-
[add task] : It should be possible to register a new task.
A task must have a unique id, a description, a creation date, a status (shows if a task is pending or done) and a priority (high, normal or low). Example:
{ id: 1, description: 'Buy 6 eggs', created: 2021-04-01T20:54:19.410Z, status: 'pending', priority: 'high' };
-
[mark task as done] : Should be able to update a task's status to done.
-
[delete task] : Should be able to delete a task by providing its corresponding id.
-
[list tasks] : Should be able to list the tasks with status that isn't done.
Instead of showing the creation date of each task, that property should be substituted by a new property that displays how long ago the task was created (1 month). Example:
[{ id: 1, description: 'Buy 6 eggs', age: 22 hours, status: 'pending', priority: 'high' }]
-
[list all tasks] : Should be able to list all tasks, including those with status done.
Instead of showing the creation date of each task, that property should be substituted by a new property that displays how long ago the task was created (1 month).
-
[list next tasks] : Should be able to list a task from each priority. In other words, a high priority task, a normal priority task and a low priority task, if they exist. The listed task of each priority with be the oldest from its group.
Instead of showing the creation date of each task, that property should be substituted by a new property that displays how long ago the task was created (1 month).
-
[local file or database] : Should be able to persist data so it isn't lost after the CLI finishes execution.
- Any technology that you prefer! But, we have some suggestions. :)
Commander.js : tool for creating command-line interfaces that allow the usage of commands, arguments and flags.
Inquirer.js : allows us to create more interactive command-line interfaces. So it can ask questions, display checklists and hide password input.
Chalk : allows us to style command-line interfaces.
TTY Table : makes it easier to create and display tables in command-line interfaces.
Other options: Vorpal.js, Caporal.js, Yargs.js, Glue Gun, Seeli.js, Figlet.js, Oclif, Meow, Color.js, CLI Table 3, Progressbar, Clui.js, Enquirer.
Suggest Java tools at our Discussions section.
Suggest PHP tools at our Discussions section.
Suggest Python tools at our Discussions section.
1 - Use this template (click at Use this template) or fork this repository with the instruction
2 - Read the instructions at README.md
3 - Start to code! Feel free to use the workflow that is the most confortable for you.
4 - Share your results with the community! Use the following hashtag: #devchallenge
Start you project using this template in your GitHub as a public repository
Capture a screenshot, GIF or video share the results with #devchallenge or tagging our account @devchallenge!
Challenge created by Steve :)
Website: https://www.devchallenge.com.br/
Discord: https://discord.gg/yvYXhGj
LinkedIn: https://www.linkedin.com/company/devchallenge/
Twitter: https://twitter.com/dev_challenge
Instagram: https://www.instagram.com/devchallenge/