Officially accepted for GSSoC!
| ๐ Stars | ๐ด Forks | ๐ Issues | ๐ Open PRs | ๐ Closed PRs | ๐ ๏ธ Languages | ๐ฅ Contributors |
|---|---|---|---|---|---|---|
- โจ Vision
- ๐ฏ Mission
- โ๏ธ Setup & Local Development
- ๐ Project Structure
- ๐ API Usage
- ๐งฎ Query Parameters
- ๏ฟฝ CLI Usage
- ๏ฟฝ๐ก Why GitHub Avatar Frame API?
- ๐ค Contributing
- ๐ ๏ธ Troubleshooting
- ๐ License
Democratize creative avatar customization by providing a free, open-source API that transforms GitHub profiles into engaging visual experiences for developers worldwide.
- ๐๏ธ Build the most comprehensive and user-friendly avatar framing API
- ๐ช Empower developers to personalize their GitHub presence with minimal effort
- ๐จ Foster creative expression through customizable themes, text, and emoji overlays
- ๐ Maintain a free, accessible service that supports the open-source community
A free and open-source API to frame your GitHub avatar using creative themes. Perfect for README files, portfolios, or social media.
๐ Live API: https://github-avatar-frame-api.onrender.com
Follow these steps to run the GitHub Avatar Frame API locally for development or testing:
- ๐ข Node.js 16+ and npm installed
- ๐ Git for version control
- ๐ฅ๏ธ Code editor (VS Code recommended)
- ๐ฆ Optional: TypeScript knowledge for contributing
git clone https://github.com/TechQuanta/github-avatar-frame-api.git
cd github-avatar-frame-apinpm installcd client
npm install
cd ..npm run devThe backend will start on http://localhost:3000
cd client
npm run devThe frontend will start on http://localhost:5173 (or another port if 5173 is in use)
- Open your browser and go to
http://localhost:5173 - You should see the GitHub Avatar Frames interface
- Enter a GitHub username (e.g., "torvalds")
- Select a theme and click "Generate"
- If successful, your framed avatar will appear
๐ฆ github-avatar-frame-api
โโโ ๐ฅ๏ธ api
โ โโโ ๐ FRAMETHEMES.md
โ โโโ ๐ผ๏ธ collage.js
โ โโโ ๐ผ๏ธ frames.js
โ โโโ ๐ server.ts
โ โโโ ๐จ themes.js
โโโ ๐ client
โ โโโ src
โ โ โโโ components
โ โ โ โโโ ๐งฉ ThemeSlider.jsx
โ โ โโโ pages
โ โ โ โโโ ๐ NotFound.jsx
โ โ โโโ ๐จ App.css
โ โ โโโ ๐ App.jsx
โ โ โโโ ๐จ index.css
โ โ โโโ ๐ main.jsx
โ โโโ ๐ index.html
โ โโโ โก vite.config.js
โ โโโ ๐ vercel.json
โโโ ๐ผ๏ธ public
โ โโโ assets
โ โโโ ๐ผ๏ธ gssoc.png
โโโ ๏ฟฝ cli
โ โโโ ๐ package.json
โ โโโ โ๏ธ tsconfig.json
โ โโโ ๐ src/index.ts
โโโ ๏ฟฝ๐ README.md
โโโ ๐ LICENSE
โโโ ๐ CODE_OF_CONDUCT.md
โโโ ๐ CONTRIBUTING.md
โโโ ๐ CUSTOMIZATION_FEATURE.md
โโโ ๐ TODO.md
โโโ ๐ฆ package.json
โโโ โ๏ธ render.yml
โโโ ๐ tsconfig.server.json
The GitHub Avatar Frame API comes with a command-line interface (CLI) for easy avatar generation directly from your terminal. Perfect for developers who prefer working in code editors and terminals.
Option 1: Install globally from npm
```bash npm install -g github-avatar-frame-cli ```Option 2: Use locally (from project root)
```bash # Build the CLI npm run build:clinpm run cli --
<h3 style="color:#ff4081;">๐ Usage</h3>
<p style="font-size: 1.05em;"><b>Generate an avatar:</b></p>
```bash
github-avatar-frame generate <username> [options]
Examples:
# Basic usage
github-avatar-frame generate octocat
# With custom theme and size
github-avatar-frame generate octocat --theme flamingo --size 512
# With text overlay
github-avatar-frame generate octocat --text "GitHub User" --text-color "#ff0000"
# With emojis
github-avatar-frame generate octocat --emojis "๐,๐ป,๐ฅ" --emoji-position corners
# Save to custom file
github-avatar-frame generate octocat --output my-avatar.png
# Use local API server
github-avatar-frame generate octocat --url http://localhost:3000| Option | Default | Description |
|---|---|---|
| --theme, -t | base | Frame theme (base, classic, darkmode, eternity, flamingo, gitblaze, macros, minimal, neon, ocean, starry) |
| --size, -s | 256 | Avatar size in pixels (64-1024) |
| --canvas, -c | light | Background color (light, dark) |
| --shape, -sh | circle | Avatar shape (circle, rounded) |
| --radius, -r | 25 | Corner radius for rounded shape |
| --text, -tx | none | Custom text to display |
| --text-color, -tc | #ffffff | Text color in HEX format |
| --text-size, -ts | 20 | Text size in pixels (8-100) |
| --text-position, -tp | bottom | Text position (top, bottom, center) |
| --emojis, -e | none | Comma-separated list of emojis |
| --emoji-size, -es | 40 | Emoji size in pixels (16-120) |
| --emoji-position, -ep | top | Emoji position (top, bottom, corners) |
| --output, -o | avatar.png | Output file path |
| --url, -u | https://github-avatar-frame-api.onrender.com | API base URL |
# List available themes
github-avatar-frame themes
# Show API information
github-avatar-frame info
# Show help
github-avatar-frame --helpThe CLI also supports AI-powered frame suggestions that analyze your GitHub profile and recommend the perfect theme:
# Get AI-powered frame suggestion
github-avatar-frame suggest <username>
# Example
github-avatar-frame suggest octocatThe AI analyzes:
- ๐จ Avatar colors and brightness
- ๐ Contribution activity and patterns
- ๐ฅ Follower-to-repository ratios
- ๐ Consistency of activity
And suggests themes like:
- Dark avatars โ Starry/Galaxy themes
- Professional photos โ Minimal themes
- High contributions โ Pro/Advanced themes
- Beginners โ Classic themes
- ๐ Zero Setup: No registration, API keys, or complex configurations needed
- โก Instant Results: Real-time avatar processing with customizable themes
- ๐จโ๐ป Developer-Friendly: Simple REST API with comprehensive documentation
- ๐ญ Creative Freedom: Text overlays, emojis, multiple themes, and shape options
- ๐ Open Source: Community-driven development with transparent contributions
- ๐ Always Free: No usage limits or premium tiersโbuilt for the community
๐ Base Endpoint:
https://github-avatar-frame-api.onrender.com/api/framed-avatar/{username}?theme={theme}&size={size}&canvas={canvas}&shape={shape}&radius={radius}
| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
| username | string | required | GitHub username | octocat |
| theme | string | base | Frame theme (eternity, base, flamingo) | flamingo |
| size | integer | 256 | Avatar size in px (64โ1024) | 300 |
| canvas | string | light | Background color of avatar canvas: light / dark | dark |
| shape | string | circle | Avatar shape: circle or rounded | rounded |
| radius | integer | 25 | Corner radius for rounded shape in px | 50 |
| text | string | optional | Custom text to display on avatar | Hello World |
| textColor | string | #ffffff | Color of text in HEX format | #ff0000 |
| textSize | integer | 20 | Size of text in pixels (8-100) | 24 |
| textPosition | string | bottom | Position of text: top / bottom / center | top |
| emojis | string | optional | Comma-separated list of emojis | ๐,๐ป,๐ฅ |
| emojiSize | integer | 40 | Size of emojis in pixels (16-120) | 30 |
| emojiPosition | string | top | Position of emojis: top / bottom / corners | corners |
- ๐จ canvas: Sets the avatar background color. Options:
lightordark. - ๐ท shape: Sets the avatar outline. Options:
circleorrounded. - ๐ radius: Controls corner rounding in px when
shape=rounded. 0 = square, higher = more rounded.
Combine all three to customize your avatar:
Add personalized text and emojis to make your avatar more expressive:
- ๐ text: Add custom text like your name, role, or tagline.
- ๐จ textColor: Set text color using HEX format (e.g., #ff0000 for red).
- ๐ textSize: Control text size from 8-100 pixels.
- ๐ textPosition: Place text at top, bottom, or center of the avatar.
- ๐ emojis: Add multiple emojis separated by commas (e.g., ๐,๐ป,๐ฅ).
- ๐ emojiSize: Control emoji size from 16-120 pixels.
- ๐ emojiPosition: Place emojis at top, bottom, or in corners.
๐ Example with text and emojis:
https://github-avatar-frame-api.onrender.com/api/framed-avatar/octocat?theme=base&text=GitHub%20User&textColor=%23ffffff&textSize=20&textPosition=bottom&emojis=%F0%9F%9A%80%2C%F0%9F%92%BB%2C%F0%9F%94%A5&emojiSize=30&emojiPosition=top
| Canvas | Shape | Radius | Example URL | Preview |
|---|---|---|---|---|
| light | circle | - | URL | |
| dark | circle | - | URL | |
| light | rounded | 20 | URL | |
| dark | rounded | 50 | URL |

-
For API Usage:
- Any modern web browser or HTTP client
- Valid GitHub username
- Basic understanding of URL parameters
- Node.js 16+ and npm
- TypeScript knowledge
- Git for version control
- Code editor (VS Code recommended)
For Development/Contributing:
- ๐จ Add new themes in
public/frames/ - ๐ Bug fixes
- โจ New features
- ๐ Improve documentation
- ๐ข Node.js & Express.js (TypeScript)
- ๐ผ๏ธ Sharp (image processing)
- โ๏ธ Render (hosting)
- ๐ TypeScript
- Live API: https://github-avatar-frame-api.onrender.com
- Issues: GitHub Issues
- Contributing Guidelines: CONTRIBUTING.md
- Code of Conduct: CODE_OF_CONDUCT.md
- โญ Star the repository
- ๐ Report bugs or suggest features
- ๐ค Contribute new themes
- ๐ข Share with the community
- Check if GitHub username is valid
- Verify theme name spelling (eternity, base, flamingo)
- Ensure size is between 64-1024 pixels
- API may be cold-starting (hosted on Render free tier)
- Wait 10-15 seconds for first request
- Subsequent requests will be faster
๐ง Development Issues: ๐งฐ Installation problems
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
๐ Port conflicts
๐ Check if port 3000 is in use
netstat -ano | findstr :3000
Kill process or change port in server config

