# Quick Start

Get up and running in 3 steps.

## Step 1: Install

```bash
curl -fsSL https://raw.githubusercontent.com/AceCloudAI/ace-cli-releases/main/install.sh | bash
```

## Step 2: Configure

The recommended setup is the interactive `ace configure` wizard — it walks you through region, project, auth method, and credentials in one prompt sequence (modeled on `aws configure`):

```bash
ace configure
```

For long-lived automation, create an API key in the portal (**Settings > API Keys**, or `ace api-key create` once logged in) and pick *api-key* when the wizard asks. API keys last 90 days and don't need the 24-hour JWT refresh dance.

Alternatively, log in with a developer token directly:

```bash
ace auth login-token --token <your-developer-token>
```

The CLI verifies the credential before saving, then auto-configures your project and region.

## Step 3: Start Using

```bash
# See all your resources
ace get-all

# List instances
ace instance list

# List available flavors (instance sizes)
ace flavor list

# Check quotas
ace quota all
```

## Your First VM

```bash
# 1. Create a VPC with subnet
ace vpc create --name my-vpc --subnet-name my-subnet --subnet-cidr 10.0.0.0/24

# 2. Create a security group with SSH access
ace security-group create --name my-sg
ace sg rule-add --sg <sg-id> --protocol ssh

# 3. Create an SSH key pair
ace key-pair create --name my-key
# Save the private key output!

# 4. Launch the instance
ace instance create --name my-vm \
  --flavor C4i.medium \
  --image Ubuntu-24.04-LTS \
  --network <vpc-id> \
  --security-group <sg-id> \
  --key my-key

# 5. Check status
ace instance get <instance-id>

# 6. Get console access
ace instance console <instance-id>
```

## Your First K8s Cluster

```bash
# Check available versions
ace k8s cluster versions

# Create a cluster
ace k8s cluster create --name my-cluster \
  --version v1.32.6 \
  --flavor C4i.large \
  --worker-name pool1

# Get kubeconfig
ace k8s cluster kubeconfig my-cluster > ~/.kube/config

# Verify
kubectl get nodes
```

## Your First Container Deployment

```bash
# Deploy nginx with external access
ace deployment create --name my-app \
  --image nginx:latest \
  --cpu 0.5 --memory 512Mi \
  --external-access \
  --port http:HTTP:80:80

# Check status
ace deployment get my-app

# Scale up
ace deployment update my-app --replicas 3
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/cli/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
