{"id":20217354,"url":"https://github.com/gojek/xp","last_synced_at":"2025-04-10T15:43:40.813Z","repository":{"id":40459929,"uuid":"177966629","full_name":"gojek/xp","owner":"gojek","description":"Extreme Programming made simple","archived":false,"fork":false,"pushed_at":"2023-03-20T19:07:38.000Z","size":223,"stargazers_count":60,"open_issues_count":1,"forks_count":4,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-24T13:35:52.636Z","etag":null,"topics":["extreme-programming","git","hook-manager"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gojek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-27T10:00:38.000Z","updated_at":"2025-02-12T21:28:21.000Z","dependencies_parsed_at":"2024-11-14T12:32:11.973Z","dependency_job_id":null,"html_url":"https://github.com/gojek/xp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojek%2Fxp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojek%2Fxp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojek%2Fxp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojek%2Fxp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojek","download_url":"https://codeload.github.com/gojek/xp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243497,"owners_count":21071054,"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":["extreme-programming","git","hook-manager"],"created_at":"2024-11-14T06:33:45.098Z","updated_at":"2025-04-10T15:43:40.787Z","avatar_url":"https://github.com/gojek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n`xp` is a tool created to make practising extreme programming easier.\n\n[![Build Status](https://travis-ci.org/gojek/xp.svg?branch=master)](https://travis-ci.org/gojek/xp)\n[![Coverage Status](https://coveralls.io/repos/github/gojek/xp/badge.svg?v=2)](https://coveralls.io/github/gojek/xp)\n\n## Reference\n\nFull list of options supported:\n\n```\n➜  ~ xp\nNAME:\n   xp - extreme programming made simple\n\nUSAGE:\n   xp [global options] command [command options] [arguments...]\n\nVERSION:\n   (version)\n\nCOMMANDS:\n     show-config, sc  Print the current config\n     add-dev          Add a new developer\n     init, i          Initialize a repo. Setup prepare-commit-msg hook\n     set-devs         Set list of devs working on the repo\n     help, h          Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --config value  set the default configuration file (default: \"/Users/kidoman/.xp\")\n   --help, -h      show help\n   --version, -v   print the versio\n```\n\n## Features\n\n- Manage the co-authorship of commits by automatically writing appropriate* `Co-authored-by` trailers (see https://help.github.com/articles/creating-a-commit-with-multiple-authors/ for details on this standard)\n- Take co-authorship information written in the first line of the commit message and convert that into appropriate `Co-authored-by` trailers (overrides all other sources)\n- Ensure that the author drafting the commit is not duplicated as a `Co-authored-by` trailer\n- Preserve co-authorship information when ammending commits\n\n## Installation\n\nThe simplest way to install `xp` in your dev environment is:\n\n```\ngo get -u github.com/gojek/xp\n```\n\nIf you do not have `go` installed, or prefer to install a different way, you can always:\n\n- Download a binary from the [releases](https://github.com/gojek/xp/releases) page\n- `brew install gojek/tap/xp`\n\n## Usage\n\n`xp` stores its global configuration at `~/.xp` (can be overriden via global flag `--config`)\n\nMost of the `xp` functionality are exposted via various subcommands:\n\n- `show-config`: Print the current stored configuration\n- `add-dev`: Add/remove developers in xp\n- `init`: Add/remove repos managed by xp\n\nA separate command `add-info` is made available for use from within `git` hooks:\n\n- prepare-commit-msg\n- commit-msg\n\n## Example\n\nSuppose we have a repo at `~/work/lambda` which we want to now manage using `xp` (this assumes you have already installed `xp` using the instructions above):\n\n\nAdd Karan Misra \u0026lt;kidoman@gmail.com\u0026gt; as a tracked author in the system with shortcode \"km\" to allow for easy referencing in future command line invocations or the first line of commit messages. Same for \"akshat\":\n\n```\n$ xp add-dev km \"Karan Misra\" kidoman@beef.com\n$ xp add-dev ak \"akshat\" akshat@beef.com\n```\n\nSwitch to the directory with the `git` repo:\n\n```\n$ cd ~/work/lambda\n```\n\nInitialize the git hooks and register the repo with `xp`:\n\n```\n$ xp init\n```\n\nIndicate that `akshat` is pairing with you by adding him using his shortcode:\n\n```\n$ xp set-devs ak\n```\n\nCommit as normal:\n\n```\n$ touch CHANGE\n$ git add .\n$ git commit -m\"Added CHANGE\"\n```\n\nRejoice at a well formed commit message:\n\n```\n$ git log -1\ncommit sha (HEAD -\u003e master)\nAuthor: Karan Misra \u003ckidoman@beef.com\u003e\nDate:   date\n\n    Added CHANGE\n\n    Co-authored-by: akshat \u003cakshat@beef.com\u003e\n```\n\nWhen working on a story (issue, etc.), `xp` makes it really easy to embed the issue id in the commit in a well formed manner:\n\n```\n$ git add .\n$ git commit -m\"[BEEF-123|ak] This is a nice story\"\n```\n\n```\n$ git log -1\ncommit sha (HEAD -\u003e master)\nAuthor: Karan Misra \u003ckidoman@beef.com\u003e\nDate:   date\n\n    Make world better\n\n    Issue-id: BEEF-123\n\n    Co-authored-by: akshat \u003cakshat@beef.com\u003e\n```\n\n## Bonus\n\nIf you quickly want to author a commit with someone you typically don't pair with:\n\n```\n$ xp add-dev anand \"Anand Shankar\" anand@beef.com\n```\n\nAfter making the required changes:\n\n```\n$ git add .\n$ git commit -m\"[anand] Make world better\"\n```\n\nThe commit message becomes:\n\n```\n$ git log -1\ncommit sha (HEAD -\u003e master)\nAuthor: Karan Misra \u003ckidoman@beef.com\u003e\nDate:   date\n\n    Make world better\n\n    Co-authored-by: Anand Shankar \u003canand@beef.com\u003e\n```\n\nNote: See how the `[anand]` from the start of the commit message has now resulted in `Anand Shankar` being added as a co-author, overriding the repo level setting (thus `akshat` is not in the list anymore.) Multiple co-authors can be similarly added by separating their aliases by `,` or `|` like so:\n\n\n```\n$ git commit -m\"[anand,akshat] Make world better\"\n$ git commit -m\"[anand|akshat] Make world better\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojek%2Fxp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojek%2Fxp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojek%2Fxp/lists"}