You can still use the codebase as reference, but I've decided to stop working on this project. Probably will someday came up with something new, as was using snippetto for couple of years, and it was handy couple of times.
Simple CLI to handle Snipetto Service for storing code snippets.
- Snippetto CLI allows you to create snippets directly from files in terminal.
- Snippetto by default makes your snippets available only for you.
pip3 install snippetto-cli
| Build | Status |
|---|---|
| CircleCI |
At the beginning you will be asked to setup your account, I only need username and a password to make this work. Follow the instructions on terminal.
Note use --help if you are not sure how command work.
-
Add snippet - allow to add new snippet
snippetto add --slug myfirstsnippet --tags=click,python --desc "example add for README" --file setup.py
You can also specify --start and --end to tell which fragment of the file
should be used as a snippet.
-
List snippets
snippetto list
Here you can use --skip-snippet do make a quick overview.
-
Search snippets
snippetto search --slug myfirstsnippet snippetto search --slug myfirstsnippet --tags python snippetto search --tags python,click
Search works on two parameters: slug or tags or both
Tags filter is OR-like - you will get all snippets with python or click
tags;
-
Edit snippet
snippetto edit myfirstsnippet --desc "New description"
Following fields can be edited: tags, description, file (snippet)
-
Get snippet
snippetto get myfirstsnippet snippetto get --snippet-only myfirstsnippet
Here interesting functionality is --snippet-only, this way you can redirect
stream and create file with the code:
snippetto get --snippet-only myfirstsnippet > myfirstsnippet.py
-
Delete snippet - will remove snippet from you collection.
snippetto delete myfirstsnippet -
List tags - will list all tags collected in system.
snippetto tags list
Snippetto CLI is build based on:
Working only with python3