{"id":16117095,"url":"https://github.com/rotty/gitstat","last_synced_at":"2025-10-20T12:43:18.619Z","repository":{"id":66382837,"uuid":"243840486","full_name":"rotty/gitstat","owner":"rotty","description":"Git status for shell prompt integration","archived":false,"fork":false,"pushed_at":"2024-02-29T20:40:07.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T13:49:02.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rotty.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-28T19:36:21.000Z","updated_at":"2024-02-29T20:39:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f9df6f1-cc05-432e-b1ec-93ec12a8f5a0","html_url":"https://github.com/rotty/gitstat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rotty/gitstat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rotty%2Fgitstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rotty%2Fgitstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rotty%2Fgitstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rotty%2Fgitstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rotty","download_url":"https://codeload.github.com/rotty/gitstat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rotty%2Fgitstat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280094876,"owners_count":26271003,"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","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-09T20:28:30.249Z","updated_at":"2025-10-20T12:43:18.588Z","avatar_url":"https://github.com/rotty.png","language":"Rust","readme":"# gitstatus\n\nThis is a Rust re-implementation of `gitstatus.py`, part of\n[zsh-git-prompt], taking some inspiration for the alternative Haskell\nimplementation included with [zsh-git-prompt]. It can be used as a\ndrop-in replacement for the Python script.\n\nThe current differences to `gitstatus.py` are:\n\n- Implemented with the Rust [libgit2 bindings], so the binary is\n  self-contained and does not fork git, which should be beneficial for\n  performance.\n- Handles unborn branches, so you get a status for a\n  freshly-initialized repository. For an unborn branch, a question\n  mark (`?`) is shown as a branch name.\n\n[zsh-git-prompt]: https://github.com/olivierverdier/zsh-git-prompt\n[libgit2 bindings]: https://crates.io/crates/git2\n\n## Prompt structure\n\nPlease refer to the [zsh-git-prompt's README] for information on the\nstatus information shown.\n\n[zsh-git-prompt's README]: https://github.com/olivierverdier/zsh-git-prompt/blob/master/README.md\n\n## Installation\n\n1. You need a Rust toolchain to build `gitstat`; the easiest way\n   obtain a recent one is via [rustup]. This will provide you with\n   `cargo`, Rust's package manager, which you'll invoke below to build\n   and/or install `gitstat`.\n\n2. Once `gitstat` is published to [crates.io], you will be able to\n   install or update it to its latest release with:\n\n    ```sh\n    cargo install --force gitstat\n    ```\n\n    In the meantime, use `cargo build --release` in the top-level\n    directory of the source code, and copy the executable placed in\n    `target/release/gitstat` into your `$PATH`.\n\n3. As with [zsh-git-prompt], source the file `zshrc.sh` from your\n    `~/.zshrc` config file, and configure your prompt. So, somewhere\n    in `~/.zshrc`, you should have:\n\n    ```sh\n    source path/to/zshrc.sh\n    # an example prompt\n    PROMPT='%B%m%~%b$(git_super_status) %# '\n    ```\n\n    Instead of allowing choosing between different implementations, as\n    [zsh-git-prompt] does, you can set `GITSTAT_COMMAND`, which should\n    work also when referring to `gitstatus.py`, but then you'd lose\n    all the performance goodness.\n\n[rustup]: https://rustup.rs/\n[crates.io]: https://crates.io/\n\n### Static build\n\nFor deployment to a Linux target, an attractive option is to create a\nstatically linked binary using Rust's MUSL target. This will result in\na completely standalone binary, which depends only on the Linux\nkernel's system call ABI.\n\n```sh\n# If you haven't installed the MUSL target already, let's do that now:\nrustup target add x86_64-unknown-linux-musl\n# Build against the MUSL libc target\ncargo build --target x86_64-unknown-linux-musl --release\n# Let's check it's really a static binary\nfile target/x86_64-unknown-linux-musl/release/tdns \\\n  | grep -q 'statically linked' || echo \"nope\"\n```\n\n## License\n\nThe code and documentation of `gitstat` is [free\nsoftware](https://www.gnu.org/philosophy/free-sw.html), licensed under\nthe [MIT license]. It includes a variant of the `zshrc.sh` script from\n[zsh-git-prompt], which is also provided under the [MIT license].\n\n[MIT license]: ./LICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frotty%2Fgitstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frotty%2Fgitstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frotty%2Fgitstat/lists"}