{"id":13450825,"url":"https://github.com/jin/create-bazel-workspace","last_synced_at":"2025-10-11T15:02:33.148Z","repository":{"id":57518180,"uuid":"136536142","full_name":"jin/create-bazel-workspace","owner":"jin","description":"Generate a new polyglot Bazel workspace with minimal configuration","archived":false,"fork":false,"pushed_at":"2018-07-29T06:38:14.000Z","size":37,"stargazers_count":19,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T18:03:11.026Z","etag":null,"topics":["bazel","build-system","multi-language","polyglot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-07T22:04:46.000Z","updated_at":"2023-09-15T08:34:04.000Z","dependencies_parsed_at":"2022-09-16T20:00:48.603Z","dependency_job_id":null,"html_url":"https://github.com/jin/create-bazel-workspace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jin/create-bazel-workspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin%2Fcreate-bazel-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin%2Fcreate-bazel-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin%2Fcreate-bazel-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin%2Fcreate-bazel-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jin","download_url":"https://codeload.github.com/jin/create-bazel-workspace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jin%2Fcreate-bazel-workspace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260249957,"owners_count":22980763,"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","build-system","multi-language","polyglot"],"created_at":"2024-07-31T07:00:38.981Z","updated_at":"2025-10-11T15:02:28.104Z","avatar_url":"https://github.com/jin.png","language":"Python","readme":"# create-bazel-workspace\n\nCreate a polyglot Bazel workspace easily, with sane defaults for multiple languages (layers).\n\n## Quick start\n\n```\n$ go get github.com/jin/create-bazel-workspace\n\n$ go install github.com/jin/create-bazel-workspace\n\n$ $GOPATH/bin/create-bazel-workspace -dir \u003coutput-dir\u003e \u003clayer 1\u003e \u003clayer 2\u003e ... \u003clayer N\u003e\n```\n\nFor example, if you want `go` and `scala`, run \n\n```\n$ create-bazel-workspace go scala\n```\n\nThe default output directory is named `bazel-workspace`.\n\n## Layers\n\nA *layer* contains the following:\n\n-  Minimal example that makes use of the layer's rulesets (e.g. `android_binary`\n  and `android_library` for the `android` layer). This example is available as\n  a top level target `//:\u003clayer\u003e_example` in the generated workspace.\n- `WORKSPACE`: Specifies the WORKSPACE content\n- `BUILD.bazel`: Specifies the top level BUILD file\n- `post_create.txt`: Further instructions for a layer after `create-bazel-workspace`\n\nWhen you specify multiple layers, files in each layer will be appended to the\n`base` layer sequentially. \n\nSupported `\u003clayer\u003e` are the the names of the directories in this repository, e.g.\n`android`, `scala`, `go`.\n\n## Additional instructions\n\nDepending on the `layer`, there may be more commands to run after\n`create-bazel-workspace`. For example, the `go` layer may require running `bazel\nrun //:gazelle`. These instructions are logged in\n`\u003cbazel-workspace-output\u003e/instructions.md`:\n\n```\n$ cat bazel-workspace/instructions.md\n# Instructions for the base layer:\n\nPlease file issues at https://github.com/jin/create-bazel-workspace\n\n# Instructions for the go layer:\n\nFrom rules_go, please run:\n\n    $ bazel run //:gazelle\n\nThis will generate a BUILD.bazel file for each Go package in your repository. \nYou can run the same command in the future to update existing build files with \nnew source files, dependencies, and options.\n\nPlease file issues at https://github.com/bazelbuild/rules_go\n\n# Instructions for the android layer:\n\nFrom https://github.com/quittle/bazel_android_sdk_downloader:\n\n    $ bazel run @androidsdk//install\n\nThis will attempt to download the SDK for the versions specified. If you change\nthese values, clean the workspace, or check it out fresh, you will need to\nre-run this command to download and install the SDK again.\n\nPlease file issues at https://github.com/bazelbuild/rules_android\n\n# Instructions for the scala layer:\n\nPlease file issues at https://github.com/bazelbuild/rules_scala\n```\n\n## Development\n\nThis project can be built with Bazel. Build the binary by running \n\n```\n$ bazel run //:create-bazel-workspace\n```\n\nTo regenerate the BUILD files, run \n\n```\n$ bazel run //:gazelle\n``` \n\nTo add a new dep, run\n\n```\n$ bazel run //:gazelle -- update-repos example.com/dep/repo\n```\n\n## Contributing a Layer\n\nTo add a layer, open a pull request with new top-level directory named after the layer, containing these files:\n\n- `\u003clayer\u003e/WORKSPACE.bzl`\n- `\u003clayer\u003e/BUILD.bazel.bzl`\n- `\u003clayer\u003e/post_create.txt`\n\nThese files are allowed to be empty.\n\n## Idea\n\n`create-bazel-workspace` is inspired by create-react-app and Spacemacs's concept of layers.\n","funding_links":[],"categories":["Tooling"],"sub_categories":["Project generators"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjin%2Fcreate-bazel-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjin%2Fcreate-bazel-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjin%2Fcreate-bazel-workspace/lists"}