Simple and easy to use TypeScript library for interacting with GitHub Gist API.
- Use
ofetch, a better fetch API, works on node, browser and workers. - Full CRUD operations for gists
- Support for forks, stars, and commits
- Type-safe API with proper TypeScript definitions
- Authentication via GitHub access tokens
npm install geastyimport Geasty from 'geasty'
// Initialize with your GitHub access token
const geasty = new Geasty({ access_token: 'your-github-token' })
// Example: Create a gist
const newGist = await geasty.createAGist({
files: {
'hello.txt': { content: 'Hello World!' }
},
public: true,
description: 'My first gist'
})
// Example: Get all gists
const myGists = await geasty.getAllGists()You can use Geasty with or without authentication. However, to access private gists or perform write operations, you need to provide a GitHub access token. It is recommended to provide an access token, cause authenticated requests have a higher rate limit.
getAGist(gistId)getAllGists(options)getPublicGists(options)getStarredGists(options)getGistsForUser(options)
createAGist(options)deleteAGist(gistId)updateAGist(options)
getGistForks(options)forkAGist(gistId)
getGistCommits(options)getAGistRevision(options)
isGistStarred(gistId)starAGist(gistId)unstarAGist(gistId)
getRawGistFileContent(options)hasAccessToken()
Important
Check the Type Doc for detailed information.
GitHub REST API endpoints for gists
MIT License © 2025-PRESENT Moozon Wei