A modern, minimal Next.js app for managing your GitHub Gists locally with a beautiful UI, built for Cloudflare Pages deployment.
β οΈ Suggestion: This project is for local use and experimentation. I advise you not to deploy it on the public Internetβjust play with it on your local machine. :)
This project is designed for local experimentation. To use it securely and effectively, please follow these best practices:
-
Create a New Personal Access Token (Classic) with Least Privilege
Generate your GitHub token at https://github.com/settings/tokens/new by selecting Personal Access Tokens (classic).- Give it a descriptive name.
- Set an expiration date to enhance security.
- Select only the
gist
checkbox with "Create gists" permission to follow the principle of least privilege. - Copy the token; you wonβt be able to see it again after leaving the page.
-
Do Not Store Credentials or Sensitive Data in Your Gists
Avoid placing any personal credentials, tokens, or sensitive information inside your gists to prevent accidental exposure. -
Use the App Locally and Avoid Public Deployment
Since the app manages your GitHub token, it is safer to run it locally or on trusted private environments like Cloudflare Pages with proper environment variable configurations. -
Manage Your Token Securely
Use the appβs token management feature to set or clear your token as needed. Never commit your token to version control or share it publicly.
By adhering to these practices, you minimize security risks and ensure a smooth, secure experience managing your GitHub Gists locally.
Feature | Description |
---|---|
ποΈ Gist List | View all your GitHub Gists in a clean, sortable list |
π Multi-file Support | See all files in a gist by default, with syntax highlighting |
π Create/Edit/Delete | Full CRUD for your Gists (with GitHub token) |
π Token Management | Easily set or clear your GitHub token from the header |
π‘ Codebase Tutorial | Quick access to a codebase walkthrough with a single click |
π¨ Modern UI | Responsive, accessible, and visually appealing design |
βοΈ Cloudflare Ready (Optional) | Optimized for Cloudflare Pages, no Node.js built-in dependencies required |
# Install dependencies
npm i
# Run locally
npm run dev
# Build for Cloudflare Pages
npm run build && npx @cloudflare/next-on-pages
Reminder:
- In Cloudflare Pages, set the environment variable
NODE_VERSION
to at least18.18.0
.- Set Compatibility flags:
nodejs_compat
.
To run this app using Docker, use the following command:
docker run -d -p 3000:3000 paulkit41/local-gist-manager
- The app will be available at http://localhost:3000.
- Optionally, you can add your GitHub token as an environment variable:
docker run -d -p 3000:3000 -e NEXT_PUBLIC_GITHUB_TOKEN=your_github_token paulkit41/local-gist-manager
- Uses a GitHub personal access token (PAT) for gist management.
- Token can be set/cleared from the header at any time.
- Fork this repo / Download files manually.
- Connect the repo to Cloudflare Pages / Use direct upload.
- Set build command:
npm run build && npx @cloudflare/next-on-pages
- Set output directory:
.vercel/output/static
MIT