{"id":24297043,"url":"https://github.com/jayclassless/vcsinfo","last_synced_at":"2025-07-27T00:14:04.262Z","repository":{"id":57600253,"uuid":"168862948","full_name":"jayclassless/vcsinfo","owner":"jayclassless","description":"A tool for retrieving/displaying basic information about the status of a VCS repository.","archived":false,"fork":false,"pushed_at":"2021-11-06T01:23:27.000Z","size":83,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T08:57:24.109Z","etag":null,"topics":["developer-tools","development","golang","tool","vcs","vcs-tools"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jayclassless.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-02T18:21:22.000Z","updated_at":"2021-11-06T01:23:28.000Z","dependencies_parsed_at":"2022-08-24T12:50:50.674Z","dependency_job_id":null,"html_url":"https://github.com/jayclassless/vcsinfo","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/jayclassless/vcsinfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayclassless%2Fvcsinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayclassless%2Fvcsinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayclassless%2Fvcsinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayclassless%2Fvcsinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayclassless","download_url":"https://codeload.github.com/jayclassless/vcsinfo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayclassless%2Fvcsinfo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267274032,"owners_count":24062678,"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-07-26T02:00:08.937Z","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":["developer-tools","development","golang","tool","vcs","vcs-tools"],"created_at":"2025-01-16T19:49:59.680Z","updated_at":"2025-07-27T00:14:04.213Z","avatar_url":"https://github.com/jayclassless.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VCSInfo\n\n[![License](https://img.shields.io/github/license/jayclassless/vcsinfo.svg?style=flat)](https://opensource.org/licenses/MIT)\n[![Coverage Status](https://coveralls.io/repos/github/jayclassless/vcsinfo/badge.svg?branch=master)](https://coveralls.io/github/jayclassless/vcsinfo?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jayclassless/vcsinfo)](https://goreportcard.com/report/github.com/jayclassless/vcsinfo)\n\n## Overview\n\nInspired by [vcprompt](https://bitbucket.org/gward/vcprompt) and its [Python\n port](https://github.com/djl/vcprompt), VCSInfo is a tool that allows you to\nextract information from a local version control repository directory and\ngenerate a string that you can embed in your terminal prompt. For example, in\nBash, you could do something like this:\n\n    $ export PS1=\"\\u@\\h:\\w \\$(vcsinfo)\\$ \"\n\nAnd end up with a prompt that looks like:\n\n    yourname@yourhost:~ $ cd mycoolproject\n    yourname@yourhost:~/mycoolproject git[master]$ touch somefile.txt\n    yourname@yourhost:~/mycoolproject git[master+]$ cd ..\n    yourname@yourhost:~ $\n\nIt's rather handy for knowing the state of the repository you're working in\nwithout the need to always manually invoke one or more commands depending on\nthe VCS you're using.\n\nWhy recreate something that already exists? A few reasons: niether version of\nvcprompt has been updated in several years, the Python version could be slow,\nthe C version was missing some VCS systems, and I wanted an excuse to learn Go,\nwhich is what this implementation was written in.\n\n\n## Installation\n\nVCSInfo is a simple program -- it's one executable that you should put in your\npath somewhere. There are several ways to get your hands on it:\n\n* Download from our [GitHub\n  Releases](https://github.com/jayclassless/vcsinfo/releases). Every release\n  will be available here with pre-built binaries for all the platforms we\n  support. We'll also provide RPMs and DEBs.\n\n* Homebrew. We provide a custom\n  [tap](https://github.com/jayclassless/homebrew-vcsinfo) that allows Homebrew\n  users to easily install vcsinfo.\n\n      $ brew tap jayclassless/vcsinfo\n      $ brew install vcsinfo\n\n* Compile from [source](https://github.com/jayclassless/vcsinfo). If you're\n  comfortable build Go projects, you're welcome to retrieve the source and\n  build it yourself.\n\n\n## Usage\n\nJust executing ``vcsinfo`` will examine the current directory and output a\nshort string that summarizes the state of the current repository, if the\ncurrent directory is in one. If you'd like to examine a different directory\nthan your current, use the ``--path`` option.\n\nIf you'd like to have VCSInfo output a string formatted differently than the\ndefault, you can use the ``--format`` option to specify a format string. In\nthis string, you can use a number of ``%`` codes to embed the information\nVCSInfo finds. These codes are:\n\n| Code | Description | VCS Returned For\n| --- | --- | --- |\n| %n | VCS name | All |\n| %h | Hash | bzr, darcs, fossil, git, hg |\n| %s | Short Hash | git, hg |\n| %r | Revision ID | bzr, hg, svn |\n| %v | Short Hash, Revision ID, or Hash (whichever one that is found first is used) | All |\n| %b | Branch | bzr, darcs, fossil, git, hg, svn |\n| %u | Untracked files indicator | All |\n| %a | Staged files indicator | git |\n| %m | Modified files indicator | All |\n| %t | Stashed changes indicator | bzr, git, hg |\n| %P | Repository root directory | All |\n| %p | Relative path to Repository root directory (relative to the analyzed path) | All |\n| %e | Base name of the repository root directory | All |\n| %% | Literal \"%\" | All |\n\nYou can also use the ``--json`` or ``--xml`` options to output JSON- or\nXML-encoded structures that contain all the information VCSInfo found.\n\nFor details on all available options, run ``vcsinfo --help``. You can also use\n``--help-format`` for information about output formatting, and ``--help-envar``\nfor information about environment variables that influence VCSInfo.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayclassless%2Fvcsinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayclassless%2Fvcsinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayclassless%2Fvcsinfo/lists"}