Skip to content

Code Snippet Manager : A CLI tool to quickly save your code snippets

License

Notifications You must be signed in to change notification settings

Aman-zishan/CSM

Repository files navigation

csm logo

CLI npm node typescript GitHub Workflow Status (with event) npm GitHub License npm

CSM is a CLI tool build in typescript to store your code snippets. Create and access your code snippets with the command line interface. Search through the saved code snippets to have a quick look.


installation

npm install -g csm-kit

Text User Interface

csm

launch the interface

csm-kit -l

Key Bindings


Action Key
Copy selected snippet to clipboard c
Delete selected snippet d
Search for snippets /
move up/down the list
select snippet enter
Go back (exit from search) esc
Quit application q ctrl+c

Command Line Interface

# help command
csm-kit -h

# save a new snippet
csm-kit -s <filepath>

# example:

csm-kit -s hello.py

# list all snippets
csm-kit -ls

# get a snippet by name
csm-kit -o <snippet_title>

## format for snippet name : binary_search_in_py should be seperated by underscore like this

# example
csm-kit -o binary_search_in_py

# delete a snippet
csm-kit -d <snippet_ID>

# example
csm-kit -d 2