Home

Awesome

github-social-image

CLI tool that uses the GitHub API, Puppeteer and GitHub Socialify to set the social image for all of your repos automatically.

Example

Installation

npm install -g github-social-image

Usage

Authentication details can be provided in the environment or as CLI arguments

FieldEnvironment VariableCLI option
API tokenGITHUB_TOKEN--pat
UsernameGITHUB_USERNAME--username
PasswordGITHUB_PASSWORD--password
OTPGITHUB_OTP--otp
github-social-image --target "your-user-name"

Behaviour options

FlagDescription
usernameGitHub account username
passwordGitHub account password
otpOne Time Password code, required for accounts that use 2FA
patGithub API token, used to fetch a list of repos
targetUser, Org or Team to update the social image for. Will update all repos that the authenticated pat has admin access to. To specify a team, use the format org/team-slug
showShow the Puppeteer browser for debug purposes

Image related options

FlagDescriptionDefaultPossible values
themeTheme to uselightlight, dark
fontFont to useinterinter, bitter, raleway, rokkitt, source-code-pro, koho
backgroundBackground to useplussignal, charlie-brown, formal-invitation, plus, circuit-board, overlapping-hexagons, brick-wall, floating-cogs, diagonal-stripes
logoLogo to useGithub LogoAny URL that returns an image
languageShow the language icontrueN/A
ownerShow the owner in addition to the repo nametrueN/A
starsShow the number of starsfalseN/A
forksShow the number of forksfalseN/A
issuesShow the number of issuesfalseN/A
pullsShow the number of pullsfalseN/A
descriptionDescription to useN/ASpecify as --description to use the description from the repo, or `--description "Text Here" to use a custom description

FAQ

Why do you need an API token and my username?

This tool uses the API token for listing repos to update through the API, and the username to drive a browser and log in to your account to set the social image as this operation is not available through the API