Name | hkg-cli JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | CLI app to set up micro services of Helmholtz Knowledge Graph locally |
upload_time | 2025-07-28 07:23:02 |
maintainer | Mustafa Soylu |
docs_url | None |
author | Mustafa Soylu |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
typer
hkg
cli
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[

](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli)
[

](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main/coverage)
<!-- --8<-- [start:abstract] -->
# hkg-cli
A command-line interface tool for setting up and managing Helmholtz Knowledge Graph (HKG) development environments. hkg-cli provides a streamlined way to initialize, configure, and run HKG components with minimal setup effort.
## Key Features
- π **Quick Setup**: Initialize a complete HKG development environment with a single command
- π§ **Configuration Management**: Easy configuration through TOML files
- π³ **Docker Integration**: Automated Docker Compose setup for all HKG components
- π **Component Updates**: Simple commands to update and manage HKG components
- π οΈ **Development Tools**: Built-in utilities for common development tasks
- π **Private Components**: Support for private and devops repositories
- π **Rich Logging**: Enhanced logging with debug options
## Why hkg-cli?
- **Simplified Development**: Reduces the complexity of setting up HKG development environments
- **Standardized Setup**: Ensures consistent development environments across teams
- **Time Saving**: Automates repetitive setup tasks and configuration
- **Easy Maintenance**: Streamlined process for updating and managing HKG components
<!-- --8<-- [end:abstract] -->
<!-- --8<-- [start:quickstart] -->
## Installation
This project works with Python > 3.9.
```bash
pip install git+ssh://git@codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/hkg-cli.git
```
Or, you can install via pypi registry.
```bash
pip install hkg-cli
```
## Getting Started
1. Initialize a new HKG project:
```bash
hkg-cli setup init my-hkg-project [--private] [--devops]
```
The `my-hkg-project` folder will be created to hold all component repositories. This folder will contain:
- Individual component repositories as subdirectories with environment files
- Configuration file
- Docker compose files
!!! warning "SSH Key Requirements"
To use private or devops repositories, you must:
1. Have SSH access to the Helmholtz GitLab instance
2. Have your SSH key properly configured
3. Have access permissions to the private repositories
4. Use the `--private` flag for private repositories
5. Use the `--devops` flag for devops repositories
If you don't have the required SSH access, the initialization will fail when trying to clone private repositories.
Options:
- `--private`: Enable cloning of private repositories (requires SSH access)
- `--devops`: Enable cloning of devops repositories (requires SSH access)
2. Start the development environment:
```bash
hkg-cli run
```
3. Stop the environment when done:
```bash
hkg-cli stop [--clear]
```
Options:
- `--clear`: Clear all volumes and networks in docker
4. Update components:
```bash
hkg-cli setup update
```
The update command will:
- Apply changes made in `hkg-config.toml` to the environment
- Update Docker compose file based on configuration changes
- Update environment variables for components
- Pull latest changes if repository versions/branches/commits are modified
- Disable components in Docker compose if `enabled=false` is set
!!! tip "Configuration Changes"
You can modify the `hkg-config.toml` file to:
- Change component versions/branches/commits
- Enable/disable components (set `enabled=false` to disable)
- Update environment variables
- Modify component configurations
Run `hkg-cli setup update` to apply these changes.
5. Show version:
```bash
hkg-cli --version
```
6. Enable debug logging:
```bash
hkg-cli --debug [command]
```
For more detailed usage instructions, please refer to our [documentation](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main).
## Troubleshooting
### When I try installing the package, I get an `IndexError: list index out of range`
Make sure you have `pip` > 21.2 (see `pip --version`), older versions have a bug causing
this problem. If the installed version is older, you can upgrade it with
`pip install --upgrade pip` and then try again to install the package.
### SSH Access Issues
If you encounter SSH-related errors during initialization:
1. Verify your SSH key is properly configured:
```bash
ssh -T git@codebase.helmholtz.cloud
```
2. Ensure you have access to the required repositories:
- Check your GitLab permissions
- Contact your project administrator if needed
3. If using a custom SSH key, make sure it's added to your SSH agent:
```bash
ssh-add ~/.ssh/your_private_key
```
**You can find more information on using and contributing to this repository in the
[documentation](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main).**
<!-- --8<-- [end:quickstart] -->
<!-- --8<-- [start:citation] -->
## How to Cite
If you want to cite this project in your scientific work,
please use the [citation file](https://citation-file-format.github.io/)
in the [repository](https://codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/hkg-cli.git/blob/main/CITATION.cff).
<!-- --8<-- [end:citation] -->
<!-- --8<-- [start:acknowledgements] -->
## Acknowledgements
We kindly thank all
[authors and contributors](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/latest/credits).
<div>
<img style="vertical-align: middle;" alt="HMC Logo" src="https://github.com/Materials-Data-Science-and-Informatics/Logos/raw/main/HMC/HMC_Logo_M.png" width=50% height=50% />
<img style="vertical-align: middle;" alt="FZJ Logo" src="https://github.com/Materials-Data-Science-and-Informatics/Logos/raw/main/FZJ/FZJ.png" width=30% height=30% />
</div>
<br />
This project was developed at the Institute for Materials Data Science and Informatics
(IAS-9) of the JΓΌlich Research Center and funded by the Helmholtz Metadata Collaboration
(HMC), an incubator-platform of the Helmholtz Association within the framework of the
Information and Data Science strategic initiative.
<!-- --8<-- [end:acknowledgements] -->
Raw data
{
"_id": null,
"home_page": null,
"name": "hkg-cli",
"maintainer": "Mustafa Soylu",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": "m.soylu@fz-juelich.de",
"keywords": "typer, hkg, cli",
"author": "Mustafa Soylu",
"author_email": "m.soylu@fz-juelich.de",
"download_url": "https://files.pythonhosted.org/packages/15/51/35d02e28f5661e396bbe0edc6933d365455e45e7615d1e4f471af987c30b/hkg_cli-0.1.0.tar.gz",
"platform": null,
"description": "[\n\n](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli)\n[\n\n](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main/coverage)\n\n<!-- --8<-- [start:abstract] -->\n\n# hkg-cli\n\nA command-line interface tool for setting up and managing Helmholtz Knowledge Graph (HKG) development environments. hkg-cli provides a streamlined way to initialize, configure, and run HKG components with minimal setup effort.\n\n## Key Features\n\n- \ud83d\ude80 **Quick Setup**: Initialize a complete HKG development environment with a single command\n- \ud83d\udd27 **Configuration Management**: Easy configuration through TOML files\n- \ud83d\udc33 **Docker Integration**: Automated Docker Compose setup for all HKG components\n- \ud83d\udd04 **Component Updates**: Simple commands to update and manage HKG components\n- \ud83d\udee0\ufe0f **Development Tools**: Built-in utilities for common development tasks\n- \ud83d\udd12 **Private Components**: Support for private and devops repositories\n- \ud83d\udcdd **Rich Logging**: Enhanced logging with debug options\n\n## Why hkg-cli?\n\n- **Simplified Development**: Reduces the complexity of setting up HKG development environments\n- **Standardized Setup**: Ensures consistent development environments across teams\n- **Time Saving**: Automates repetitive setup tasks and configuration\n- **Easy Maintenance**: Streamlined process for updating and managing HKG components\n\n<!-- --8<-- [end:abstract] -->\n<!-- --8<-- [start:quickstart] -->\n\n## Installation\n\nThis project works with Python > 3.9.\n\n```bash\npip install git+ssh://git@codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/hkg-cli.git\n```\n\nOr, you can install via pypi registry.\n\n```bash\npip install hkg-cli\n```\n\n## Getting Started\n\n1. Initialize a new HKG project:\n\n```bash\nhkg-cli setup init my-hkg-project [--private] [--devops]\n```\n\nThe `my-hkg-project` folder will be created to hold all component repositories. This folder will contain:\n- Individual component repositories as subdirectories with environment files\n- Configuration file\n- Docker compose files\n\n!!! warning \"SSH Key Requirements\"\n To use private or devops repositories, you must:\n 1. Have SSH access to the Helmholtz GitLab instance\n 2. Have your SSH key properly configured\n 3. Have access permissions to the private repositories\n 4. Use the `--private` flag for private repositories\n 5. Use the `--devops` flag for devops repositories\n\n If you don't have the required SSH access, the initialization will fail when trying to clone private repositories.\n\nOptions:\n- `--private`: Enable cloning of private repositories (requires SSH access)\n- `--devops`: Enable cloning of devops repositories (requires SSH access)\n\n2. Start the development environment:\n\n```bash\nhkg-cli run\n```\n\n3. Stop the environment when done:\n\n```bash\nhkg-cli stop [--clear]\n```\n\nOptions:\n- `--clear`: Clear all volumes and networks in docker\n\n4. Update components:\n\n```bash\nhkg-cli setup update\n```\n\nThe update command will:\n- Apply changes made in `hkg-config.toml` to the environment\n- Update Docker compose file based on configuration changes\n- Update environment variables for components\n- Pull latest changes if repository versions/branches/commits are modified\n- Disable components in Docker compose if `enabled=false` is set\n\n!!! tip \"Configuration Changes\"\n You can modify the `hkg-config.toml` file to:\n - Change component versions/branches/commits\n - Enable/disable components (set `enabled=false` to disable)\n - Update environment variables\n - Modify component configurations\n\n Run `hkg-cli setup update` to apply these changes.\n\n5. Show version:\n\n```bash\nhkg-cli --version\n```\n\n6. Enable debug logging:\n\n```bash\nhkg-cli --debug [command]\n```\n\nFor more detailed usage instructions, please refer to our [documentation](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main).\n\n## Troubleshooting\n\n### When I try installing the package, I get an `IndexError: list index out of range`\n\nMake sure you have `pip` > 21.2 (see `pip --version`), older versions have a bug causing\nthis problem. If the installed version is older, you can upgrade it with\n`pip install --upgrade pip` and then try again to install the package.\n\n### SSH Access Issues\n\nIf you encounter SSH-related errors during initialization:\n\n1. Verify your SSH key is properly configured:\n ```bash\n ssh -T git@codebase.helmholtz.cloud\n ```\n\n2. Ensure you have access to the required repositories:\n - Check your GitLab permissions\n - Contact your project administrator if needed\n\n3. If using a custom SSH key, make sure it's added to your SSH agent:\n ```bash\n ssh-add ~/.ssh/your_private_key\n ```\n\n**You can find more information on using and contributing to this repository in the\n[documentation](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/main).**\n\n<!-- --8<-- [end:quickstart] -->\n<!-- --8<-- [start:citation] -->\n\n## How to Cite\n\nIf you want to cite this project in your scientific work,\nplease use the [citation file](https://citation-file-format.github.io/)\nin the [repository](https://codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/hkg-cli.git/blob/main/CITATION.cff).\n\n<!-- --8<-- [end:citation] -->\n<!-- --8<-- [start:acknowledgements] -->\n\n## Acknowledgements\n\nWe kindly thank all\n[authors and contributors](https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli/latest/credits).\n\n<div>\n<img style=\"vertical-align: middle;\" alt=\"HMC Logo\" src=\"https://github.com/Materials-Data-Science-and-Informatics/Logos/raw/main/HMC/HMC_Logo_M.png\" width=50% height=50% />\n \n<img style=\"vertical-align: middle;\" alt=\"FZJ Logo\" src=\"https://github.com/Materials-Data-Science-and-Informatics/Logos/raw/main/FZJ/FZJ.png\" width=30% height=30% />\n</div>\n<br />\n\nThis project was developed at the Institute for Materials Data Science and Informatics\n(IAS-9) of the J\u00fclich Research Center and funded by the Helmholtz Metadata Collaboration\n(HMC), an incubator-platform of the Helmholtz Association within the framework of the\nInformation and Data Science strategic initiative.\n\n<!-- --8<-- [end:acknowledgements] -->\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI app to set up micro services of Helmholtz Knowledge Graph locally",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli",
"Homepage": "https://hmc.pages.hzdr.de/hmc-public/unhide/development/hkg-cli",
"Repository": "https://codebase.helmholtz.cloud/hmc/hmc-public/unhide/development/hkg-cli.git"
},
"split_keywords": [
"typer",
" hkg",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8f44685a2ad8c411d30b21b0d16dbaafed17f3226a680949364520e23bd1cd5b",
"md5": "25a038638cb17ed80056ee6886088686",
"sha256": "81df4d27193fbef01cfa619fa63569dd947d62fbb20af24b2c8dd4c6e6797975"
},
"downloads": -1,
"filename": "hkg_cli-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25a038638cb17ed80056ee6886088686",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 38943,
"upload_time": "2025-07-28T07:23:00",
"upload_time_iso_8601": "2025-07-28T07:23:00.543476Z",
"url": "https://files.pythonhosted.org/packages/8f/44/685a2ad8c411d30b21b0d16dbaafed17f3226a680949364520e23bd1cd5b/hkg_cli-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "155135d02e28f5661e396bbe0edc6933d365455e45e7615d1e4f471af987c30b",
"md5": "00017ff7236d22d88cdd048cf00eedea",
"sha256": "9186815e033d9efb19a60a13765633522c2be8fad891ff027a2a015939448b4f"
},
"downloads": -1,
"filename": "hkg_cli-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "00017ff7236d22d88cdd048cf00eedea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 46959,
"upload_time": "2025-07-28T07:23:02",
"upload_time_iso_8601": "2025-07-28T07:23:02.005121Z",
"url": "https://files.pythonhosted.org/packages/15/51/35d02e28f5661e396bbe0edc6933d365455e45e7615d1e4f471af987c30b/hkg_cli-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 07:23:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "hkg-cli"
}