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 🙏

© 2024 – Pkg Stats / Ryan Hefner

turners-cli-tavares

v1.1.1

Published

Mission Ready - Mission 4 - Tavares => Turners CLI This project is part of my studies on Mission Ready. It is a CLI to manage and handle a database. The CLI has to be used on a frontend query to give alternatives/similars cars prompted that are in our dat

Downloads

9

Readme

Mission Ready - Mission 4 CLI

Data Management: Develop a command-line interface (CLI) tool to seed data into your local MongoDB database or delete data from it. Ensure that this tool is source-controlled and includes the seed data. Team members should be able to seed data by cloning the repository.

About

This project is part of my studies on Mission Ready. It is a CLI to manage and handle a database. The CLI has to be used on a frontend query to give alternatives/similars cars prompted that are in our database."

IMPORTANT => For learning purposes, I am using a local mongoDB database.

Install

If you're using any recent version of NPM you can install locally and run commands with npx

npm install turners-cli-tavares

Optionally, you can install globally and there's no need to use npx

npm install turners-cli-tabares -g

Commands and Usage

Basics

The way to access the CLI is:

npx turners-cli | npx tcli

For info and list of commands:

npx turners-cli --help | npx tcli -h

Any of the following command with the flag of -h will give more details on the command

npx tcli d -h
npx tcli a -h
npx tcli cl -
...

For now there's a dev command to help me test and reset my db to a clean point. This command will add 50 cars entries to the DB.

npx turners-cli hard-reset | npx tcli hr

Search / Query

To log a list of the cars on the db on a table format:

npx turners-cli cars-list | npx tcli cl

To log a list of cars on the db as Javascript Objects / JSON:

npx turners-cli cars-obj-list | npx tcli col

To search for cars: This command MUST have a arg of type passed. It'll choose if you want to search it by ID or model/name. The way it works is through a mongoose search. It'll aske you to pass a query or an id depending on which flag you pass.

npx turners-cli search <type> | npx tcli s <type> id | model

Add to DB

To add a single entry manually:

npx turners-cli add-car | npx tcli a

Delete from DB

To delete a single entry manually: This command MUST have a arg of type passed. It'll choose if you want to delete it by ID or model/name. The way it works is through a mongoose search. It'll aske you to pass a query or an id depending on which flag you pass. In case of multiple entries for the model flag you'll get a list of the duplicates logged and be asked to pick the id of the one you want to delete.

npx turners-cli delete-car | npx tcli d <type> id | model

Try

npx tcli d -t model
npx tcli d -t id