{"id":29376510,"url":"https://github.com/twitter/focus","last_synced_at":"2025-07-09T22:43:19.160Z","repository":{"id":58281893,"uuid":"530480971","full_name":"twitter/focus","owner":"twitter","description":"Focus aligns Git worktree content based on outlines of a repository's Bazel build graph. Focused repos are sparse, shallow, and thin and unlock markedly better performance in large repos.","archived":false,"fork":false,"pushed_at":"2023-05-12T12:23:02.000Z","size":2130,"stargazers_count":91,"open_issues_count":5,"forks_count":27,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-09T19:35:22.158Z","etag":null,"topics":["bazel","git","source-control","sparse-checkout"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/twitter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-30T03:21:47.000Z","updated_at":"2024-01-08T02:50:21.000Z","dependencies_parsed_at":"2023-02-18T12:46:03.289Z","dependency_job_id":null,"html_url":"https://github.com/twitter/focus","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/twitter/focus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Ffocus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Ffocus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Ffocus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Ffocus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twitter","download_url":"https://codeload.github.com/twitter/focus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Ffocus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504616,"owners_count":23618831,"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","git","source-control","sparse-checkout"],"created_at":"2025-07-09T22:43:18.422Z","updated_at":"2025-07-09T22:43:19.149Z","avatar_url":"https://github.com/twitter.png","language":"Rust","readme":"# Focused Development\n\n`focus` is a tool to manage [Git sparse checkouts](https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/) derived from the [Bazel](https://bazel.build/) build graph.\n\n# Installation\n\n`focus` is written in [Rust](https://www.rust-lang.org/) and supports macOS and Linux. Git v2.35+ and Bazel need to be installed in the PATH env. General \n\n## MacOS Prerequisites\n[Install Bazel](https://bazel.build/install/os-x)\n\n[Install Git \u003e 2.35](https://formulae.brew.sh/formula/git)\n\n*Warning*: If you run a `cargo test` you may run out of file descriptors. On MacOS you will need to use `ulimit -n X` to set a large file limit for the current shell. On macOS Big Sur, you can write a plist to do this permanently:\n\n\nWrite the following to a file named `/Library/LaunchDaemons/limit.maxfiles.plist` (_hint: you'll need to invoke your editor with `sudo` because this file is protected_):\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple/DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n  \u003cplist version=\"1.0\"\u003e\n    \u003cdict\u003e\n      \u003ckey\u003eLabel\u003c/key\u003e\n        \u003cstring\u003elimit.maxfiles\u003c/string\u003e\n      \u003ckey\u003eProgramArguments\u003c/key\u003e\n        \u003carray\u003e\n\t  \u003cstring\u003esudo\u003c/string\u003e\n          \u003cstring\u003elaunchctl\u003c/string\u003e\n          \u003cstring\u003elimit\u003c/string\u003e\n          \u003cstring\u003emaxfiles\u003c/string\u003e\n          \u003cstring\u003e655360\u003c/string\u003e\n          \u003cstring\u003e1048576\u003c/string\u003e\n        \u003c/array\u003e\n      \u003ckey\u003eRunAtLoad\u003c/key\u003e\n        \u003ctrue /\u003e\n    \u003c/dict\u003e\n  \u003c/plist\u003e\n``` \nthen load it with `sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist`. This seems to work better if you restart your Mac.\n\nNote: these instructions are from a GitHub issue https://github.com/gradle/gradle/issues/17274. Thanks to those folks.\n\n\n## Linux Prerequisites\n\n*Install Git*: Git 2.35+: get this through your distro's package manager or [download pre-built binaries or sources here](https://git-scm.com/downloads).\n\n*Install Bazel*: You'll need Bazel installed. See [these instructions](https://bazel.build/install/) for details on how to install on mainstream Linux distros. Alternative distros probably have a reasonable Bazel package available by now.\n\n\n## Common\n[Install Rust](https://rustup.rs/), then install `focus` with\n\n```\n$ cargo install --locked --git https://github.com/twitter/focus\n```\n\n# Usage\n\nIf you are the repository administrator, first configure `focus` for your repo using the [Administration](focus/doc/administration.md) instructions.\n\nFor end-users, see [Usage](focus/doc/usage.md) for instructions on how to use `focus` to manage your sparse checkouts.\n\nFor new or curious users, see [Bazel Tutorial](focus/doc/bazel_tutorial.md) for instructions on how to try `focus` on the [bazel repository](https://github.com/bazelbuild/bazel) itself.\n\n# Design\n\nSee various design documents at https://github.com/twitter/focus/tree/main/focus/doc. Focus was presented at [Git Merge 2022](https://git-merge.com/); [see the slides here](https://docs.google.com/presentation/d/12RVWPIms-rFKfteqYa5bpSWElIiJ1oCAYobLb5DihQo/edit?usp=sharing).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Ffocus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwitter%2Ffocus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Ffocus/lists"}