### Start Server using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_start.md This snippet demonstrates how to start a specific server using the cherryctl command-line interface. It requires the server ID as an argument. The command can be further customized with various flags for API URL, configuration, output format, and authentication token. ```bash cherryctl server start ID [flags] # Example: cherryctl server start 12345 # With options: cherryctl server start 12345 --api-url "https://custom.api.com/v1/" -o json --token "YOUR_API_TOKEN" ``` -------------------------------- ### Example: Deleting a Server Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_delete.md This example demonstrates how to delete a server by providing its ID. The command will prompt for confirmation before proceeding. ```bash # Deletes the specified server: cherryctl server delete 12345 > ✔ Are you sure you want to delete server 12345: y ``` -------------------------------- ### Install Cherry Ctl CLI Source: https://context7.com/cherryservers/cherryctl/llms.txt Instructions for installing the cherryctl CLI tool using package managers like Homebrew and AUR, or by building from source with Go. Requires Go 1.17+ for source installation. ```bash # Install via Homebrew (macOS/Linux) brew tap cherryservers/cherryctl brew install cherryctl # Install via AUR (Arch Linux) paru -S cherryctl # Install from source (requires Go 1.17+) go install github.com/cherryservers/cherryctl@latest ``` -------------------------------- ### Example Reinstall Server Command Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_reinstall.md An example demonstrating how to reinstall a server with ID '12345'. It specifies the hostname as 'staging-server-1', the image as 'ubuntu_24_04', and provides a password. ```bash # Reinstall the specified server: cherryctl server reinstall 12345 --hostname staging-server-1 --image ubuntu_24_04 --password G1h2e_39Q9oT ``` -------------------------------- ### Install cherryctl from Source Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Builds and installs the latest development version of cherryctl from source using Go. Requires Go 1.17 or later. The executable is typically found in $GOPATH/bin or $HOME/go/bin. ```go go install github.com/cherryservers/cherryctl@latest ``` -------------------------------- ### Example: Create Project with BGP Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_project_create.md This example demonstrates how to create a new project and enable BGP support. It specifies the team ID, project name, and the --bgp flag. This is useful for projects requiring BGP configuration. ```bash cherryctl project create -t 12345 --name "Project with BGP" --bgp ``` -------------------------------- ### Cherry Ctl Configuration File Example Source: https://context7.com/cherryservers/cherryctl/llms.txt An example of a Cherry Ctl configuration file in YAML format, showing how to set default token, team ID, project ID, region, and output format. ```yaml # Example configuration file (~/.config/cherry/default.yaml) token: your-api-token-here team-id: 12345 project-id: 123456 region: LT-Siauliai output: json ``` -------------------------------- ### Example: Create Business Team with USD Currency Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_team_create.md This example demonstrates how to create a business team with the name 'USD team' and specifies USD as the currency using the cherryctl command. ```bash cherryctl team create --name="USD team" --type business --currency USD ``` -------------------------------- ### Example: Force Deleting a Server Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_delete.md This example shows how to delete a server without confirmation by using the '-f' or '--force' flag. ```bash # Deletes a server, skipping confirmation: cherryctl server delete 12345 -f ``` -------------------------------- ### Install cherryctl via Homebrew Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Installs the cherryctl CLI tool using the Homebrew package manager. This is a convenient method for macOS and Linux users. ```shell brew tap cherryservers/cherryctl brew install cherryctl ``` -------------------------------- ### Initialize Cherry Ctl Configuration Source: https://context7.com/cherryservers/cherryctl/llms.txt Guides on initializing cherryctl configuration, including setting up API tokens, default team/project IDs, and creating named contexts for managing multiple environments. Supports environment variables for token authentication. ```bash # Initialize cherryctl configuration cherryctl init # Example interactive session: # Cherry Servers API Tokens can be obtained through the portal at https://portal.cherryservers.com/. # Token (hidden): # Team ID []: 12345 # Project ID []: 123456 # Writing configuration to: /Users/username/.config/cherry/default.yaml # Create a new named context cherryctl init --context production # Use a specific context for commands cherryctl server list --context production # Set token via environment variable export CHERRY_AUTH_TOKEN="your-api-token" ``` -------------------------------- ### Install cherryctl via AUR Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Installs the cherryctl CLI tool from the Arch User Repository (AUR) using the paru package manager. This method is specific to Arch Linux-based systems. ```shell paru -S cherryctl ``` -------------------------------- ### Example: Enable BGP for a Project Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_project_update.md This example demonstrates how to use the cherryctl project update command to enable BGP for a specific project. It targets project ID '12345' and sets the '--bgp' flag to 'true'. ```bash cherryctl project update 12345 --bgp true ``` -------------------------------- ### GET /v1/plans Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_plan_list.md Retrieves a list of server plans with their corresponding hourly rates and stock volumes. Requires a team ID for accurate pricing. ```APIDOC ## GET /v1/plans ### Description Retrieves a list of server plans with their corresponding hourly rates and stock volumes. This endpoint is useful for understanding available server configurations and their costs. ### Method GET ### Endpoint /v1/plans ### Parameters #### Query Parameters - **team_id** (integer) - Required - The team's ID. Return plans prices based on team billing details. - **region_slug** (string) - Optional - The Slug or ID of the region to filter plans by. - **type** (string) - Optional - Comma separated list of available plan types (e.g., "baremetal,virtual,vps"). ### Request Example ```bash curl -X GET "https://api.cherryservers.com/v1/plans?team_id=123®ion_slug=us-east-1&type=baremetal,vps" \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the plan. - **name** (string) - The name of the server plan. - **hourly_rate** (number) - The hourly cost of the plan. - **stock** (integer) - The number of available units for this plan. - **region** (object) - Information about the region where the plan is available. - **id** (integer) - The region ID. - **slug** (string) - The region slug. - **name** (string) - The region name. - **type** (string) - The type of the plan (e.g., "baremetal", "virtual", "vps"). #### Response Example ```json { "data": [ { "id": 101, "name": "Standard Baremetal", "hourly_rate": 0.15, "stock": 50, "region": { "id": 1, "slug": "us-east-1", "name": "US East (N. Virginia)" }, "type": "baremetal" }, { "id": 205, "name": "VPS Basic", "hourly_rate": 0.05, "stock": 200, "region": { "id": 2, "slug": "eu-west-1", "name": "Europe (Ireland)" }, "type": "vps" } ] } ``` ``` -------------------------------- ### Get Server Details using cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_get.md Retrieves the details of a specified server using its ID or Hostname. Supports filtering by project ID and customizing output format. Inherits options for API URL, configuration, context, fields, and token. ```bash cherryctl server get {ID | HOSTNAME} [-p ] [flags] # Example: cherryctl server get 12345 ``` -------------------------------- ### cherryctl ssh-key get Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ssh-key_get.md Retrieves the details of a specific SSH key by its ID. ```APIDOC ## GET /ssh-key/{ID} ### Description Retrieves the details of the specified ssh-key. ### Method GET ### Endpoint `/ssh-key/{ID}` ### Parameters #### Path Parameters - **ID** (string) - Required - The unique identifier of the SSH key to retrieve. #### Query Parameters - **fields** (string) - Optional - Comma-separated object field names to output in the result. Fields can be used for list and get actions. - **output** (string) - Optional - Output format (*table, json, yaml). Defaults to table. #### Request Body This endpoint does not accept a request body. ### Request Example ```bash cherryctl ssh-key get 12345 ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the SSH key. - **name** (string) - The name of the SSH key. - **public_key** (string) - The public key content. - **created_at** (string) - The timestamp when the SSH key was created. #### Response Example ```json { "id": "12345", "name": "My Server Key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ...", "created_at": "2023-10-27T10:00:00Z" } ``` ### Options inherited from parent commands - **api-url** (string) - Override default API endpoint (default "https://api.cherryservers.com/v1/") - **config** (string) - Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well. - **context** (string) - Specify a custom context name (default "default") - **token** (string) - API Token (CHERRY_AUTH_TOKEN) ``` -------------------------------- ### Update Server with Tags Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_update.md This example demonstrates how to update a server's tags using the cherryctl CLI. It targets a specific server ID and applies new tag values. Ensure the server ID is valid and the tags are formatted correctly. ```bash cherryctl server update 12345 --tags="env=stage" ``` -------------------------------- ### GET /cherryservers/cherryctl/backup/methods-whitelist Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_backup_methods-whitelist.md Retrieves a list of backup storage methods whitelist. This command returns information about whitelisted IP addresses and the backup methods they are allowed to use. ```APIDOC ## GET /cherryservers/cherryctl/backup/methods-whitelist ### Description Retrieves a list of backup storage methods whitelist. This command returns information about whitelisted IP addresses and the backup methods they are allowed to use. ### Method GET ### Endpoint /cherryservers/cherryctl/backup/methods-whitelist ### Parameters #### Path Parameters - **backup_ID** (string) - Required - The ID of the backup to retrieve whitelist information for. #### Query Parameters - **api-url** (string) - Optional - Override default API endpoint (default "https://api.cherryservers.com/v1/") - **config** (string) - Optional - Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well. - **context** (string) - Optional - Specify a custom context name (default "default") - **fields** (string) - Optional - Comma separated object field names to output in result. Fields can be used for list and get actions. - **h** (boolean) - Optional - help for methods-whitelist - **o** (string) - Optional - Output format (*table, json, yaml) - **token** (string) - Optional - API Token (CHERRY_AUTH_TOKEN) ### Request Example ```bash cherryctl backup methods-whitelist 123 ``` ### Response #### Success Response (200) - **whitelist** (array) - A list of whitelisted entries, where each entry contains IP address and allowed backup methods. - **ip_address** (string) - The IP address that is whitelisted. - **allowed_methods** (array) - A list of backup methods allowed for the IP address. - (string) - The name of an allowed backup method. #### Response Example ```json { "whitelist": [ { "ip_address": "192.168.1.100", "allowed_methods": ["rsync", "ftp"] }, { "ip_address": "10.0.0.5", "allowed_methods": ["s3"] } ] } ``` ``` -------------------------------- ### Retrieve Storage Details using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_storage_get.md This snippet demonstrates how to use the cherryctl command-line interface to retrieve the details of a specific storage volume. It requires the storage ID as an argument and supports various flags for API interaction and output customization. ```bash cherryctl storage get ID [flags] # Example: cherryctl storage get 12345 ``` -------------------------------- ### Get Information About a Specific Server with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Fetches detailed information for a single server, identified by its ID. Supports output formatting in JSON or YAML using the `-o` flag. ```shell cherryctl server get -o json [server_ID] ``` -------------------------------- ### Get User Information Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves information about the current authenticated user or a specific user by their ID. Can output in JSON format. ```bash # Get current user information cherryctl user get # Get information about a specific user cherryctl user get 123 # Get user info in JSON format cherryctl user get -o json ``` -------------------------------- ### Server Power Operations with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Controls the power state of a server, including starting, stopping, rebooting, and resetting the BMC password. ```bash # Start a stopped server cherryctl server start 12345 # Stop a running server cherryctl server stop 12345 # Reboot a server cherryctl server reboot 12345 # Reset BMC password cherryctl server reset-bmc-password 12345 ``` -------------------------------- ### Get IP Address Details (Bash) Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ip_get.md Retrieves detailed information about a specific IP address using its ID. This command requires the IP address ID as an argument and supports various output formatting options inherited from parent commands. ```bash cherryctl ip get ID [flags] # Example: cherryctl ip get 30c15082-a06e-4c43-bfc3-252616b46eba ``` -------------------------------- ### Generate Shell Auto-Completion Scripts Source: https://context7.com/cherryservers/cherryctl/llms.txt Generates shell auto-completion scripts for bash, zsh, fish, and PowerShell to enhance CLI usability. These scripts can be sourced directly or installed permanently. ```bash # Generate bash completion source <(cherryctl completion bash) # Install bash completion permanently cherryctl completion bash > /etc/bash_completion.d/cherryctl # Generate zsh completion cherryctl completion zsh > "${fpath[1]}/_cherryctl" # Generate fish completion cherryctl completion fish > ~/.config/fish/completions/cherryctl.fish # Generate PowerShell completion cherryctl completion powershell > cherryctl.ps1 ``` -------------------------------- ### Delete Storage Command (Bash) Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_storage_delete.md Demonstrates the usage of the `cherryctl storage delete` command to remove a storage resource. It includes examples for both interactive deletion with confirmation and forceful deletion without confirmation. The command requires a storage ID as an argument. ```bash cherryctl storage delete ID [f] [flags] # Deletes the specified storage: cherryctl storage delete 12345 > ✔ Are you sure you want to delete storage 12345: y # Deletes a storage, skipping confirmation: cherryctl storage delete 12345 -f ``` -------------------------------- ### Retrieve SSH Key Details using cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ssh-key_get.md This command retrieves the details of a specified SSH key using its unique identifier. It supports various output formats and configuration options inherited from parent commands. ```bash cherryctl ssh-key get ID [flags] # Example: cherryctl ssh-key get 12345 ``` -------------------------------- ### Reset Server BMC Password using cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_reset-bmc-password.md Resets the BMC password for a given server ID. The command requires the server ID as an argument and supports output formatting options. After resetting, the new password can be retrieved using the 'cherryctl server get' command. ```bash cherryctl server reset-bmc-password ID [flags] # Example: cherryctl server reset-bmc-password 12345 # Retrieve new password: cherryctl server get 12345 -o json | jq .bmc ``` -------------------------------- ### Deploy a New Server with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Provisions a new server instance with specified plan, image, region, and hostname. Requires placeholders for plan, image, region slugs, and hostname. ```shell cherryctl server create --plan [plan_slug] --image [os_slug] --region [region_slug] --hostname [hostname] ``` -------------------------------- ### List Available Plans with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Lists all available server plans on Cherry Servers stock. Note that only hourly and spot billing cycles can be ordered via CLI; fixed-term plans require the Client Portal. ```shell cherryctl plan list ``` -------------------------------- ### Create Server with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Provisions a new server with various configuration options. Supports specifying plan, hostname, image, region, SSH keys, spot instances, user data, OS partitions, attached storage, IP addresses, and tags. ```bash # Create a basic bare metal server cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname staging-server-1 \ --image ubuntu_24_04 \ --region LT-Siauliai # Create server with SSH keys cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname web-server \ --image ubuntu_24_04 \ --region LT-Siauliai \ --ssh-keys 111,222,333 # Create a spot instance (cost-effective) cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname batch-worker \ --image ubuntu_24_04 \ --region LT-Siauliai \ --spot-instance # Create server with custom OS partition and userdata cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname app-server \ --image ubuntu_24_04 \ --region LT-Siauliai \ --os-partition-size 100 \ --userdata-file /path/to/cloud-init.yaml # Create server with attached storage and pre-assigned IPs cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname database-server \ --image ubuntu_24_04 \ --region LT-Siauliai \ --storage-id 98765 \ --ip-addresses "uuid-1,uuid-2" # Create server with tags cherryctl server create -p 123456 \ --plan e5_1620v4 \ --hostname prod-api \ --image ubuntu_24_04 \ --region LT-Siauliai \ --tags "env=production,team=backend" ``` -------------------------------- ### Use cherryctl with a Specific Context Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Demonstrates how to use cherryctl commands with a non-default context. This allows managing multiple configurations for different teams or projects. ```shell cherryctl servers list --context ``` -------------------------------- ### Create Server Backup Storage (CLI) Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_backup_create.md This command creates a backup storage for a specified server. It requires server identification (ID or hostname), a backup plan, and a region. Optional parameters include project ID and an SSH key. ```bash cherryctl backup create {--server-id | --server-hostname } --plan --region [-p ] [--ssh-key ] [flags] ``` ```bash # Create backup storage with 100GB of space in the LT-Siauliai location for the server with hostname "delicate-zebra": cherryctl backup create --server-hostname delicate-zebra --plan backup_100 --region LT-Siauliai --project-id 123 ``` -------------------------------- ### List Available Backup Plans Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of available backup storage plans and their associated pricing. Can output in JSON format. ```bash # List available backup plans cherryctl backup plans # Get backup plans in JSON format cherryctl backup plans -o json ``` -------------------------------- ### List Cherry Ctl Server Plans Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves available server plans, including pricing and stock information for bare metal, virtual, and VPS options with hourly billing. Supports filtering by team, region, and plan type, with JSON output. ```bash # List all available server plans cherryctl plan list # List plans with team-specific pricing cherryctl plan list -t 12345 # Filter by region cherryctl plan list --region LT-Siauliai # Filter by plan type (baremetal, virtual, vps) cherryctl plan list --type baremetal # Get plans in JSON format cherryctl plan list -t 12345 -o json ``` -------------------------------- ### List Images for a Specific Plan with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Retrieves a list of available operating system images for a given server plan. Requires the plan slug obtained from `cherryctl plan list`. ```shell cherryctl image list --plan [plan_slug] ``` -------------------------------- ### Initialize cherryctl Authentication Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Initializes the cherryctl CLI by prompting for Cherry Servers API tokens, Team ID, and Project ID. This creates a configuration file, typically located at ~/.config/cherry/default.yaml. ```shell $ cherryctl init Cherry Servers API Tokens can be obtained through the portal at https://portal.cherryservers.com/. Token (hidden): Team ID []: 12345 Project ID []: 123456 Writing configuration to: /Users/username/.config/cherry/default.yaml ``` -------------------------------- ### Reinstall Server with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Reinstalls a server with a new operating system, allowing configuration of hostname, password, SSH keys, OS partition size, and user data. ```bash # Reinstall server with new OS cherryctl server reinstall 12345 \ --hostname staging-server-1 \ --image ubuntu_24_04 \ --password "SecureP@ssw0rd123" # Reinstall with SSH keys and custom partition cherryctl server reinstall 12345 \ --hostname staging-server-1 \ --image debian_12_amd64 \ --password "SecureP@ssw0rd123" \ --ssh-keys 111,222 \ --os-partition-size 50 # Reinstall with userdata for cloud-init cherryctl server reinstall 12345 \ --hostname staging-server-1 \ --image ubuntu_24_04 \ --password "SecureP@ssw0rd123" \ --userdata-file /path/to/setup.yaml ``` -------------------------------- ### List Available Regions with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Displays information about the available deployment regions for Cherry Servers infrastructure. ```shell cherryctl region list ``` -------------------------------- ### List Cherry Ctl Images for a Plan Source: https://context7.com/cherryservers/cherryctl/llms.txt Fetches operating system images compatible with a specific server plan. Different plans support a distinct set of images. Output can be formatted as JSON. ```bash # List images available for a specific plan cherryctl image list --plan e5_1620v4 # Get images in JSON format cherryctl image list --plan e5_1620v4 -o json ``` -------------------------------- ### List All Backups in Project Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of all backup storages within a project. Supports JSON output for easier parsing. ```bash # List all backups cherryctl backup list -p 123456 # Get backup list in JSON format cherryctl backup list -p 123456 -o json ``` -------------------------------- ### List Active Servers with Cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Retrieves and displays a list of all currently active server instances associated with the user's account. ```shell cherryctl server list ``` -------------------------------- ### cherryctl Team Create Command Options Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_team_create.md Lists the available options for the 'cherryctl team create' command, including required fields like name and type, and optional fields like currency. ```bash --currency string Team currency, available otions: EUR, USD. -h, --help help for create --name string Team name. --type string Team type, available options: personal, business. ``` -------------------------------- ### Create Project Command Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_project_create.md This snippet shows the command-line syntax for creating a project. It requires the team ID and project name, with an optional flag for BGP support. Dependencies include the cherryctl CLI tool. ```bash cherryctl project create -t --name [--bgp ] [flags] ``` -------------------------------- ### Create Cherry Ctl Project Source: https://context7.com/cherryservers/cherryctl/llms.txt Enables the creation of new projects within a team to organize resources like servers and IPs. Supports enabling BGP support during project creation. Includes commands to list projects and retrieve project details. ```bash # Create a basic project cherryctl project create -t 12345 --name "Production Environment" # Create a project with BGP support enabled cherryctl project create -t 12345 --name "Project with BGP" --bgp # List projects in a team cherryctl project list -t 12345 # Get project details cherryctl project get 123456 ``` -------------------------------- ### Create Storage Volume Source: https://context7.com/cherryservers/cherryctl/llms.txt Creates a new Elastic Block Storage volume. Supports specifying size in GB and a region. An optional description can be provided. ```bash # Create a 500GB storage volume cherryctl storage create -p 123456 --size 500 --region LT-Siauliai # Create storage with description cherryctl storage create -p 123456 \ --size 1000 \ --region LT-Siauliai \ --description "Database storage volume" ``` -------------------------------- ### Cherry Ctl Configuration Management Source: https://context7.com/cherryservers/cherryctl/llms.txt Demonstrates how to use custom configuration directories and environment variables to manage Cherry Ctl settings, including overriding the token for secure authentication. ```bash # Use custom configuration directory export CHERRY_CONFIG=/path/to/config cherryctl server list # Override token via environment variable export CHERRY_AUTH_TOKEN="your-api-token" cherryctl server list ``` -------------------------------- ### Reinstall Server Command Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_reinstall.md This command reinstalls a specified server. It requires the server ID and essential parameters such as hostname, image slug, and password. Optional parameters allow for advanced configuration like SSH keys, OS partition size, userdata, and iPXE files. ```bash cherryctl server reinstall ID --hostname --image --password [--ssh-keys ] [--os-partition-size ] [--userdata-file ] [--ipxe-file ] [flags] ``` -------------------------------- ### List Storage by Project ID (CLI) Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_storage_list.md Retrieves a list of storage resources for a given project ID using the cherryctl CLI. Requires the project ID as an argument. Supports optional flags for help, output format, and API configuration. ```bash cherryctl storage list -p [flags] # Example: cherryctl storage list -p 12345 ``` -------------------------------- ### Enter Server Rescue Mode (CLI) Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_enter-rescue.md This command puts a specified server into rescue mode. It requires the server ID and a password. Optional flags can override the default API endpoint, specify a configuration file, set a custom context, select output fields, define the output format, and provide an API token. ```bash cherryctl server enter-rescue ID --password [flags] # Example: cherryctl server enter-rescue 12345 --password abcdef ``` -------------------------------- ### Create Team Command Syntax Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_team_create.md This snippet shows the command-line syntax for creating a team using cherryctl. It requires a team name and type, with an optional currency code. ```bash cherryctl team create --name --type [--currency ] [flags] ``` -------------------------------- ### List Storage Volumes Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of all storage volumes within a project. Can output in JSON format for programmatic use. ```bash # List all storage volumes cherryctl storage list -p 123456 # Get storage list in JSON format cherryctl storage list -p 123456 -o json ``` -------------------------------- ### List Server Billing Cycles with cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_list-cycles.md Retrieves a list of possible server billing cycles using the cherryctl command-line tool. This command does not require any specific inputs beyond optional flags. ```bash cherryctl server list-cycles ``` -------------------------------- ### List Teams using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_team_list.md This snippet demonstrates how to use the cherryctl command-line interface to list available teams. It shows the basic command and how to specify output format and API endpoint. ```bash cherryctl team list cherryctl team list -o json --api-url https://api.cherryservers.com/v1/ ``` -------------------------------- ### List Backup Storages using cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_backup_list.md Retrieves a list of backup storages for a given project. Requires the cherryctl CLI tool. Accepts a project ID and can be filtered by various output formats. ```bash cherryctl backup list -p 12345 ``` -------------------------------- ### List Servers with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of servers within a project. Supports filtering by hostname or IP, outputting in JSON format, and selecting specific fields. ```bash # List all servers in a project cherryctl server list -p 123456 # Search servers by hostname or IP cherryctl server list -p 123456 --search "staging" # Get server list in JSON format cherryctl server list -p 123456 -o json # Get specific fields only cherryctl server list -p 123456 --fields id,hostname,status,region ``` -------------------------------- ### Attach Storage Volume to Server Source: https://context7.com/cherryservers/cherryctl/llms.txt Attaches a storage volume to a server, making it available as additional disk space. Supports attachment by server ID or hostname. ```bash # Attach storage to server by ID cherryctl storage attach 98765 --server-id 12345 # Attach storage to server by hostname cherryctl storage attach 98765 --server-hostname staging-server-1 -p 123456 ``` -------------------------------- ### Upgrade Virtual Server using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_upgrade.md This snippet demonstrates how to upgrade the plan of a virtual server using the cherryctl command-line interface. It requires the server ID and the desired new plan slug. Optional flags can be used to override the API endpoint, specify the output format, and more. ```bash cherryctl server upgrade ID --plan [flags] # Example: cherryctl server upgrade 12345 --plan B1-2-2gb-40s-shared ``` -------------------------------- ### Retrieve Backup Methods using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_backup_methods.md This command retrieves a list of available backup access methods for a specified backup ID. It is part of the cherryctl CLI tool for managing server backups. No specific programming language is directly involved in this CLI usage, but it interacts with a backend API. ```bash cherryctl backup methods [flags] ``` ```bash # Retrieves a list of backup storage methods: cherryctl backup methods 123 ``` -------------------------------- ### List Cherry Ctl Regions Source: https://context7.com/cherryservers/cherryctl/llms.txt Command to list all available regions for provisioning servers, IPs, and storage within the Cherry Servers platform. Supports JSON output for scripting purposes. ```bash # List all available regions cherryctl region list # Get regions in JSON format for scripting cherryctl region list -o json ``` -------------------------------- ### Retrieve Backup Methods Whitelist using cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_backup_methods-whitelist.md This command retrieves a list of backup storage methods that are whitelisted for a specific backup ID. It requires the backup ID as an argument and can be further customized with various flags for output formatting and API configuration. ```bash cherryctl backup methods-whitelist [flags] # Example: cherryctl backup methods-whitelist 123 ``` -------------------------------- ### List Projects using cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_project_list.md This snippet demonstrates how to use the cherryctl command-line interface to list projects associated with a specific team. It requires a team ID as input and supports various output formats and configuration options. ```bash cherryctl project list -t [flags] # Example: cherryctl project list -t 12345 ``` -------------------------------- ### List Server Plans with cherryctl Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_plan_list.md Retrieves a list of available server plans from CherryServers. This command can filter plans by team ID, region slug, and plan type. It displays hourly rates and stock volumes. Dependencies include the cherryctl CLI tool. Input is command-line arguments, and output is typically a table or JSON. ```bash cherryctl plan list -t [--region-id ] [--type ] [flags] # Example: cherryctl plans list ``` -------------------------------- ### List IPs in JSON Format Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of IP addresses associated with a project in JSON format. This is useful for programmatic access and integration with other tools. ```bash cherryctl ip list -p 123456 -o json ``` -------------------------------- ### Cherry Ctl Global Options Source: https://context7.com/cherryservers/cherryctl/llms.txt Details on global options available for all cherryctl commands, such as overriding the API endpoint, specifying a custom configuration directory, using named contexts, filtering output fields, changing output formats (JSON, YAML, table), and passing tokens directly. ```bash # Override the default API endpoint cherryctl server list --api-url "https://custom-api.cherryservers.com/v1/" # Specify custom configuration directory cherryctl server list --config /path/to/config # Use a specific context cherryctl server list --context production # Filter output fields cherryctl server list --fields id,hostname,status # Change output format (table, json, yaml) cherryctl server list -o json cherryctl server get 12345 -o yaml # Pass token directly cherryctl server list --token "your-api-token" ``` -------------------------------- ### cherryctl ip assign Command Synopsis Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ip_assign.md The synopsis for the 'cherryctl ip assign' command outlines the required arguments and optional flags for assigning an IP address. It specifies how to target a server by hostname, ID, or an existing IP ID. ```bash cherryctl ip assign ID {--target-hostname | --target-id | --target-ip-id } [-p ] [flags] ``` -------------------------------- ### Create Cherry Ctl SSH Key Source: https://context7.com/cherryservers/cherryctl/llms.txt Allows adding SSH public keys to an account for server access. Keys can be associated with servers during provisioning. Includes commands to list all SSH keys and retrieve specific key details. ```bash # Add an SSH key to your account cherryctl ssh-key create --key "ssh-rsa AAAAB3N...user@domain.com" --label my-laptop-key # List all SSH keys cherryctl ssh-key list # Get SSH key details cherryctl ssh-key get 12345 ``` -------------------------------- ### Enable Bash Shell Auto-completion Source: https://github.com/cherryservers/cherryctl/blob/master/README.md Enables shell auto-completion for cherryctl in bash. The first command enables it for the current session, while the second command makes it persistent by placing a script in the bash completion directory. ```shell source <(cherryctl completion bash) cherryctl completion bash > /etc/bash_completion.d/cherry-autocomplete.sh ``` -------------------------------- ### Create Cherry Ctl Team Source: https://context7.com/cherryservers/cherryctl/llms.txt Command to create a new team for organizing projects and managing billing. Supports specifying team name, type (personal/business), and currency (EUR/USD). ```bash # Create a business team with USD currency cherryctl team create --name "My Business Team" --type business --currency USD # Create a personal team with EUR currency cherryctl team create --name "Personal Team" --type personal --currency EUR ``` -------------------------------- ### cherryctl ip assign Options Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ip_assign.md This section lists the available options for the 'cherryctl ip assign' command. It includes flags for specifying the target server by hostname, ID, or IP ID, as well as an option for the project ID. ```bash -h, --help help for assign -p, --project-id int The project's ID. --target-hostname string The hostname of the server to assign IP to. --target-id int The ID of the server to assign IP to. --target-ip-id string Subnet or primary-ip type IP ID to route IP to. ``` -------------------------------- ### Delete Server with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Removes a server from your project. Supports a force flag to bypass confirmation prompts. ```bash # Delete server with confirmation prompt cherryctl server delete 12345 # ✔ Are you sure you want to delete server 12345: y # Delete server without confirmation cherryctl server delete 12345 -f ``` -------------------------------- ### Update Server Command Synopsis Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_update.md Provides the general syntax for updating a server using cherryctl. It outlines the required server ID and optional parameters for name, hostname, tags, and BGP enablement. ```bash cherryctl server update ID [--name ] [--hostname ] [--tags ] [--bgp] [flags] ``` -------------------------------- ### Project Update Command Options Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_project_update.md This snippet lists the specific options available for the 'cherryctl project update' command. It includes flags for enabling BGP, setting the project name, and accessing help. ```bash -b, --bgp True to enable BGP in a project. -h, --help help for update --name string Project name. -p, --project-id int The project's ID. ``` -------------------------------- ### List Servers Command - CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_list.md This command retrieves a list of servers associated with a specific project ID. It supports filtering by hostname or public IP and allows output customization. ```bash cherryctl server list -p [flags] # Example: cherryctl server list -p 12345 ``` -------------------------------- ### Create Floating IP with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Creates a floating IP address that can be assigned to servers or routed. Supports specifying region, target server by ID or hostname, DNS records, and tags. ```bash # Create a basic floating IP cherryctl ip create -p 123456 --region LT-Siauliai # Create floating IP and assign to server cherryctl ip create -p 123456 \ --region LT-Siauliai \ --target-id 12345 # Create floating IP and assign by hostname cherryctl ip create -p 123456 \ --region LT-Siauliai \ --target-hostname staging-server-1 # Create floating IP with DNS records cherryctl ip create -p 123456 \ --region LT-Siauliai \ --ptr-record "server.example.com" \ --a-record "myapp" # Create floating IP with tags cherryctl ip create -p 123456 \ --region LT-Siauliai \ --tags "env=production,service=api" ``` -------------------------------- ### cherryctl server enter-rescue Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_enter-rescue.md Enables rescue mode for a specified server. This command requires the server ID and a password for the rescue environment. ```APIDOC ## POST /servers/{ID}/rescue ### Description Enters the specified server into rescue mode. This is useful for system recovery and maintenance. ### Method POST ### Endpoint `/servers/{ID}/rescue` ### Parameters #### Path Parameters - **ID** (string) - Required - The unique identifier of the server. #### Query Parameters - **password** (string) - Required - The password for accessing the rescue environment. #### Request Body This endpoint does not require a request body. ### Request Example ```bash cherryctl server enter-rescue 12345 --password abcdef ``` ### Response #### Success Response (200 OK) - **message** (string) - A confirmation message indicating the server has been put into rescue mode. #### Response Example ```json { "message": "Server 12345 has been successfully put into rescue mode." } ``` #### Error Response - **400 Bad Request**: If the server ID is invalid or the password is not provided. - **404 Not Found**: If the server with the specified ID does not exist. - **500 Internal Server Error**: If there was an issue on the server-side. ``` -------------------------------- ### List IP Addresses with Cherryctl Source: https://context7.com/cherryservers/cherryctl/llms.txt Retrieves a list of all IP addresses within a project. Supports filtering by IP type, such as 'floating-ip', 'subnet', or 'primary-ip'. ```bash # List all IPs in a project cherryctl ip list -p 123456 # Filter by IP type cherryctl ip list -p 123456 --type floating-ip cherryctl ip list -p 123456 --type subnet,primary-ip ``` -------------------------------- ### Update Server Options Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_update.md Lists the available options for the cherryctl server update command. These include flags for enabling BGP, specifying server hostname, name, and tags. ```bash -b, --bgp True to enable BGP in a server. -h, --help help for update --hostname string Server hostname. --name string Server name. --tags strings Tag or list of tags for the server: --tags="key=value,env=prod". ``` -------------------------------- ### Inherited Options for Server Update Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_server_update.md Details options inherited from parent commands that can be used with cherryctl server update. These include API URL override, configuration path, context specification, output formatting, and API token. ```bash --api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/") --config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well. --context string Specify a custom context name (default "default") --fields strings Comma separated object field names to output in result. Fields can be used for list and get actions. -o, --output string Output format (*table, json, yaml) --token string API Token (CHERRY_AUTH_TOKEN) ``` -------------------------------- ### Create SSH Key with cherryctl CLI Source: https://github.com/cherryservers/cherryctl/blob/master/docs/cherryctl_ssh-key_create.md This command adds an SSH public key to the current user's account on CherryServers. It requires the public key string and a label for identification. Optional flags can override the API URL, specify output format, and more. ```bash cherryctl ssh-key create --key --label