Skip to content

itayd/gist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

gist bash cli

usage: gist operation [-options] [files...]

operations:
    help                - this text
    ls                  - lists files and repositories
    put                 - create/update repository
    rm                  - remove a repository
    cat                 - prints the request files into stdout
    metadata            - prints raw metadata

options:
    -h                  - this text
    -v, -vv, -vvv...    - increase verbosity
    -r <repos>          - specify repository
    -u <user>           - specify gist username
    -t <token>          - specify gist token
    -d <description>    - repository description for put command

notes:
    default username is determined with the following priority:
    1. specified by -u (HIGHEST)
    2. content of $GIST_USER
    3. content of git config gist.user
    4. `whoami` (LOWEST)

    default token is determined with the following priority:
    4. specified by -t (HIGHEST)
    2. content of $GIST_TOKEN
    3. content of git config gist.token

examples:
    $ gist put -d "a neet file" file1
    creates a new repository with files file1 and file2
    $ gist put -r 31337 -d "two neet files" file1 file2
    updates repository 31337 so that it would have file1 and file2
    $ gist ls
    lists all files in all repositories
    $ gist ls -r 31337
    lists all files in repository 3133
    $ gist ls -v
    listal all files in all repositories along with the repository description
    $ gist cat -u testuser testfile.py
    prints contents of file testfile.py (in any repository) for user testuser
    $ gist cat -r 31337 testfile.py
    prints contents of file testfile.py that is in repository 31337
    $ gist cat -r 31337
    prints contents of entrie repository 31337
    $ gist metadata
    prints metadata of gist in xml format
    $ gist metadata -r 31337
    prints metadata of repository 31337, subset of the entire user's metadata
    $ gist rm -r 31337
    remove a repository

About

gist bash cli

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published