{"id":21224079,"url":"https://github.com/kodie/giph","last_synced_at":"2025-07-10T14:31:17.685Z","repository":{"id":46155438,"uuid":"103425758","full_name":"kodie/giph","owner":"kodie","description":"A small node module/command line interface tool that fetches a random GIF from Giphy.","archived":false,"fork":false,"pushed_at":"2023-01-06T19:54:54.000Z","size":1682,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T18:00:30.965Z","etag":null,"topics":["cli","cmd","gif","giphy","image","javascript","nodejs","npm","picture","random","rnd","terminal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kodie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-13T16:48:45.000Z","updated_at":"2021-11-10T17:12:28.000Z","dependencies_parsed_at":"2023-02-06T08:30:44.734Z","dependency_job_id":null,"html_url":"https://github.com/kodie/giph","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodie%2Fgiph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodie%2Fgiph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodie%2Fgiph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodie%2Fgiph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kodie","download_url":"https://codeload.github.com/kodie/giph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225640772,"owners_count":17501018,"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":["cli","cmd","gif","giphy","image","javascript","nodejs","npm","picture","random","rnd","terminal"],"created_at":"2024-11-20T22:54:56.962Z","updated_at":"2024-11-20T22:54:57.533Z","avatar_url":"https://github.com/kodie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# giph\n[![npm package version](https://img.shields.io/npm/v/giph.svg?style=flat-square)](https://www.npmjs.com/package/giph) [![Travis build status](https://img.shields.io/travis/kodie/giph.svg?style=flat-square)](https://travis-ci.org/kodie/giph) [![npm package downloads](https://img.shields.io/npm/dt/giph.svg?style=flat-square)](https://www.npmjs.com/package/giph) [![index.js file size](https://img.shields.io/github/size/kodie/giph/index.js.svg?style=flat-square)](index.js) [![code style](https://img.shields.io/badge/code_style-standard-yellow.svg?style=flat-square)](https://github.com/standard/standard) [![license](https://img.shields.io/github/license/kodie/giph.svg?style=flat-square)](LICENSE.md)\n\n![](/media/preview.gif?raw=true)\n\nA small node module/command line interface tool that fetches a random GIF from [Giphy](https://giphy.com).\n\n## Installation/Usage\n\n### CLI\n\n```shell\nnpm install --global giph\n```\n\n```shell\ngiph \u003ckeywords\u003e [--rating=r --file=~/Desktop/giph.gif --key=API_KEY --details --nodisplay --nocopy]\n```\n\nThe CLI tool will attempt to display the GIF in the terminal (currently only supported by [iTerm2 v3.0 or higher](https://iterm2.com)) and copy the URL to your clipboard.\n\n### Node\n```shell\nnpm install --save giph\n```\n\n```javascript\nconst giph = require('giph')\n\n// Promises\ngiph(keywords, options)\n  .then(img =\u003e {\n    console.log(img)\n  })\n  .catch(err =\u003e {\n    console.error(err)\n  })\n\n// Callback\ngiph(keywords, options, (err, img) =\u003e {\n  if (err) {\n    console.error(err)\n  } else {\n    console.log(img)\n  }\n})\n```\n\n## Options\n* **buffer** - Set to true to also return the image as a buffer. (Defaults to false)\n* **file** - File path to save the gif to. (Defaults to blank)\n* **key** - Giphy API key. (Just in case you would like to use your own) (Defaults to blank)\n* **rating** - Rating to limit the gif to (y, g, pg, pg-13, or r). (Defaults to blank)\n\n### CLI Only\n* **--details** - Display the details returned from the API in the terminal.\n* **--nocopy** - Don't copy the gif URL to the clipboard.\n* **--nodisplay** - Don't display the gif in the terminal.\n\n## License\nMIT. See the [License file](LICENSE.md) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodie%2Fgiph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkodie%2Fgiph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodie%2Fgiph/lists"}