{"id":13467851,"url":"https://github.com/thought-machine/please","last_synced_at":"2025-05-13T23:05:01.598Z","repository":{"id":37549463,"uuid":"50915867","full_name":"thought-machine/please","owner":"thought-machine","description":"High-performance extensible build system for reproducible multi-language builds.","archived":false,"fork":false,"pushed_at":"2025-05-07T12:24:58.000Z","size":28262,"stargazers_count":2509,"open_issues_count":83,"forks_count":206,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-05-07T12:44:08.849Z","etag":null,"topics":["bazel","buck","build","build-system","build-tool","monorepo","multi-language","pants","please-build"],"latest_commit_sha":null,"homepage":"https://please.build","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thought-machine.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-02T11:27:05.000Z","updated_at":"2025-05-07T11:57:33.000Z","dependencies_parsed_at":"2023-10-15T02:20:49.050Z","dependency_job_id":"7a6920f0-4336-41ad-9fe9-9b6602dcf9c3","html_url":"https://github.com/thought-machine/please","commit_stats":{"total_commits":3961,"total_committers":126,"mean_commits":"31.436507936507937","dds":0.404443322393335,"last_synced_commit":"917f233e902e53f4e482ca1d1c1e8a00389e2a73"},"previous_names":[],"tags_count":381,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thought-machine%2Fplease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thought-machine%2Fplease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thought-machine%2Fplease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thought-machine%2Fplease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thought-machine","download_url":"https://codeload.github.com/thought-machine/please/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254040600,"owners_count":22004576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bazel","buck","build","build-system","build-tool","monorepo","multi-language","pants","please-build"],"created_at":"2024-07-31T15:01:01.427Z","updated_at":"2025-05-13T23:04:56.566Z","avatar_url":"https://github.com/thought-machine.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"# Please [![Build Status](https://circleci.com/gh/thought-machine/please.svg?style=shield)](https://circleci.com/gh/thought-machine/please) [![Build Status](https://api.cirrus-ci.com/github/thought-machine/please.svg)](https://cirrus-ci.com/github/thought-machine/please) [![Go Report Card](https://goreportcard.com/badge/github.com/thought-machine/please)](https://goreportcard.com/report/github.com/thought-machine/please) [![Gitter chat](https://badges.gitter.im/thought-machine/please.png)](https://gitter.im/please-build/Lobby)\n\nPlease is a cross-language build system with an emphasis on\nhigh performance, extensibility and reproducibility.\nIt supports a number of popular languages and can automate\nnearly any aspect of your build process.\n\nSee [please.build](https://please.build) for more information.\n\nCurrently Linux (tested on Ubuntu), macOS and FreeBSD are actively supported.\n\nIf you're a fan of Please, don't forget to add yourself\nto the [adopters](https://github.com/thought-machine/please/blob/master/ADOPTERS.md)\nfile.\n\nGetting Started\n===============\n\nThe easiest way to install it on your own machine is to run:\n```bash\ncurl -s https://get.please.build | bash\n```\nOr, if you prefer, grab one of the tarballs off our\n[releases page](https://github.com/thought-machine/please/releases)\nand extract it yourself; it typically lives in `~/.please`.\n\nYou can also install using [Homebrew](https://brew.sh):\n```bash\nbrew tap thought-machine/please\nbrew install please\n```\n\nThen you simply run `plz init` at the root of your project to set up\na default config and you're ready to go. The best way to get to grips\nwith Please is through the [codelabs](https://please.build/codelabs.html)!\nThere's also the [getting started](https://please.build/quickstart.html)\nguide that explains the core concepts.\n\nHow is it so fast?\n==================\n\nPlease has a robust and correct caching model that enables us to aggressively\ncache artifacts. Caching is based on the hashes of inputs (both files, and\nenvironment variables) to each rule rather than last modified timestamps.\nBuilds are hermetic so don't have access to anything they haven't explicitly\ndefined as inputs. This means that if anything changes, we know exactly what\nmight've been affected, so the minimal set of targets get built and tested.\n\nBecause each task is hermetic, they can be run in parallel without any chance\nof interfering with each-other. Combine these two concepts with shared remote\ncaches, and it makes for a blazing fast build system for any language or\ntechnology.\n\nPlease is also written in Go and every effort has been made to make it as fast\nas possible. There's no startup time waiting to bring up VMs, interpreting code\nor communicating with remote JVM processes. The code itself takes full\nadvantage of Go's concurrency and asynchronicity. The end result is a snappy\ncommand line tool that gets to work immediately and feels great to use.\n\nWhy Please, and not Maven, pip, or go build?\n============================================\n\nA build system is more than just a mechanism for invoking the compiler.\nIf you're working on just one language, don't have any code generation,\nand don't need to publish any artifacts anywhere, you might not need\nPlease. Chances are this is not the case.\n\nBuilding software often involves more than just compiling code. There's\ndeployment config to template, code to generate, and quite often, there's\nmore than one language involved. Please provides a powerful, comprehensive,\nand understandable framework that you can use to craft a truly holistic\nbuild process.\n\nPlease does this through a consistent and seamless command line interface;\nthere's no need to learn new build systems and technologies for different\nlanguages. Build any target with `plz build`, test any target with `plz test`,\nno matter what's going on under the hood.\n\nThe [Docker \u0026 Kubernetes](https://please.build/codelabs/k8s) codelab covers\nbuilding a Kubernetes based application with Please, including reliably\ndeploying code to a local cluster, and pushing it to a remote registry.\n\nThe [genrule()](https://please.build/codelabs/genrule) codelab covers\nextending Please with custom build definitions to truly automate any\npart of your deployment process.\n\nWhy Please, and not make?\n=========================\n\nMake is a great tool for running tasks. It's easy enough to understand\nbecause it leaves you very close to the shell. The problem is, it has\nlimited capability to build out complexity. There have been attempts to\ngenerate make files from higher level tools like cmake and ninja, but they\nfall short of what Please sets out to achieve.\n\nThe Please build language is a full programming language. There are a high\nlevel set of build rules that make up a declarative DSL to define build\ntargets, however you can drop into an imperative language that resembles\npython when necessary:\n\n```python\nsubinclude(\"//my_custom_defs:markdown_page\")\n\npages = []\nfor page in glob(include = [\"*.md\"]):\n    pages += markdown_page(\n        name = page.removesuffix(\".md\"),\n        srcs = [page],\n        visibility = [\"//website/...\"],\n    )\n\ngo_binary (\n    name = \"webserver\",\n    srcs = [\"main.go\"],\n    deps = [\"//third_party/go:protobuf\"],\n    data = pages,\n    visibility = [\"//services/foo/...\"],\n)\n```\n\nThis is distinctively operating at a higher level when compared to make:\n\n```\nprotobuf:\n    go install google.golang.org/protobuf\n\nwebserver: protobuf\n    go tool compile --pack foo.go -o foo.a\n\npages: ???\n```\n\nAdditionally, `make` builds are not hermetic. The above make example installs\nprotobuf into the host machines Go path. Please builds only have access to files\nand environment variables they have explicitly been given access to. You can play\naround in the environment targets are built in with `plz build //some/target --shell`.\nAdditionally, on linux systems, Please can take this a step further with Linux\n[namespaces](https://en.wikipedia.org/wiki/Linux_namespaces) to improve\nsandboxing especially of the network. Please also has built in task\nparallelism so can take full advantage of multi-core machines which were\nnot a consideration 40 years ago when make was designed.\n\nFinally, Please has a robust caching mechanism base on hashing the\ninputs of each rule. Makes cache invalidation is based on the last\nmodified timestamp which can change unexpectedly forwards and\nbackwards in time. Combine this with hermetic builds, and Please\ncaching is never incorrect.\n\n\nWhy Please, not Bazel, Buck or Pants?\n=====================================\n\nThese build systems are all very similar so choosing between them can be hard.\nPlease originally replaced buck implementing the subset of features we used. We\nfound that buck (and the competition) worked great when using the supported\nlanguages but fell flat when breaking new ground.\n\nThe biggest difference between Please and the competition is that Please is\ndesigned from the ground up to be extensible. The built-in languages are all\ndefined in the same\n[build language](https://github.com/thought-machine/please/tree/master/rules)\nas you use to define your targets, demonstrating that there's nothing special\nabout them. This puts the build definitions where they should be: in your\ndomain. You have all the same tools Please has to expand your build\ndefinitions to satisfy your needs.\n\nPlease does all this with a focus on simplicity and transparency. There are\na limited amount of concepts that are needed to get started and once they are\ngrocked, the possibilities are endless. Please relies on these concepts rather\nthan requiring lots of magic and incantation. Configuration is simple and largely\noptional so getting going is easy, and there's no single WORKSPACE file nobody really\nowns, with lines of configuration that nobody really understands.\n\nThe command line interface is designed with similar considerations in mind. Subcommands\ncan be added to Please though [aliases](https://please.build/config.html#alias) and\ntie into the Please tab-completions. Not only can flags and arguments be\ncompleted, but they can also leverage the build graph to complete labels enabling you\nto truly craft your developer experience the way you want it.\n\nBuilding Please\n===============\n\nIf you're looking to get involved, check out the contributor\n[guidance](CONTRIBUTING.md) to help you get started. If you're a fan of\nPlease, don't forget to add yourself to the\n[adopters](https://github.com/thought-machine/please/blob/master/ADOPTERS.md)\nfile.\n\nTo build Please yourself, run `./bootstrap.sh` in the repo root.\nThis will bootstrap a minimal version of Please using Go and then\nrebuild it using itself. You'll need to have Go 1.23+ installed.\n\nOptional dependencies for various tests include Python, Java, clang,\ngold and docker - none of those are required to build components so\ntheir tests will be excluded if they aren't available.\n\nIf you'd rather not worry about installing the dependencies, we provide\na prebuilt Docker image based on Ubuntu which is capable of building\nthe whole thing for you:\n[`docker run -it thoughtmachine/please_ubuntu`](https://hub.docker.com/r/thoughtmachine/please_ubuntu)\n\nYou can install a locally built copy of Please using `plz install`, or\nif it's the first time, by running `./install.sh` after it's built.\nThis will overwrite whatever you currently have in `~/.please` with\nyour local version, although you can get back to a released version\nagain by running `plz update --force`.\n\nTo automatically fix linting and code generation issues, run\n`plz autofix`.\n\n\nDocumentation\n=============\n\n * [Quickstart](https://please.build/quickstart.html)\n * [Commands \u0026 command-line arguments](https://please.build/commands.html)\n * [Built-in rules](https://please.build/lexicon.html)\n * [BUILD language reference](https://please.build/language.html)\n * [Custom build rules](https://please.build/build_rules.html)\n * [Config reference](https://please.build/config.html)\n * [FAQ](https://please.build/faq.html)\n\n\nStatus\n======\n\nPlease is released \u0026 we consider it stable; we follow [semver](https://semver.org)\nfor releases, so major versions indicate potentially breaking changes to the\nBUILD language, command line or other behaviour. We try to minimise this where\npossible.\n\nWe're very happy to accept pull requests, feature requests, and bugs if it's\nnot working for you. We don't always have time for everything but Please is\nunder active development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthought-machine%2Fplease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthought-machine%2Fplease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthought-machine%2Fplease/lists"}