A dynamic, serverless function that generates a Neofetch-style stats card for your GitHub profile. Display your stats in a visually appealing terminal-like image, perfect for your README.md.
- Dynamic Stats: Automatically fetches your latest GitHub stats.
- Neofetch Look: Renders stats and your avatar as ASCII art inside a terminal-style SVG image.
- Customizable: Offers different themes and allows for custom images.
- Serverless: Deployed on Vercel for high availability and performance.
The project is organized as follows:
gitfetch/
├── api/
│   └── index.js             # Main API Handler
├── utils/
│   ├── github.js            # Fetches data from GitHub
│   ├── imageToAscii.js      # Converts images to ASCII
│   └── renderer.js          # Renders the final SVG with ASCII and stats
├── package.json             # Project dependencies and scripts
└── vercel.json              # Vercel deployment configuration
You can deploy your own instance of GitFetch or use the public one.
To add the GitFetch card to your README.md, simply copy the following Markdown code and replace your-github-user with your GitHub username.
You can customize the card's appearance with URL parameters:
- 
theme:lightordefault: Use the theme parameter to change the look....&theme=light 
- 
image_url: Use image_url to replace your avatar with a custom image....&image_url=[https://your-image-path.png](https://your-image-path.png) 
- 
Informations: Add information that is not in the GitHub API. - country(Ex.: Brazil)
- state(Ex.: Sao Paulo)
- since(Ex.: 1993)
- timezone(Ex.: UTC-03)
- portfolio(Ex.: My page)
- distros(Ex.: Manjaro, Fedora)
- like(Ex.: Virtualization)
- role(Ex.: Cloud/DevOps/SRE)
 
- 
Example of URL https://gitfetch-flax.vercel.app/api?username=jeanrodrigop&country=Brazil&state=Sao%20Paulo&since=1993&timezone=UTC-03&portfolio=Github&distros=Manjaro,%20Fedora&like=Virtualization&role=Cloud/DevOps/SRE
- 
To use in your README  
To run this project on your local machine for development or testing, follow these steps.
First, ensure you have the necessary system dependencies installed. For Debian/Ubuntu-based systems:
sudo apt-get update
sudo apt-get install -y nodejs npm build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-devYou will also need the Vercel CLI:
npm i -g vercelClone the repository and install the Node.js dependencies:
git clone https://github.com/jeanrodrigop/gitfetch.git
cd gitfetch
npm installStart the local development server using the Vercel CLI:
vercel devThe server will typically start at http://localhost:3000. You can now test it by opening the following URL in your browser:
http://localhost:3000/api?username=your-github-user