Skip to content

About

Generate beautiful GitHub profile READMEs from the command line. Fetches your repos, aggregates stats, and outputs clean Markdown.

Topics

Resources

Code of conduct

Contributing

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

gh-profile

Generate a slick GitHub profile README from your public activity.

CI License: MIT

What's this?

I got tired of manually updating my GitHub profile README every time I worked on something new.
So I built this CLI to do it for me.

It pulls your public GitHub data (repos, languages, stats) and generates a beautiful Markdown file you can drop straight into your profile repository.

Features

  • Fetches your public GitHub data (repos, stars, languages, etc.)
  • Supports multiple beautiful templates
  • Runs completely locally β€” no data leaves your machine
  • Customizable via config file
  • CLI-first experience with great error messages
  • Extensible via plugins (see below)

Plugin Development

See docs/plugins.md for:

  • Plugin structure and lifecycle
  • Data contracts
  • Common pitfalls
  • Minimal working example

Minimal Plugin Example

import type { Plugin } from './src/plugins/types.js';
import type { NormalizedData } from './src/core/normalize.js';

export const minimalPlugin: Plugin = {
  metadata: {
    id: 'minimal-example',
    name: 'Minimal Example',
    description: 'Adds a simple greeting section',
    version: '1.0.0',
    author: 'Your Name',
  },
  render: async (content: string, data: NormalizedData): Promise<string> => {
    const greeting = `\n## Hello ${data.profile.name}!\n\n`;
    return content + greeting;
  },
};

Enable/disable plugins via CLI or config:

gh-profile generate --enable-plugin minimal-example
gh-profile generate --disable-plugin stats

Or in your config file:

{
  "plugins": {
    "minimal-example": true,
    "stats": false
  }
}

What it won't do

  • Access private repos (unless you explicitly provide a token)
  • Push anything to GitHub for you
  • Collect telemetry or send data anywhere

Privacy

Everything runs locally on your machine.
No tracking, no analytics, no phoning home.

Your GitHub token (if provided) is only used to call GitHub's API β€” never stored or transmitted.

Installation

# Clone the repo
git clone https://github.com/Xclusive09/gh-profile.git
cd gh-profile

# Install dependencies
pnpm install

# Build the CLI
pnpm build

# Link globally (run once)
pnpm link --global

# Optional: run setup script (first time only)
pnpm setup
# then restart your terminal          # first time only, then restart terminal

Usage

# generate README for a GitHub user
gh-profile generate <username>

# Specific template
gh-profile generate <username> --template showcase
gh-profile generate <username> --template stats-heavy

# Force overwrite existing file
gh-profile generate <username> --force

# save to a specific file
gh-profile generate <username> --output ./profile-readme.md

# use a GitHub token for better rate limits
gh-profile generate <username> --token <your-token>

# or set it as an env variable
export GITHUB_TOKEN=<your-token>
gh-profile generate <username>

# force overwrite existing file
gh-profile generate <username> --force

Custom Templates

Want to create your own template? Check out our Template Documentation to learn how to:

  • Structure your template files
  • Define template metadata
  • Implement the render function
  • Access normalized GitHub data

Our template system ensures consistent data access while giving you complete control over the output format.

Options

Flag What it does
generate <username> Generate README for a user
-t, --template <name> Pick a template (default: default)
-o, --output <path> Where to save it (default: ./README.md)
--token <token> GitHub token for API access
-f, --force Overwrite existing file
--help Show help
--version Show version

Example output

Running gh-profile generate octocat generates something like:

# Hi, I'm The Octocat πŸ‘‹

## About

- πŸ“ San Francisco

## Stats

| Metric | Count |
|--------|-------|
| Public Repos | 8 |
| Total Stars | 420 |
| Total Forks | 120 |
| Followers | 9500 |
| Following | 9 |

## Languages

- **Ruby**: 3 repos (38%)
- **JavaScript**: 2 repos (25%)

## Top Repositories

### [hello-world](https://github.com/octocat/hello-world)
My first repository on GitHub!

⭐ 2500 β€’ 🍴 800

---

πŸ“« Find me on [GitHub](https://github.com/octocat)

Dev setup

pnpm install
pnpm dev        # watch mode
pnpm build      # compile
pnpm test       # run tests
pnpm lint       # check code
pnpm format     # format code

Project layout

gh-profile/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/           # command handling
β”‚   β”œβ”€β”€ github/        # API stuff
β”‚   β”œβ”€β”€ core/          # data processing
β”‚   β”œβ”€β”€ templates/     # README templates
β”‚   └── output/        # file writing
β”œβ”€β”€ tests/
└── dist/

Coming Next: Web UI (v2.0.0)

We're building a beautiful web interface so non-CLI users can:

  • Paste any GitHub profile URL
  • Visually toggle plugins & templates
  • See live README preview
  • Export or sync directly to GitHub

Want to help build it? Check the v2.0.0 Web UI milestone and the Roadmap. All skill levels welcome β€” especially folks learning web dev!

Contributing

PRs welcome. Check out CONTRIBUTING.md first.

License

MIT β€” do whatever you want with it. See LICENSE.

About

Generate beautiful GitHub profile READMEs from the command line. Fetches your repos, aggregates stats, and outputs clean Markdown.

Topics

Resources

Code of conduct

Contributing

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages