https://github.com/jmrashed/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.
https://github.com/jmrashed/jmrashed-code-snippet-manager
cli code nodejs snippets-manager
Last synced: about 1 month ago
JSON representation
A simple CLI tool for managing code snippets. This package allows developers to store, categorize, and retrieve code snippets easily, enhancing productivity and organization.
- Host: GitHub
- URL: https://github.com/jmrashed/jmrashed-code-snippet-manager
- Owner: jmrashed
- Created: 2024-10-08T21:39:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-08T21:40:18.000Z (over 1 year ago)
- Last Synced: 2025-11-07T07:16:54.636Z (8 months ago)
- Topics: cli, code, nodejs, snippets-manager
- Language: JavaScript
- Homepage: https://rasheduzzaman.com
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
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:
```bash
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:
```bash
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](LICENSE) file for details.
## Author
**[jmrashed](https://www.npmjs.com/~jmrashed)**
Feel free to reach out with any questions or suggestions!