Skip to content

A simple CLI tool for managing code snippets. This package allows developers to store, categorize, and retrieve code snippets easily, enhancing productivity and organization.

Notifications You must be signed in to change notification settings

mrzstack/jmrashed-code-snippet-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jmrashed-code-snippet-manager

A simple CLI tool for managing code snippets. This package allows developers to store, categorize, and retrieve code snippets easily, enhancing productivity and organization.

Features

  • Add Snippet: Quickly add new code snippets with associated tags.
  • List Snippets: View all stored snippets in a neatly formatted list.
  • Delete Snippet: Remove snippets by their index.
  • Tagging: Organize snippets with tags for easy retrieval.

Installation

To install jmrashed-code-snippet-manager, use npm:

npm install -g jmrashed-code-snippet-manager

Note: The -g flag installs the package globally, allowing you to use the CLI from anywhere in your terminal.

Usage

After installation, you can start managing your code snippets by running the following command:

jmrashed-code-snippet-manager

Commands

  1. Add Snippet: You will be prompted to enter the code snippet and its tags (comma-separated).
  2. List Snippets: Displays all your snippets with their respective tags.
  3. Delete Snippet: Prompts for the snippet number you wish to delete.

Example

Here’s an example of how you might use the tool:

  1. Start the CLI tool:

    jmrashed-code-snippet-manager
  2. Choose Add Snippet from the menu and enter:

    • Code Snippet: console.log('Hello, World!');
    • Tags: javascript, console, hello
  3. Choose List Snippets to see:

    Code Snippets:
    1. [javascript, console, hello] console.log('Hello, World!');
    
  4. Choose Delete Snippet and enter the snippet number (e.g., 1) to remove it.

File Structure

The tool creates a snippets.json file in the same directory where you run the CLI. This file will store your snippets in JSON format.

Contributing

Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

jmrashed

Feel free to reach out with any questions or suggestions!

About

A simple CLI tool for managing code snippets. This package allows developers to store, categorize, and retrieve code snippets easily, enhancing productivity and organization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published