Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,18 @@
"group": "CLI Reference",
"pages": [
"/phala-cloud/references/phala-cloud-cli/phala/overview",
"/phala-cloud/references/phala-cloud-cli/phala/auth",
"/phala-cloud/references/phala-cloud-cli/phala/login",
"/phala-cloud/references/phala-cloud-cli/phala/logout",
"/phala-cloud/references/phala-cloud-cli/phala/status",
"/phala-cloud/references/phala-cloud-cli/phala/deploy",
"/phala-cloud/references/phala-cloud-cli/phala/cvms",
"/phala-cloud/references/phala-cloud-cli/phala/ssh",
"/phala-cloud/references/phala-cloud-cli/phala/cp",
"/phala-cloud/references/phala-cloud-cli/phala/docker",
"/phala-cloud/references/phala-cloud-cli/phala/simulator",
"/phala-cloud/references/phala-cloud-cli/phala/ssh"
"/phala-cloud/references/phala-cloud-cli/phala/nodes",
"/phala-cloud/references/phala-cloud-cli/phala/config",
"/phala-cloud/references/phala-cloud-cli/phala/auth"
]
},
"/phala-cloud/references/migration-from-dstack-v03"
Expand Down
88 changes: 21 additions & 67 deletions phala-cloud/references/phala-cloud-cli/phala/auth.mdx
Original file line number Diff line number Diff line change
@@ -1,89 +1,43 @@
---
description: Deploy confidential applications with Phala Cloud's managed TEE infrastructure.
title: auth
title: "auth (Deprecated)"
description: "Authenticate with Phala Cloud"
---

<Warning>
This command is deprecated. Use `phala login`, `phala logout`, and `phala status` instead.
</Warning>

## Command: `auth`
## Command: `phala auth`

#### Syntax
### Syntax

```
phala auth [options] [command]
phala auth <command> [options]
```

### Description

The `phala auth` command is used to authenticate a user's API key to manage their Phala Cloud account.
Authenticate with Phala Cloud

```bash
Usage: phala auth [options] [command]
### Options

Authenticate with Phala Cloud
| Option | Description |
| ------ | ----------- |
| `-h, --help` | Show help information for the current command |
| `-v, --version` | Show CLI version |

Options:
-h, --help display help for command
### Deprecated Subcommands

Commands:
login [api-key] Set the API key for authentication
logout Remove the stored API key
status [options] Check authentication status
help [command] display help for command
```
| Command | Description |
| ------- | ----------- |
| `login` | Authenticate with Phala Cloud (use 'phala login' instead) |
| `logout` | Remove the stored API key (use 'phala logout' instead) |
| `status` | Check authentication status (use 'phala status' instead) |

### Examples

* Display help
* Display help:

```bash
phala auth --help
```

* Login to Phala Cloud with API Key

```bash
phala auth login <your-api-key>
```

* Login to Phala Cloud with user prompt

```bash
phala auth login
? Enter your API key: › *********************
```

* Get Status of Login

```bash
phala auth status
```

<details>

<summary>Example Output</summary>

```bash
⟳ Checking authentication status... ✓

✓ Authenticated as bitsbender
╭────────────┬─────────────────────────────────╮
├────────────┼─────────────────────────────────┤
│ Username │ bitsbender │
├────────────┼─────────────────────────────────┤
│ Email │ [email protected]
├────────────┼─────────────────────────────────┤
│ Role │ user │
├────────────┼─────────────────────────────────┤
│ Team │ bitsbender's projects (free) │
├────────────┼─────────────────────────────────┤
│ Credits │ $20 │
╰────────────┴─────────────────────────────────╯
```

</details>

* Logout of Phala Cloud

```bash
phala auth logout
```
39 changes: 39 additions & 0 deletions phala-cloud/references/phala-cloud-cli/phala/config.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "config"
description: "Manage your local configuration"
---

## Command: `phala config`

### Syntax

```
phala config <command> [options]
```

### Description

Manage your local configuration

### Options

| Option | Description |
| ------ | ----------- |
| `-h, --help` | Show help information for the current command |
| `-v, --version` | Show CLI version |

### Subcommands

| Command | Description |
| ------- | ----------- |
| `get` | Get a configuration value |
| `list` | List all configuration values |
| `set` | Set a configuration value |

### Examples

* Display help:

```bash
phala config --help
```
85 changes: 85 additions & 0 deletions phala-cloud/references/phala-cloud-cli/phala/cp.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: "cp"
description: "Copy files to/from a CVM via SCP"
---

<Note>
This command is marked as unstable and may change in future releases.
</Note>

## Command: `phala cp`

### Syntax

```
phala cp [options] <source> <destination>
```

### Description

Copy files to/from a CVM via SCP

### Arguments

| Argument | Description |
| -------- | ----------- |
| `<source>` | Source path. Local file or remote in format 'cvm-name:path'. Use ':path' to read cvm_id from phala.toml |
| `<destination>` | Destination path. Local file or remote in format 'cvm-name:path'. Use ':path' to read cvm_id from phala.toml |

### Options

| Option | Description |
| ------ | ----------- |
| `-h, --help` | Show help information for the current command |
| `-v, --version` | Show CLI version |
| `-i, --identity <value>` | SSH identity file (private key) |
| `-p, --port <value>` | SSH port. Priority: CLI option > phala.toml gateway_port > 443 |
| `-g, --gateway <value>` | Gateway domain. Priority: CLI option > phala.toml gateway_domain > API. When specified, skips API call for offline usage |
| `-r, --recursive` | Recursively copy directories |
| `-v, --verbose` | Show verbose SCP details |
| `--dry-run` | Print the SCP command without executing it |

### Examples

* Upload using phala.toml cvm_id

```bash
phala cp ./local.txt :/root/remote.txt
```

* Upload to a specific CVM (queries API for gateway)

```bash
phala cp ./local.txt app_123:/root/remote.txt
```

* Download from CVM

```bash
phala cp app_123:/root/remote.txt ./local.txt
```

* Offline mode: copy without API (using phala.toml gateway)

```bash
phala cp -g dstack-prod5.phala.network -p 16185 ./file.txt app_123:/root/
```

* Upload directory recursively

```bash
phala cp -r ./local_dir app_123:/root/remote_dir
```

* Copy with custom SSH key

```bash
phala cp -i ~/.ssh/custom_key app_123:/root/file.txt ./file.txt
```

* Print the SCP command without executing

```bash
phala cp ./local.txt app_123:/root/remote.txt --dry-run
```

Loading