A Github gists cli tool
# Lists out gist json response
gist list
# Create new gist from STDIN
gist new
# Filename: helloworld.c
# Contents:
# int main () {
# puts("Hello World!");
# }
# Description: Hello world c example
# Make Private? [y/n]: n
# Create new gist from cli arguments
gist create -f "filename" -d "desc" -p # Create private gist
# Delete gists with matching id
gist delete -i "[id]"
# or by matching file name
gist delete name -f asdf
# or by date timestamps
gist delete date -c "2022-08-23T21:37:26Z" -t exact # Choices: [exact, before, after]
# Update gist information
gist update -i "[id]" -f aaaa -d "Revised Description"
gist update -i "[id]" -f aaaa -n asdf # Rename gist file name to asdf
# Search gists for matching id
gist search id -i "[id]"
# or by file name
gist search name -f asdf
# or by date
gist search date -c "2022-08-23T21:37:26Z" -t after
For more information, see gist -h
To build with ninja
:
cmake --preset gcc-release-ninja
cd build/gcc-release-ninja
ninja
To build with make
:
cmake --preset gcc-release-unix-makefiles
cd build/gcc-release-unix-makefiles
make
To install to /usr/local/
:
sudo cmake --install .
If you want to install to /usr
instead:
sudo cmake --install --prefix /usr
To uninstall:
cmake uninstall .
sudo make uninstall
# or
sudo ninja uninstall
If you want to use a different file/path for configuring gist, either:
- Set the
GIST_CONFIG_HOME
variable to your config file path. - Use the
-g
option and specify the full path to your config.
An example config file is provided in the repository.
Contributions are welcome. Feel free to use the issues page to report issues, or suggest features.
More potential features that would make this application really killer:
- CLI option to receive gist content as output.
- Manpage to view arguments/options and commands.
- Doctest unit tests & automated testing.
- Automated releases