Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
snipco
Copies the contents of a saved register, a file, or stdin to the clipboard, or manipulates the registry.
To install from pypi::
pip install snipco
From source, there are two ways:
If you have make
, run::
make install
Otherwise, run::
./setup.py install --user
::
snipco [-h] [-g [name_or_path]] [-s [name]] [-x [name]] [-l] [-p [name]] [-f [path]] [-t [text]] [-v]
::
snipco [-h] [-g [name_or_path]] [-s [name]] [-x [name]] [-l]
[-p [name]] [-f [path]] [-v]
For command-line help, just run::
snipco --help
All arguments are optional; if no arguments are provided, then snipco will copy the contents of stdin to the clipboard. If --file or --text is the sole argument given, then the contents of the file or quoted text, respectively, will be copied to the clipboard.
+---------------------------+--------------------------------------------------------------------+ | -h, --help | show help and exit | +---------------------------+--------------------------------------------------------------------+ | -g [name_or_path], | Copy the contents of the saved register. The named | | --get [name_or_path] | key must exist. | +---------------------------+--------------------------------------------------------------------+ | -s [register_name], | Save the input to a named register. | | --set [register_name] | Uses stdin as input unless either --file or --text is | | | specified. | +---------------------------+--------------------------------------------------------------------+ | -f [path], --file [path] | Specify a file to use instead of stdin for --set. If no other | | | arguments are supplied, copies the contents of the given file | | | directly to the clipboard. | +---------------------------+--------------------------------------------------------------------+ | -t "text to save", | Specify quote-delimited text on the command-line instead of stdin. | | --text "text to save" | If no other arguments are supplied, copies the text directly to | | | the clipboard. | +---------------------------+--------------------------------------------------------------------+ | -l, --list | List the existing registers | +---------------------------+--------------------------------------------------------------------+ | -p [name], --print [name] | Print the contents of the named register. The registry key must | | | exist. | +---------------------------+--------------------------------------------------------------------+ | -x [register_name], | Unset the named register. | | --unset [register_name] | | +---------------------------+--------------------------------------------------------------------+ | -v, --version | show program's version number and exit | +---------------------------+--------------------------------------------------------------------+
Save text from a file dirctly to the clipboard::
snipco --file path/to/file.txt
or::
cat path/to/file.txt | snipco
Save text to a named register::
snipco --set myregister --text "Hello, world!"
Copy text from the register to the clipboard::
snipco --get myregister
Print text in the register to stdout::
snipco --print myregister
Unset the register::
snipco --unset myregister
List the registers you've saved::
snipco --list
FAQs
A command-line clipboard utility and snippet catalog
We found that snipco demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.