{"id":13803812,"url":"https://github.com/hungrybluedev/klonol","last_synced_at":"2026-03-08T05:34:29.867Z","repository":{"id":43510069,"uuid":"466723581","full_name":"hungrybluedev/klonol","owner":"hungrybluedev","description":"CLI tool to help you \"clone all\" git repositories belonging to you.","archived":false,"fork":false,"pushed_at":"2023-12-03T05:57:09.000Z","size":92,"stargazers_count":20,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-20T17:38:28.664Z","etag":null,"topics":["cli","collaborate","git","gitea","github","jetbrains","v","vlang"],"latest_commit_sha":null,"homepage":"","language":"V","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/hungrybluedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["hungrybluedev","medvednikov"],"ko_fi":"hungrybluedev"}},"created_at":"2022-03-06T11:58:15.000Z","updated_at":"2024-12-03T02:20:44.000Z","dependencies_parsed_at":"2023-12-03T06:27:35.619Z","dependency_job_id":"c94e107a-cff0-423f-bb54-7e401338ac50","html_url":"https://github.com/hungrybluedev/klonol","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fklonol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fklonol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fklonol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hungrybluedev%2Fklonol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hungrybluedev","download_url":"https://codeload.github.com/hungrybluedev/klonol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247238358,"owners_count":20906432,"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":["cli","collaborate","git","gitea","github","jetbrains","v","vlang"],"created_at":"2024-08-04T01:00:38.122Z","updated_at":"2026-03-08T05:34:24.829Z","avatar_url":"https://github.com/hungrybluedev.png","language":"V","funding_links":["https://github.com/sponsors/hungrybluedev","https://github.com/sponsors/medvednikov","https://ko-fi.com/hungrybluedev"],"categories":["Applications"],"sub_categories":["Command-line"],"readme":"\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ch1\u003e\u003cem\u003eklonol\u003c/em\u003e\u003c/h1\u003e\n\n[vlang.io](https://vlang.io) | [hungrybluedev](https://hungrybluedev.in/)\n\n\u003c/div\u003e\n\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![CI][workflow_badge]][workflow_url]\n[![License: MIT][license_badge]][license_url]\n[![Git Latest Tag][git_tag_badge]][git_tag_url]\n\n\u003c/div\u003e\n\nA phonetic play on the phrase \"clone all\". It is a CLI tool written in\n[V](https://vlang.io/) to clone all repositories belonging to you (or the\nauthenticated user).\n\n## Features\n\n1. Supports GitHub and [Gitea](https://gitea.io/en-us/).\n2. Retrieves information about both public _and_ private repositories belonging\n   to the authenticated user.\n3. You can list all available repositories, clone them, or run `git pull`\n   on existing clones. It uses the user's SSH key to clone.\n4. Cross-platform! We've switched to using TOML for storing credentials and\n   have tested this project extensively on Windows as well.\n\n## Motivation\n\nI self-host my Gitea instance. It contains several private repositories. There\nare some instances where I need to upgrade the server or perform some\nmaintenance. Although I use [Docker Compose](https://docs.docker.com/compose/)\nwith mounted volumes to manage the Gitea instance, there may be times when\ndata retention is not possible. I need to restart my service from scratch. In\norder to help with these \"from-scratch\" scenarios, I wrote this tool.\n\nIt allows me to automatically retrieve all of my repositories and clone them\nlocally. I can stash away a password-protected local copy while I upgrade my\ngit server in peace.\n\n## Prerequisites\n\n1. You must have Git installed. Use your package manager or navigate to\n   [Git's Website](https://git-scm.com/downloads) to download the latest\n   version.\n2. You must have a GitHub or Gitea account.\n3. [Add an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)\n   to your appropriate account.\n4. Generate a [_personal access\n   token_](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n   with the minimum scope of `repo` (to allow viewing private repositories)\n   and set an expiration of 7 days or the lowest possible. Regenerate this\n   key when it expires.\n\n## Installation\n\n### From Source using Git\n\n**Step 1:** Install\n[V](https://github.com/vlang/v/blob/master/doc/docs.md#install-from-source)\nand [symlink it](https://github.com/vlang/v#symlinking).\n\nIf you already have V installed, update your installation by doing `v up`.\n\n**Step 2:** Clone and compile _klonol_\n\n```bash\n# Move into a convenient place to install klonol\ncd ~/oss/apps\n\n# Clone this repository and move into it\ngit clone https://github.com/hungrybluedev/klonol.git --depth 1\ncd klonol\n\n# Build the executable\nv build.vsh\n```\n\nThe optimized `klonol` binary is saved in the `bin` subdirectory.\n\n**Note:** If you are working on _klonol_ locally and want faster builds for quicker\nprototyping, use `v build.vsh -fast` to use TCC and build an unoptimised executable\nquickly.\n\n**Step 3:** Add to `PATH`\n\nAdd the `bin` subdirectory to your `PATH`. You can edit your `~/.bashrc` file\nin Unix-line systems to do this. On Windows, use the system dialog.\n\n**Step 4:** Test installation\n\nRunning the following command from any directory should provide a detailed\ndescription on the tool including its name, version, description, and\navailable options.\n\n```bash\nklonol -h\n```\n\n## Usage\n\n### Setting the variables\n\nThe following variables need to be set in a file called `credentials.toml`.\n\n| Name           | Description                                                                              | Compulsory |\n|----------------|------------------------------------------------------------------------------------------|------------|\n| `username`     | The GitHub or Gitea username whose repositories are to be queried                        | Yes        |\n| `access_token` | The personal access token generated previously                                           | Yes        |\n| `base_url`     | The base domain to be used to test SSH and make API calls from. Defaults to `github.com` | For Gitea  |\n\nA sample `credentials.toml` file will look like this:\n\n```toml\n[github]\nusername = \"your_username\"\naccess_token = \"XYZXYZ\"\n\n[gitea]\nbase_url = \"git.yourdomain.com\"\nusername = \"your_username\"\naccess_token = \"XYZXYZ\"\n\n```\n\n### Running klonol\n\nOnce the variables have been set, klonol will retrieve the relevant\ninformation automatically.\n\n**Help Information**\n\n```bash\n# Get the version\nklonol --version\n# output:\n# klonol 0.6.x\n\n\n# Get detailed usage information\nklonol -h\n# OR\nklonol --help\n# output:\n# klonol 0.6.x\n# -----------------------------------------------\n# Usage: klonol [options] [ARGS]\n#\n# Description: A CLI tool to \"clone all\" repositories belonging to you.\n#\n# klonol requires Access Tokens to work properly. Refer to README for more\n# information. It retrieves information about ALL available repositories\n# belonging to the authenticated user. Both public and private.\n#\n# Please follow safety precautions when storing access tokens, and read\n# the instructions in README carefully.\n#\n#\n# Options:\n#   -p, --provider \u003cstring\u003e   git provider to use (default is github)\n#   -c, --credentials \u003cstring\u003e\n#                             path to credentials.toml file (default is ./credentials.toml)\n#   -a, --action \u003cstring\u003e     action to perform [list, clone, pull]\n#   -v, --verbose             enable verbose output\n#   -h, --help                display this help and exit\n#   --version                 output version information and exit\n```\n\n**Sample usage flow for GitHub**\n\n```bash\n# Navigate to a directory to store all the repositories in\ncd ~/Backups/GitHub\n\n# Make sure you have the proper 'credentials.toml' file in the directory\nnano credentials.toml\n\n# List all available repositories\nklonol\n\n# Clone all available repositories\nklonol --action clone\n# OR\nklonol -a clone\n\n# ... After some time has passed ...\n# Pull all changes from GitHub\nklonol -a pull\n```\n\n**Sample usage flow for Gitea**\n\n```bash\n# Navigate to a directory to store all the repositories in\ncd ~/Backups/Gitea\n\n# Make sure you have the proper 'credentials.toml' file in the directory\nnano credentials.toml\n\n# List all available repositories\nklonol --provider gitea\n# OR\nklonol -p gitea\n\n# Clone all available repositories\nklonol --action clone --provider gitea\n# OR\nklonol -a clone -p gitea\n\n# ... After some time has passed ...\n# Pull all changes from GitHub\nklonol -a pull -p gitea\n```\n\n### Updating klonol\n\nIf you've installed it from source, navigate to the folder where you cloned\nthe repository. Then run `git pull`. After all the changes have been\ndownloaded, run `v build.vsh`.\n\nYou don't need to change the PATH variable if\nklonol is already added to PATH.\n\n## License\n\nThis project is distributed under the [MIT License](LICENSE).\n\n[workflow_badge]: https://github.com/hungrybluedev/klonol/actions/workflows/ci.yml/badge.svg\n\n[license_badge]: https://img.shields.io/badge/License-MIT-blue.svg\n\n[workflow_url]: https://github.com/hungrybluedev/klonol/actions/workflows/ci.yml\n\n[license_url]: https://github.com/hungrybluedev/klonol/blob/main/LICENSE\n\n[git_tag_url]: https://github.com/hungrybluedev/klonol/tags\n\n[git_tag_badge]: https://img.shields.io/github/v/tag/hungrybluedev/klonol?color=purple\u0026include_prereleases\u0026sort=semver\n\n## Acknowledgements\n\n - Thanks to [A1ex-N][a1ex_n] for contributing the [idea][toml_idea] and\n[initial code][toml_pr] for supporting cross-platform TOML in favour of\nunix-specific ENV!\n\n[a1ex_n]: https://github.com/A1ex-N\n\n[toml_idea]: https://github.com/hungrybluedev/klonol/issues/1\n\n[toml_pr]: https://github.com/hungrybluedev/klonol/pull/2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Fklonol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhungrybluedev%2Fklonol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhungrybluedev%2Fklonol/lists"}