Open Source has always been a foundation of the Internet, and with the advent of social open source networks this is more true than ever. But free, libre, and open source projects suffer from a startling lack of diversity, with dramatically low representation by women, people of color, and other marginalized populations.
Often it is the unintentional assumptions and actions of project maintainers and participants that make open source projects unwelcoming (or even hostile) to marginalized people: making assumptions about gender or race, reinforcing stereotypes, using sexualized or otherwise inappropriate language, or demonstrating a lack of regard for the safety and well-being of vulnerable people.
One way to begin addressing this problem is to be overt in our openness, welcoming all people to contribute, and pledging in return to value them as whole human beings and to foster an atmosphere of kindness, cooperation, and understanding.
Adopting the Contributor Covenant can be one way to express and codify these values and signal your intention to make your open source community welcoming, diverse, and inclusive.
You can view and download the latest version of the Contributor Covenant here:
For translations of the Contributor Covenant, please see our translations page.
The Contributor Covenant uses semantic versioning for revisions so all URLs are permanent. Previous versions are available here: 1.0, 1.1, 1.2, and 1.3.
We recommend that you add the Markdown or text version of the Contributor Covenant to your source code repository at the root level.
Thanks to Simon Vansintjan there is an automated way to add Contributor Covenant to your project. Assuming that you have Node.js installed, simply run the following two commands from your project folder:
npm install -g covgen
covgen <your_email_address>
If you have npm 5.x installed you can run npx covgen <your_email_address>
instead of installing globally.
For subsequent projects, simply repeat the second command.
You may want to add language similar to this to introduce your code of conduct:
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
You may also use the permalinks given above to reference from your project home page.
Important! You must add a contact method to the placeholder in the document so that people know how to report violations.
The Contributor Covenant is released under the Creative Commons Attribution 4.0 International Public License, which requires that attribution be included.
Morality cannot be legislated, but behavior can be regulated.
Dr. Martin Luther King, Jr.
Do not simply add the Contributor Covenant to your project and assume that any problems with civility, harassment, or discrimination will be solved. As a project maintainer you must be committed to enforcing the code of conduct. A code of conduct without enforcement sends a false signal that your project is welcoming and inclusive, and can create a dangerous situation for marginalized people who participate. Adding the Contributor Covenant to a project places responsibility on the project team that must not be taken lightly.
Before adopting the Contributor Covenant take the time to discuss and decide how to deal with problems as they emerge. Document the policy and procedure for enforcement, and add it to your README or in another visible, appropriate place. Consider if your project team has the willingness and maturity to follow through on your enforcement procedures.
Some resources useful for thinking about enforcement:
This code of conduct has already been adopted by over 200,000 open source projects. Here are just a few major projects and organizations using the Contributor Covenant.
To add your project to the list, submit a pull request.
The Contributor Covenant is a living document, and has been open sourced. Contributions in the form of issues and pull requests are welcomed and encouraged.