{"id":13575006,"url":"https://github.com/contabo/cntb","last_synced_at":"2025-05-16T12:08:38.491Z","repository":{"id":38420592,"uuid":"400481537","full_name":"contabo/cntb","owner":"contabo","description":"Contabo Command Line Interface","archived":false,"fork":false,"pushed_at":"2025-04-02T14:16:52.000Z","size":2742,"stargazers_count":203,"open_issues_count":13,"forks_count":32,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-23T00:42:08.900Z","etag":null,"topics":["cli","cloud","command-line","command-line-interface","command-line-tool","commandline","contabo","contabo-cloud"],"latest_commit_sha":null,"homepage":"https://contabo.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contabo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-27T11:08:13.000Z","updated_at":"2025-04-07T09:48:28.000Z","dependencies_parsed_at":"2023-02-15T10:16:25.457Z","dependency_job_id":"74bf93a7-5b6e-4600-9744-dfbcebbc983d","html_url":"https://github.com/contabo/cntb","commit_stats":{"total_commits":105,"total_committers":9,"mean_commits":"11.666666666666666","dds":0.08571428571428574,"last_synced_commit":"47d17005b64654fcbc16efadb7c5778377f43088"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contabo%2Fcntb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contabo%2Fcntb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contabo%2Fcntb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contabo%2Fcntb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contabo","download_url":"https://codeload.github.com/contabo/cntb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348891,"owners_count":21415907,"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","cloud","command-line","command-line-interface","command-line-tool","commandline","contabo","contabo-cloud"],"created_at":"2024-08-01T15:00:57.440Z","updated_at":"2025-05-16T12:08:38.485Z","avatar_url":"https://github.com/contabo.png","language":"Go","readme":"# Contabo Command-Line Interface (CLI)\n\n`cntb` is a command-line interface (CLI) for managing your products from Contabo like VPS and VDS.\n\n## Installation\n\n1. Download `cntb` as pre-built executable for your operating system (Windows, MacOS and Linux supported) on the [releases page](https://github.com/contabo/cntb/releases).\n  * MacOS/Linux\n    * curl -L '\u0026lt;link to release\u0026gt;' | tar xz\n  * Windows\n    * Right-click and select extract\n2. You might move the executable to any location on your disk. You may update your `PATH` environment variable for easier invocation.\n\n## Getting Started\n\n\n1. Configure `cntb` once to use your credentials. You can obtain them from [Customer Control Panel](https://my.contabo.com/api/details).\n\n  ```sh\n  cntb config set-credentials --oauth2-clientid=\u003cClientId from Customer Control Panel\u003e --oauth2-client-secret=\u003cClientSecret from Customer Control Panel\u003e --oauth2-user=\u003cAPI User from Customer Control Panel\u003e --oauth2-password=\u003cAPI Password from Customer Control Panel\u003e\n  ```\n\n2. Use the CLI, e.g.\n\n```sh\ncntb help\n```\n\n## Examples\n\n### List available images\n\n```sh\ncntb get images\n```\n\n### Upload custom image\n\n```sh\ncntb create image --name 'CentOS Cloud Image' --description 'CentOS 7 Cloud Image' --url 'https://cloud.centos.org/altarch/7/images/CentOS-7-x86_64-GenericCloud.qcow2' --osType Linux --version 7\n```\n\n### Create / order new Compute Instance\n\nUsing Cloud-Init to set ssh public key\n\n```sh\ncntb create instance --imageId \"ae423751-50fa-4bf6-9978-015673bf51c4\" --productId \"V92\" --region \"EU\" --userData 'ssh_authorized_keys:\n  - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ'\n# once finished please login via ssh\n# in case of the previously uploaded CentOS 7 Cloud Image please use `centos` as user\n# for standard images please use `admin` as user\n```\n\nUsing Cloud-Init to install apache2 with an already stored SSH public key\n\n```sh\ncntb create instance --imageId \"ae423751-50fa-4bf6-9978-015673bf51c4\" --productId \"V92\" --region \"EU\" --sshKeys '1,2' --userData 'package_update: true\npackage_upgrade: true\npackages:\n  - httpd'\n```\n\n### Start Compute Instance\n\n```sh\ncntb start instance 12345\n```\n\n### Stop Compute Instance\n\n```sh\ncntb stop instance 12345\n```\n\n## Enable Shell Completion\n\n```sh\ncntb completion\nBash:\n\n        $ source \u003c(cntb completion bash)\n\n        # To load completions for each session, execute once:\n        # Linux:\n        $ cntb completion bash \u003e /etc/bash_completion.d/cntb\n        # macOS:\n        $ cntb completion bash \u003e /usr/local/etc/bash_completion.d/cntb\n\nZsh:\n\n        # If shell completion is not already enabled in your environment,\n        # you will need to enable it.  You can execute the following once:\n\n        $ echo \"autoload -U compinit; compinit\" \u003e\u003e ~/.zshrc\n\n        # To load completions for each session, execute once:\n        $ cntb completion zsh \u003e \"${fpath[1]}/_cntb\"\n\n        # You will need to start a new shell for this setup to take effect.\n\nfish:\n\n        $ cntb completion fish | source\n\n        # To load completions for each session, execute once:\n        $ cntb completion fish \u003e ~/.config/fish/completions/cntb.fish\n\nPowerShell:\n\n        PS\u003e cntb completion powershell | Out-String | Invoke-Expression\n\n        # To load completions for every new session, run:\n        PS\u003e cntb completion powershell \u003e cntb.ps1\n        # and source this file from your PowerShell profile.\n```\n\n## Building from source\n\n1. Clone the `cntb` project.\n2. Download \u0026 install `docker` from the official [Docker page](https://www.docker.com/).\n3. Download \u0026 install `go` from the offical [Go page](https://golang.org/doc/install).\n\n```sh\nmake build\n```\n\n## Affected files and folders\n\nFor `cntb` to work it uses some additional files and folders.\n\n* default file for storing settings / preferences is `~/.cntb.yaml`\n* caching folder is `~/.cache/cntb/`\n\n## License\n\nGNU GENERAL PUBLIC LICENSE, Version 3\n\n\n\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontabo%2Fcntb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontabo%2Fcntb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontabo%2Fcntb/lists"}