How to use the FUNDING.yml generator
- In GitHub Sponsors usernames, type your GitHub account name, or several names separated by commas. A leading @ is removed.
- Fill in any platforms you use: Patreon username, Open Collective slug, Ko-fi username, Liberapay username, Buy Me a Coffee username, Polar username, Tidelift package (as
platform/package), thanks.dev (asu/gh/USERNAME), IssueHunt username or LFX Mentorship project. - Put other links, such as a PayPal.me page, in Custom URLs (up to 4), one per line.
- Copy the YAML or download it, and save it as
.github/FUNDING.yml.
What it does and when to use it
Open-source maintainers often have a donation page that visitors never find. A FUNDING.yml file adds a Sponsor button to the repository header, and the dialog lists every platform in the file. It costs nothing, takes a minute, and works whether or not you use GitHub Sponsors itself.
Mention the same links in your project’s documentation too: the README generator has room for them. If people should know how to help with code rather than money, add a guide from the CONTRIBUTING.md generator; the license generator covers the remaining file a public project needs.
How it works
Empty fields are skipped. One GitHub name is written as a plain value and several as a YAML list. Values that YAML could misread, such as URLs with a colon, are wrapped in double quotes. More than four custom URLs are cut back to four with a warning. If every field is empty, the tool says “Add at least one platform.”
The key names (ko_fi, open_collective, buy_me_a_coffee and so on) are the ones listed in GitHub’s sponsor button documentation.
Worked examples
The sample values:
github: asharao
ko_fi: asharao
custom: "https://www.paypal.me/asharao"
Two maintainers. GitHub asha, ravi, other fields cleared, gives github: [asha, ravi].
No GitHub Sponsors. Patreon teatools, Open Collective tea-tools and Tidelift npm/tea-tools give three lines in that order, ending with tidelift: npm/tea-tools.
Too many links. Five custom URLs produce a list of the first four and the warning “GitHub accepts up to four custom URLs; extra ones are ignored.”
Limits and tips
- The tool does not check that the accounts exist. Click each link in the Sponsor dialog after you commit.
- GitHub Sponsors names must belong to accounts that have joined the program, or that entry will not work.
- The file only adds links. Payments, tiers and tax forms are handled on each platform.
Frequently asked questions
Where does the file go?
Do I need a GitHub Sponsors account to use this?
Can I list several GitHub accounts?
Should I write my username or a full profile link?
Can I add a sponsor button to every repository at once?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.