{"id":24452626,"url":"https://github.com/hyperonecom/h1-cli","last_synced_at":"2025-09-12T22:43:01.511Z","repository":{"id":22672534,"uuid":"97002469","full_name":"hyperonecom/h1-cli","owner":"hyperonecom","description":"Command-line interface for HyperOne platform","archived":false,"fork":false,"pushed_at":"2023-05-03T11:00:55.000Z","size":8508,"stargazers_count":6,"open_issues_count":49,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T08:35:23.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/hyperonecom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-12T11:59:43.000Z","updated_at":"2020-12-16T13:04:14.000Z","dependencies_parsed_at":"2023-01-13T22:07:16.789Z","dependency_job_id":null,"html_url":"https://github.com/hyperonecom/h1-cli","commit_stats":null,"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperonecom","download_url":"https://codeload.github.com/hyperonecom/h1-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234878719,"owners_count":18900681,"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":"2025-01-21T01:16:13.084Z","updated_at":"2025-01-21T01:16:13.678Z","avatar_url":"https://github.com/hyperonecom.png","language":"JavaScript","readme":"# h1-cli\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5e85806098ca486991d4bc1b568cb743)](https://app.codacy.com/app/hyperonecom/h1-cli?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=hyperonecom/h1-cli\u0026utm_campaign=badger)\n[![Build Status](https://travis-ci.org/hyperonecom/h1-cli.svg?branch=master)](https://travis-ci.org/hyperonecom/h1-cli)\n\nh1-cli is a console tool designed to manage the HyperOne cloud infrastructure. You can use it for your own administrative work as well as for creating automation scripts.\n\n## Features overview\n\n* control of all resources provided by the platform, in particular:\n\n   * changing server - creating, stoping and deleting them,\n   * manipulation of IP addresses - associate them, modification of the PTR record,\n   * modifying disks - creating, detach / attach from the server, resize,\n   * update DNS zone - add DNS records, import \u0026 exports whole zone\n\n* various forms of authentication,\n* choice of output format, in order to use it in additional tools.\n\nThe [reference documentation] contains a complete set of information on the possible actions to be taken and their options.\n\n## Installation\n\nDetailed instruction about installation is available at [HyperOne.com](https://www.hyperone.com/tools/cli/guides/installation.html) for:\n\n* Linux distro:\n   * Debian \u0026 Ubuntu – via Apt repository\n   * Fedora \u0026 CentOS – via Yum repository\n   * Alpine - via Apk repository\n   * other Linux distro – via executable\n* macOS - via executable\n* Windows - via executable\n\n## Usage\n\nThe commands are composed of the following components:\n\n```bash\n$ h1 [categories [...]] command [[options] ...]\n```\n\nThis structure is repeated in all application commands.\n\nTo start the work you should log in via the command:\n\n```bash\n$ h1 login --username {{user_email}}\n```\n\nYou will be asked to enter the password:\n\n\u003e ? Password: ********************\n\nAfter correctly logging in, you will receive a message about obtaining the API key for the session:\n\n\u003e info: You successfully logged and stored your apiKey in config file\n\nThe credentials have been saved in ``$HOME/.h1-cli/conf.json``. You must ensure the confidentiality of these files.\n\nIf you use more than 1 project you must select actively used by downloading the proper identifier:\n\n```bash\n$ h1 project list\n```\n\nThen, confirm this choice:\n\n```bash\n$ h1 project select --project {{project}}\n```\n\n### Creating a server\n\nBelow is an example session presenting the basic actions - creating a server\n\n```bash\n$ h1 vm list\nID                        NAME           FLAVOUR    STATE    PROCESSING  TAGS\n5b3f7c863adfaa0d10f7b445  docker-node    a1.small   Off      false       \n5b3f8b7b3adfaa0d10f7bed4  docker-laas    a1.micro   Running  false       zabbix_agent\n5b439f6b3adfaa0d10f90820  docker-node-2  m2.medium  Running  false       zabbix_agent,docker_registry\n\n$ h1 user credentials list\nID                        NAME    TYPE  CREATED\n5b30d80cddd5b3c5e9ee8dfe  my-ssh  ssh   2018-06-25T11:54:52.159Z\n\n$ h1 vm create --name vm-tutorial --ssh my-ssh --image ubuntu:18.04 --type a1.micro --os-disk ssd,10\nID                        NAME         FLAVOUR   STATE    PROCESSING  TAGS\n5b44b43511b0b1e6f24eb623  vm-tutorial  a1.micro  Running  false  \n\n$ h1 vm list\nID                        NAME           FLAVOUR    STATE    PROCESSING  TAGS\n5b44b43511b0b1e6f24eb623  vm-tutorial    a1.micro   Running  false       \n```\n\nDescription of the basic command parameters``h1 vm create --name vm-tutorial --ssh my-ssh --image ubuntu:18.04 --type a1.micro --os-disk ssd,10``:\n\n* ``--name vm-tutorial`` - server name chosen by the user\n* ``--sshkey my-ssh`` - SSH key name can be listed through ``h1 user credentials list`` or ```h1 project credentials list```,\n* ``--image ubuntu:18.04`` - the system operating image identifier possible to obtain through``h1 image list --recommended``,\n* ``--type a1.micro`` - virtual machine type that can be obtained via ``h1 service list --resource vm --type flavour``,\n* ``--os-disk ssd,10`` - the type and size of the system disk.\n\nThe SSH key is available after importing it. For example via the command ``h1 user credentials add --sshkey-file ~/.ssh/id_rsa.pub --name $(hostname)``..\n\n### Servers managements\n\nThe following are the basic actions that can be performed with servers in the form of example commands:\n\n* ``h1 vm list`` - list available servers\n* ``h1 vm show --vm vm-tutorial`` - show details about server ``vm-tutorial``,\n* ``h1 vm stop --vm vm-tutorial`` - stop server ``vm-tutorial`` without removing them,\n* ``h1 vm start --vm vm-tutorial`` - start server ``vm-tutorial``,\n* ``h1 vm turnoff --vm vm-tutorial`` - turn off server ``vm-tutorial`` without removing them,\n* ``h1 vm destroy --vm vm-tutorial`` - delete server``vm-tutorial``.\n\nIt is also possible to make changes regarding disks attached to the server:\n\n* ``h1 vm disk attach --vm vm-tutorial --disk vm-disk-2`` - attach a previously created disk, e.g. via``h1 disk create --name 'vm-disk-2' --type ssd --size 1``,\n* ``h1 vm disk detach --vm vm-tutorial --disk vm-disk-2`` - detach dysk without removing them.\n\nThese operations do not require disabling virtual machines for non-system disks.\n\n### Disks managements\n\nDisks are data carriers for servers. It is possible to switch them and modify them during the operation of virtual machines.\n\nThe following are the basic actions that can be performed with disks in the form of example commands:\n\n* ``h1 disk list`` - list available disk\n* ``h1 disk show --disk vm-disk-2`` - show details about vm ``vm-disk-2``,\n* ``h1 disk delete --disk vm-disk-2`` - delete disk``vm-disk-2``,\n* ``h1 disk rename --disk vm-disk-2 --new-name vm-disk-new`` - changes name of disk ``vm-disk-2`` to ``vm-disk-new``,\n* ``h1 disk create --name vm-disk-4 --type ssd --size 25`` - create disk SSD with size 25 GB and name ``vm-disk-4``,\n* ``h1 disk resize --disk vm-disk-4 --size 30`` - resize ``vm-disk-4`` to 30 GB.\n\nDisk extension is not possible for system disks on running server. In the case of a system disk, you have to shut down the server first. In other cases you can resize disk when virtual machine and operating system is running.\n\n### Images management\n\nYou can create virtual machine images as well as manage them. The image allow you to create servers with the same configuration or to create a temporary copy of the instance, e.g. to protect the system state from significant updates.\n\nThe following are the basic actions that can be taken with images in the form of example commands:\n\n* ``h1 image create --vm vm-tutorial --name vm-tutorial-$(date +\"%Y-%m-%d\")`` - will create image and save it with the given name,\n* ``h1 image list`` - list your images\n* ``h1 image list --recommended`` - list images provided \u0026 recommended by platform\n* ``h1 image delete --image vm-tutorial-2017-09-15`` - remove image``vm-tutorial-2017-09-15``,\n* ``h1 image show --image vm-tutorial-2017-09-15`` - show details about image ``vm-tutorial-2017-09-15``,\n\n### Managing other resources\n\nIt is worth paying attention to:\n\n* ``h1 vm nic list --vm vm-id`` - lists, among others virtual machine IP addresses.\n\nFor other resources, use the ``--help`` parameter, which documents the CLI features in a full and up-to-date manner.\n \nThe [reference documentation] of the other commands is available in the repository.\n\n### Reporting problems and comments\n\nIf you encounter any errors with the tool, please report the problem through the notification system in the administration panel or the [Issues] tab in the [repository].\n\n[Releases]: https://github.com/hyperonecom/h1-cli/releases/latest\n[repository]: https://github.com/hyperonecom/h1-cli\n[Issues]: https://github.com/hyperonecom/h1-cli/issues\n[reference documentation]: docs/index.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperonecom%2Fh1-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperonecom%2Fh1-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperonecom%2Fh1-cli/lists"}