Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI Commands

CLI Commands

Command Structure

All Cloudscript CLI commands follow this basic structure:

cloud [command] <path> [options]

Where:

  • command is one of: convert, plan, apply, destroy

  • path is either a file path or directory path

  • options are additional flags and parameters

cloud convert

Synopsis

cloud convert <path>

Description

Converts .cloud configuration files into standard infrastructure code, generating Terraform, Kubernetes, and Ansible configurations.

Path Requirements

  • If your .cloud file references external files (using file()), provide the directory containing both the .cloud file and referenced files

  • If no external files are referenced, you can provide either the .cloud file path or its containing directory

Behavior

  1. Validates the .cloud file syntax

  2. Creates/overwrites the IaC directory

  3. Generates:

    • Terraform configurations (main.tf.json)

    • Kubernetes manifests (resources.yml)

    • Ansible playbooks (playbook.yml)

  4. Pre-processes any file references

Warning

Converting will:

  1. Overwrite all existing content in the IaC directory

  2. Make previously deployed resources unmanageable via cloud destroy

Example

cloud plan

Synopsis

Description

Performs a comprehensive dry-run of your infrastructure deployment, analyzing all components:

  • Terraform plan for infrastructure changes

  • Kubernetes dry-run for container configurations

  • Ansible check mode for configuration management

Capabilities

  • Validates syntax and configuration

  • Detects potential deployment issues

  • Shows detailed change preview

  • Identifies missing dependencies

  • Validates network configurations

  • Checks security group settings

Example Output

cloud apply

Synopsis

Description

Deploys your infrastructure by executing:

  1. Terraform apply for cloud resources

  2. Kubernetes apply for container workloads

  3. Ansible playbook for configuration management

Features

  • Automatic SSH key management

  • Network access configuration

  • Security group management

  • Error handling

  • Progress tracking

Options

  • --auto-approve: Skip interactive approval

Important Notes

  • Requires appropriate cloud provider credentials

  • Handles both AWS and GCP deployments

  • Manages dependencies between components

  • Provides real-time deployment status

  • Supports rollback on failure

Example

cloud destroy

Synopsis

Description

Removes all deployed infrastructure components in the correct order:

  1. Removes container workloads

  2. Terminates cloud resources

  3. Cleans up associated configurations

Safety Features

  • Interactive confirmation required

  • Resource dependency checking

  • Staged deletion process

  • State verification

Options

  • --auto-approve: Skip confirmation prompt

Example

Warning

The destroy command will permanently remove all resources. Ensure you have:

  • Backed up any important data

  • Verified the correct path

  • Understood which resources will be removed

Last updated