{"id":13479316,"url":"https://github.com/weakish/gister","last_synced_at":"2025-04-09T23:16:52.931Z","repository":{"id":10640135,"uuid":"12866540","full_name":"weakish/gister","owner":"weakish","description":"command line tool to sync github gists","archived":false,"fork":false,"pushed_at":"2024-01-23T13:57:47.000Z","size":131,"stargazers_count":198,"open_issues_count":2,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T23:16:48.151Z","etag":null,"topics":["command-line-tool","gist","github","sh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weakish.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-16T12:18:52.000Z","updated_at":"2025-03-25T07:10:35.000Z","dependencies_parsed_at":"2024-10-30T12:44:45.522Z","dependency_job_id":null,"html_url":"https://github.com/weakish/gister","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fgister","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fgister/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fgister/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weakish%2Fgister/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weakish","download_url":"https://codeload.github.com/weakish/gister/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","gist","github","sh"],"created_at":"2024-07-31T16:02:13.504Z","updated_at":"2025-04-09T23:16:52.909Z","avatar_url":"https://github.com/weakish.png","language":"Shell","readme":"gister\n======\n\n`gister` is a command line tool for managing GitHub gists.\n\nBased on [gist.rb][gist] by [@defunkt][defunkt], this tool helps you to manage a local copy of your gists.\n\nAfter publishing files to gist.github.com, this tool will:\n\n- automatically clone the gist repository to local\n- index the content of your gist for code search\n- fetch meta info (e.g. description, url) of the gist from GitHub and add them to `gists.list`.\n\n[gist]: https://github.com/defunkt/gist\n[defunkt]: https://github.com/defunkt\n\nYou can also use `gister` to sync your gists (created and starred)\nbetween gist.github.com and your machine.\n\nDependencies\n------------\n\n- curl\n- git\n- [gist.rb][gist]\n- [jq](http://stedolan.github.io/jq/)\n\nFor Linux, BSD, etc, you also need `xclip` or `xsel`.\nFor Cygwin, you need putclip/getclip provided by cygutils-extra.\n(Mas OS X users should be fine with the preinstalled pbcopy/pbpaste.)\n\nMac OS X users also need GNU versions of `sed` and `date`, a.k.a `gsed` and\n`gdate`.\n\nNote: `xsel` users should use `gist.rb` v4.1.2+, since there is [a bug bitting xsel users in previous versions][151].\n\n[151]: https://github.com/defunkt/gist/pull/151\n\n### Optional Dependencies\n\n- [csearch](https://github.com/google/codesearch)\n\n    To search gists on your local machine.\n    If not available, fallbacks to `grep`.\n\n- [legit](https://github.com/kennethreitz/legit)\n\n    If available, invokes `legit sync` to sync gist repository.\n    Legit will stash, fetch, rebase/merge, push, and unstash if necessary.\n\n    The `develop` branch of legit allows configuration for merge policy:\n\n        * The default smart merge (rebase when suitable)\n        * Always merge, never rebase (since [21bb7ed])\n        * Always rebase, never merge (since [252b1eb])\n        * Fast forward merge only (since [4782928])\n\n    If legit is not available,\n    gister will report dirty gist repositories (`DIRTY $gist_id`)\n    when the environment variable `GISTER_AUTO_COMMIT` does not exist,\n    and will commit files automatically when `GISTER_AUTO_COMMIT` exists.\n\n[21bb7ed]: https://github.com/kennethreitz/legit/commit/21bb7edd081f9e47abec9b970b32f2814104d298\n[252b1eb]: https://github.com/kennethreitz/legit/commit/252b1eb2cd1c0a8f223fa8022ed37752bd5d6cec\n[4782928]: https://github.com/kennethreitz/legit/commit/478292899831c1da478490970bc5d4f66d117510\n\nInstall\n-------\n\nNote that the following instructions only install gister itself.\nYou need to install its dependencies mentioned before yourself.\n\n    git clone https://github.com/weakish/gister.git\n    cd gister\n    make install\n\nBy default gister will be installed into `/usr/local/bin/gister`.\nChange `PREFIX` to install r3c to another directory.\nFor example:\n\n```sh\nmake PREFIX=~/.local install\n```\n\nThe Makefile is compatible with both GNU and BSD make.\n\nTo uninstall:\n\n```sh\n; cd gister\n; make uninstall\n```\n\nIf you have changed the `PREFIX` variable when installing, you need to use the same value when uninstalling.\nFor example:\n\n```sh\nmake PREFIX=~/.local uninstall\n```\n\nYou can also install/uninstall gister via [basher].\n\n[basher]: https://github.com/basherpm/basher\n\nUsage\n-----\n\n### init\n\nFor the first time, you need to run `gister init` to associate your GitHub account and configure the directory to store local copies of your gists.\n\nAfter that, you may run `gister sync` to fetch all your gists (created and starred) to local.\n\nWarn: `sync` can only fetch up to 10 million gists for you. If you have more than 10 million gists, you need to modify the source of `gister` to lift the limit.\n\n### Configuration\n\n`GISTER_USE_HTTPS`: If you need to use https for some reason, set the env var `GISTER_USE_HTTPS`, but please note this isn't necessarily more secure than ssh, it's just a different option in case your network blocks all traffic other than http/s.\n\n`GISTER_AUTO_COMMIT`: If you'd like the `sync` command to automatically commit any local changes you've made before pulling and pushing to gist.github.com, set the `GISTER_AUTO_COMMIT` env var to anything.\n\n### publish\n\nWhenever you want to publish a gist, just use\n\n    gister description file.txt ...\n\nThis will create the gist with the provided description, clone the gist repo, and put the gistid to clipborad.\n\nNote: you must provide gist description, otherwise `gister` will fail.\n\nHint: `gister` will pass all arguments to gist as `gist -c -o -d description ...`, so you can use other options that gist understands, e.g. `gister description -P` will work.\n\nIf you've edited your gists at `gist.github.com` or local machine, without pull/push changesets, you can sync all your gists via `gister sync`.\n\nIf you've deleted your gists at `gist.github.com`, after `gister sync`, the directories of deleted gists at your local machine will be marked with a prefix `_`.\n\n### search\n\nSearch all of your gists:\n\n    gister search regexp\n\nIf `codesearch` is installed, `regexp` is RE2 (nearly PCRE).\nOtherwise it is ERE, a.k.a `grep -E`.\n\n### export\n\nExport a gist (available at local) to a git repository,\nwith its full history:\n\n```sh\n; cd git-repo-root\n; gister export gist_id sub_directory_name branch_name\n```\n\nThe content of the gist will be exported to `sub_directory_name`,\nand the merging message will use `branch_name`.\n\n### migrate\n\nFrom version 1.0.0, `gister` uses a different storage structure.\nIf you have used `gister \u003c1.0.0`, then you need to run this command to migrate:\n\n    gister migrate\n\n\nStorage\n-------\n\n    /path/to/your/gists\n    |-- gists.list  # a list of all your gists (including meta info)\n    |-- repo # git repositories of your gists\n    |-- tree # working directory of your gist repositories\n        |-- 123456 # an example of gist\n        |-- _123567890 # an example of gist which you have deleted on gist.github.com\n        |-- ...\n    `-- .csearchindex # code search index (optional)\n\n\nContributing\n------------\n\nSend pull requests or issues at:\n\nhttps://github.com/weakish/gister\n\n### Tips\n\nSetting environment variable `GISTER_DEBUG` to `true` (or any non-empty string) will enable debug mode (`set -x`).\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fgister","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweakish%2Fgister","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweakish%2Fgister/lists"}