{"id":18029076,"url":"https://github.com/litteratum/workon","last_synced_at":"2026-05-19T07:05:34.533Z","repository":{"id":43926027,"uuid":"364231163","full_name":"litteratum/workon","owner":"litteratum","description":"GIT workon utility that automates projects clone/remove and checks for unpushed changes on removage","archived":false,"fork":false,"pushed_at":"2023-12-16T10:40:52.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-25T16:03:05.815Z","etag":null,"topics":["automation","git"],"latest_commit_sha":null,"homepage":"","language":"Python","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/litteratum.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-04T11:20:02.000Z","updated_at":"2021-11-14T07:51:12.000Z","dependencies_parsed_at":"2023-12-16T11:42:51.060Z","dependency_job_id":"58fe53a4-079f-4fc1-83b8-3d506cc7b160","html_url":"https://github.com/litteratum/workon","commit_stats":{"total_commits":82,"total_committers":2,"mean_commits":41.0,"dds":0.03658536585365857,"last_synced_commit":"268891b05b0b10115bd383535c87ea43d90ca224"},"previous_names":["returnedvoid/workon"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litteratum%2Fworkon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litteratum%2Fworkon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litteratum%2Fworkon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litteratum%2Fworkon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litteratum","download_url":"https://codeload.github.com/litteratum/workon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249620,"owners_count":20908211,"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":["automation","git"],"created_at":"2024-10-30T09:07:49.541Z","updated_at":"2025-10-26T20:04:27.124Z","avatar_url":"https://github.com/litteratum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![tests](https://github.com/ReturnedVoid/workon/actions/workflows/ci.yml/badge.svg)](https://github.com/ReturnedVoid/workon)\n[![PyPI](https://img.shields.io/pypi/v/git-workon.svg)](https://pypi.org/project/git-workon)\n\n# GIT workon\n\nDo you often need to clone some project, solve one task and remove it from your filesystem?\n\nAre you often afraid that you might leave something unpushed or stashed?\n\nDo you like to leave a perfectly clean desk after your work is done?\n\nThen this script is for you.\n\n## Installation\n\nThe package is available on `PyPi` and can be installed with `pip`:\n\n```bash\npip install git-workon\n```\n\n## Usage\n\n### Configuration\n\nThe script commands can be fully controlled by CLI arguments, but it is much convenient to have a configuration file\ndefining most of parameters. There is a special `config` command that will help you to prepare suitable configuration.\n\n```bash\ngw config [options]\n```\n\nThis command will:\n\n* Create configuration directory if it does not exist. It will use OS-specific config directory, e.g.\n  `~/.config/git_workon` for Linux\n* Copy template configuration file to the configuration directory if it does not exist\n\nThe configuration file is a simple JSON contains the following parameters:\n\n* `sources` - the array of sources from which projects will be cloned. Clone attempts will be done sequentially.\n  Example:\n\n  ```json\n  \"sources\": [\n    \"https://github.com/\u003cmy_username\u003e\",\n    \"git@github.com:\u003cmy_username\u003e\"\n  ]\n  ```\n\n  May be overridden by `-s/--source` argument. You can also define multiple sources: `-s first second -s third`\n* `dir` - the working directory. All projects will be cloned to this directory. May be overridden by `-d/--directory`\n  argument. `~` in path is supported\n* `editor` - the editor used to open a cloned project or the configuration. May be overridden by `-e/--editor` argument.\n  If not specified and `-e/--editor` argument is not provided, the script will try to use the editor specified by\n  `$EDITOR` environment variable. If that variable is not set, the script will try `vi` and `vim` consequently\n\nConfiguration example:\n\n```json\n{\n  \"dir\": \"~/git_workon\",\n  \"editor\": \"vim\",\n  \"sources\": [\n    \"https://github.com/pallets\",\n    \"https://github.com/pypa\"\n  ]\n}\n```\n\n### Start to work on a project\n\nWhen it is time to work on some project, use the `start` command:\n\n```bash\ngw start \u003cmy_project\u003e [options]\n```\n\nThis command will:\n\n* If the project with a given name already exists in the working directory:\n  * open it with a configured editor\n* If the project with a given name does not exist:\n  * clone it from git sources into the working directory\n  * open the project with a configured editor\n\nSee `gw start --help` for other available options on how to control the command.\n\n### Finish your work with a project\n\nWhen you are done with your work, use `done` command:\n\n```bash\ngw done [\u003cmy_project\u003e] [options]\n```\n\nThis command will:\n\n* Check for left stashes\n* Check for unpushed commits\n* Check for left unstaged changes\n* Check for unpushed tags\n* If anything from above was not pushed:\n  * fail with an error describing what was left unpushed\n* If everything was pushed:\n  * remove a project from the working directory\n\nIf a project name was not passed, the command will try to remove all git repos from the working directory.\n\nSee `gw done --help` for other available options on how to control the command.\n\n### Show all tracked projects\n\nTo list all projects under the working directory, use `show` command:\n\n```bash\ngw show [options]\n```\n\nThis command will check every project status and colorize the output according to it:\n\n* Clean (everything is pushed) - green color\n* Dirty (something is not pushed) - yellow color\n* Undefined (not a git project) - white color\n\nSee `gw show --help` for other available options on how to control the command.\n\n## Bash completions\n\nImplemented as a bash script `workon_completions`. Currently, it adds completions only for basic commands.\nTo enable completions, simply copy the script to `/etc/bash_completion.d/` or copy it anywhere and source when you\nneed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitteratum%2Fworkon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitteratum%2Fworkon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitteratum%2Fworkon/lists"}