Open-source project
google/styleguide avatar
google/styleguide

Google Style Guide: A Reference for Google-Originated Code, Not a Community Project

Style guides for Google-originated open-source projects

39,831 stars12,921 forksHTMLNOASSERTION

At a glance

What is it?
The google/styleguide repository hosts official style guides for languages like C++, Python, and Go, but it is not a community-driven project. External contributions are closed, and the guides prioritize Google's internal needs.
Who is it for?
Adopt this repository if you are working on a Google-originated open-source project or if your team wants to align with Google's internal conventions for languages like C++, Python, or JavaScript. Do not adopt it if you expect to contribute changes or if you need a style guide that evolves with community input.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • google/styleguide39,831 ★ · +318
Star history
Repository2026-08-182026-11-15
google/styleguide39.5k39.8k

318 Stars in the last 89 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What This Repository Actually Contains

The google/styleguide repository is a collection of links and files that point to 24 style guides for languages and formats, including C++, Python, Java, JavaScript, Go, Shell, and TypeScript. It also hosts google-c-style.el, an Emacs settings file that applies Google's C++ style. The README makes clear that these guides are copies of Google's internal style guides, meant for developers working on Google-owned or Google-originated open-source projects. If you are not modifying such a project, the guides may still be useful, but they are not designed for general adoption. The repository also notes that the cpplint tool is no longer maintained here; users are directed to the community fork at https://github.com/cpplint/cpplint.

How the Style Guides Are Structured and Updated

Each style guide is a separate document, hosted on the gh-pages branch and served via the project homepage. The README lists direct links, for example the C++ guide at cppguide.md and the Python guide at pyguide.md. The guides cover a wide range of conventions, from naming and formatting to deeper rules like 'never use global variables' or 'never use exceptions.' Updates flow one way: changes are made to Google's internal guides first, then copied to this public repository. This means the public guides are always a snapshot, not a living document. The README explicitly states that external contributions are not accepted and that pull requests are regularly closed without comment. That is a hard boundary, not a polite suggestion.

Getting Started: How to Use the Guides

You do not install anything. The guides are web pages. To use them, open the homepage at https://google.github.io/styleguide/ and navigate to the language you need. For example, the C++ guide is at https://google.github.io/styleguide/cppguide.html, and the Python guide is at https://google.github.io/styleguide/pyguide.html. If you use Emacs, you can load the google-c-style.el file from the raw GitHub URL. The repository also contains an XML Document Format Style Guide. For commit messages, the README points to an external resource, How to Write a Git Commit Message, rather than hosting its own convention.

The One-Way Contribution Model and Its Consequences

The biggest limitation is that you cannot influence these guides. The README says external contributions are not accepted, and issues may get engagement only if they raise questions or point out obvious mistakes, but the primary goal is Google's internal needs. This means if you find a rule that does not fit your project, you cannot fix it here. You can fork the repository, but then you are maintaining your own fork, which is a separate cost. The guides are licensed under CC-By 3.0, which allows sharing and adaptation with attribution, so forking is legally possible, but the upstream project will not merge your changes. This is a deliberate design choice, and it makes the repository a poor fit for teams that want a collaborative style standard.

Alternatives: Community-Driven Style Guides and External Guides

For language-specific style guides that accept community input, you might look at the cpplint fork, which is a separate tool, not a style guide. For style guides themselves, consider the official Python PEP 8, which is maintained by the Python community, or the Airbnb JavaScript Style Guide, which is a separate open-source guide. The key difference is that google/styleguide is a one-way mirror of internal rules and does not accept external contributions. Also note that some Google guides live outside this repository: Effective Dart and the Kotlin Style Guide are hosted elsewhere, so if you need those, you must go to those separate sites.

Maintenance and Upgrade Costs

The maintenance cost of using these guides is low, because you do not run anything. You read a document. The cost comes from keeping your code in line with the rules, which can be non-trivial for large codebases. Because changes are made to the internal guides first and only eventually copied here, the public versions can lag behind. There is no release schedule and no changelog in the repository. The README notes that Google stopped making internal cpplint updates public and points users to a community fork. For a team, this means you should not build tooling around this repository's contents, because the contents can change without a versioned release. The license, CC-By 3.0, permits reuse with attribution, but it does not grant any warranty or support.

Editorial conclusion

Adopt this repository if you are working on a Google-originated open-source project or if your team wants to align with Google's internal conventions for languages like C++, Python, or JavaScript. Do not adopt it if you expect to contribute changes or if you need a style guide that evolves with community input. Before relying on any guide, verify that it covers your language and that your project is not subject to a separate external guide like Effective Dart or the Kotlin Style Guide. The repository is a read-only snapshot of internal rules, so treat it as a reference, not a living standard.

Frequently asked questions

Is it styleguide or style guide?

The repository name is one word, google/styleguide, while the documents it collects are titled with two, as in the C++ Style Guide and the Python Style Guide. The project's own title is Google Style Guides, plural.

Does google/styleguide have an install step or a command line tool?

No. The repository publishes documents plus a handful of editor and IDE config files, and its default branch is gh-pages. The homepage is https://google.github.io/styleguide/, and the README links editor files such as eclipse-cpp-google-style.xml, google-c-style.el (an Emacs settings file) and google_python_style.vim.

Can I send a pull request to correct a rule in these style guides?

No. The guides are copies of Google's internal style guides, changes are made internally first and then copied out, and the README states that external contributions are not accepted and that pull requests are regularly closed without comment.

What happened to cpplint?

The project used to host it, stopped making internal updates public, and points users to the community fork at https://github.com/cpplint/cpplint. The C++ guide itself remains in the repository as cppguide.md.

Is this the same kind of thing as a design or brand style guide?

No. This repository collects programming style guides for Google-originated open source projects, listing 24 style guides, from C++ and Python to JSON, Markdown and an XML document format guide. Design, brand and writing style guides are not part of it.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/google-styleguide.svg)](https://hysenlabs.com/projects/google-styleguide)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/google-styleguide.svg)](https://hysenlabs.com/projects/google-styleguide)

Was this useful?