Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nabeel-shakeel/todos-cli
A utility to track your todos from the command line
https://github.com/nabeel-shakeel/todos-cli
cli docker nodejs npx rollup todo typescript unbuild uti yarn
Last synced: 10 days ago
JSON representation
A utility to track your todos from the command line
- Host: GitHub
- URL: https://github.com/nabeel-shakeel/todos-cli
- Owner: nabeel-shakeel
- License: mit
- Created: 2024-05-18T06:17:37.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-19T10:32:01.000Z (6 months ago)
- Last Synced: 2024-10-17T22:39:29.564Z (29 days ago)
- Topics: cli, docker, nodejs, npx, rollup, todo, typescript, unbuild, uti, yarn
- Language: TypeScript
- Homepage:
- Size: 15.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Todos CLI
A command line utility that fetches and displays a specified number of todos from from the [JSONPlaceholder](https://jsonplaceholder.typicode.com/) API. It can fetch even or odd indexed todos and outputs the title and completion status in a table format.
## Working Demo
![Todos CLI Demo](./assets/td-demo.gif)## Features
- Fetches first `n` specified even number of todos, by default `20`
- Option to fetch either even or odd indexed todos, by default `even`
- Display todos in a readable table format## Prerequisites
- Node.js (>= 20.x.x)
- Docker (optional, for running in a container)## Installation
1. Clone the repository
```bash
git clone [email protected]:nabeel-shakeel/todos-cli.git
cd todos-cli
```2. Install dependencies `yarn`
3. Make a fresh build `yarn build`## Usgae
First, intsall it globally in system `npm i -g .` and then run `td`
Or use with `npx````bash
npx td -n -e|-even --no-even
```Run `npx td --help` to get details of available options
Examples
- Fetch 20 even todos `npx td`
- Fetch 40 even todos `npx td -n 40 -e`
- Fetch 10 odd todos `npx td -n 10 --no-even`## Tests
Tests are written using jest. To run the test `yarn test`
## Dockerization
Follow the below steps to build and run the docker conatiner
1. Build docker image `docker build -t todos-cli .`
2. Run docker container `docker run todos-cli -n 20`