{"id":16174305,"url":"https://github.com/hellothisisflo/hierarchy","last_synced_at":"2025-04-07T09:51:43.970Z","repository":{"id":52701778,"uuid":"195844198","full_name":"HelloThisIsFlo/Hierarchy","owner":"HelloThisIsFlo","description":"Clone and Maintain an entire hierarchy in one command","archived":false,"fork":false,"pushed_at":"2021-04-20T18:24:14.000Z","size":42,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T12:27:58.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://floriankempenich.github.io/Hierarchy/","language":"Python","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/HelloThisIsFlo.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}},"created_at":"2019-07-08T15:52:24.000Z","updated_at":"2024-06-16T01:37:55.000Z","dependencies_parsed_at":"2022-09-11T03:31:16.082Z","dependency_job_id":null,"html_url":"https://github.com/HelloThisIsFlo/Hierarchy","commit_stats":null,"previous_names":["floriankempenich/hierarchy"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloThisIsFlo%2FHierarchy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloThisIsFlo%2FHierarchy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloThisIsFlo%2FHierarchy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelloThisIsFlo%2FHierarchy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HelloThisIsFlo","download_url":"https://codeload.github.com/HelloThisIsFlo/Hierarchy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247375920,"owners_count":20929137,"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":[],"created_at":"2024-10-10T04:24:29.649Z","updated_at":"2025-04-07T09:51:43.930Z","avatar_url":"https://github.com/HelloThisIsFlo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hierarchy\n[![Travis](https://img.shields.io/travis/FlorianKempenich/hierarchy.svg)](https://travis-ci.org/FlorianKempenich/hierarchy) [![PyPI](https://img.shields.io/pypi/v/hierarchy.svg)](https://pypi.org/project/hierarchy/)\n\nHierarchy is a simple tool that allows you to clone and maintain an entire hierarchy of Git repository in _one single command_:\n```\n$ hierarchy\n```\n\u003e TODO: Add picture of `hierarchy` in action\n\n## Quick-Start\n\n1. **Install**\n   ```bash\n   $ pip install hierarchy\n   ```\n\n2. **Create the _Hierarchy_ file**\n   ```bash\n   $ nano ~/.hierarchy\n   ```\n\n   \u003e _Sample Hierarchy File_\n   \u003e ```yaml\n   \u003e repos:\n   \u003e   - path: ~/Dev/CliTools\n   \u003e     url: git@github.com:FlorianKempenich/Hierarchy.git\n   \u003e     \n   \u003e   - path: ~/Dev/CliTools\n   \u003e     url: git@github.com:FlorianKempenich/kata.git\n   \u003e     \n   \u003e   - path: ~/Dev/CliTools/DevOps\n   \u003e     url: git@github.com:FlorianKempenich/ansible-droplet.git\n   \u003e     \n   \u003e   - path: ~/Dev/HomeAutomation\n   \u003e     url: git@github.com:FlorianKempenich/Appdaemon-Test-Framework.git\n   \u003e     name: appdaemontestframework\n   \u003e ```\n\n3. **Run _Hierarchy_**\n   ```bash\n   $ hierarchy\n   ```\n   * _Hierarchy_ will clone all the repositories at the specified location\n   * If a repo already exists at the specified location,  _Hierarchy_ will pull  \n     the latest changes (WIP)\n   * If a repo contains local modifications or has some un-pushed commits,  \n     the repo will be skipped and a warning will be emitted (WIP)\n\n## _Hierarchy_ file structure\n\nThe _Hierarchy_ file represents the flattened hierarchy of all the git repository to clone and maintain. \n\nIt consists of a list of entries, under the key `repos`, each representing a repository to clone.\n```yaml\nrepos:\n  - REPO_TO_CLONE_1\n \n  - REPO_TO_CLONE_2\n  \n  - REPO_TO_CLONE_3\n```\nEach repository has the following structure:\n```yaml\nurl: \"URL of the project. The same used to clone the repository with `git clone`\"\npath: \"The local path where to clone the repository. It can contain `~` to represent HOME\"\nname: \"OPTIONAL - A name to override the default repository name when cloning\"\n```\n\n**The repository will be cloned at:** `path/name`  \nIf no `name` is provided, the repository name will be used.\n\n\nA sample _Hierarchy_ file might look like this:\n```yaml\nrepos:\n  - path: ~/Dev/CliTools\n    url: git@github.com:FlorianKempenich/Hierarchy.git\n    \n  - path: ~/Dev/CliTools\n    url: git@github.com:FlorianKempenich/kata.git\n    \n  - path: ~/Dev/CliTools/DevOps\n    url: git@github.com:FlorianKempenich/ansible-droplet.git\n    \n  - path: ~/Dev/HomeAutomation\n    url: git@github.com:FlorianKempenich/Appdaemon-Test-Framework.git\n    name: appdaemontestframework\n```\n\n## Options\n\n* ### `-f` / `--file HIERARCHY_FILE`\n  A hierarchy file to use.  \n  _Default:_ `~/.hierarchy`\n  \n* ### `-v` / `--verbose`\n  Enable verbose mode\n  \n* ### `--help`\n  Show help\n\n\n\n---\n## Work In Progress\n\n- [x] Allow for `~` in the `path`\n- [x] Create directories if do not exist\n- [ ] Clone with all submodules\n- [ ] If directory exists and not empty:\n    - [ ] Is not same repo =\u003e Skip and notify user (ERROR)\n    - [ ] Is not repo =\u003e Skip and notify user (ERROR)\n    - [ ] Is correct repo:\n        - [ ] Has no local modifications and up to date with remote =\u003e\n            - [ ] Update (pull)\n            - [ ] Update with all submodules\n        - [ ] Has local modifications =\u003e Skip and notify user (WARN)\n        - [ ] Is not up to date with remote =\u003e Skip and notify user (WARN)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellothisisflo%2Fhierarchy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellothisisflo%2Fhierarchy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellothisisflo%2Fhierarchy/lists"}