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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "steel-cli"
version = "0.5.0-preview.5"
version = "0.5.0-preview.6"
edition = "2024"
description = "Steel CLI - Browser automation for AI agents"
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Supported shells: `bash`, `zsh`, `fish`, `powershell`, `elvish`.
| Local runtime | `dev install`, `dev start`, `dev stop` |
| Credentials | `credentials list`, `credentials create`, `credentials update`, `credentials delete` |
| Cloud computers | `computer create`, `computer exec`, `computer ssh`, `computer list`, `computer use` |
| Secrets | `secret list`, `secret create`, `secret get`, `secret update`, `secret delete` |
| Environments | `environment list`, `environment create`, `environment update`, `environment delete` |
| Account and utility | `login`, `logout`, `config`, `doctor`, `cache`, `update`, `completion` |

Full flags and schemas: [CLI reference](docs/cli-reference.md).
Expand Down
280 changes: 279 additions & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Steel CLI - browser automation for AI agents. This file is generated from `steel
- [steel computer delete](#steel-computer-delete)
- [steel computer pause](#steel-computer-pause)
- [steel computer resume](#steel-computer-resume)
- [steel computer stop](#steel-computer-stop)
- [steel computer start](#steel-computer-start)
- [steel computer restart](#steel-computer-restart)
- [steel computer use](#steel-computer-use)
- [steel computer exec](#steel-computer-exec)
- [steel computer ssh](#steel-computer-ssh)
Expand All @@ -108,6 +111,18 @@ Steel CLI - browser automation for AI agents. This file is generated from `steel
- [steel checkpoint get](#steel-checkpoint-get)
- [steel checkpoint delete](#steel-checkpoint-delete)
- [steel checkpoint restore](#steel-checkpoint-restore)
- [steel secret](#steel-secret)
- [steel secret list](#steel-secret-list)
- [steel secret create](#steel-secret-create)
- [steel secret get](#steel-secret-get)
- [steel secret update](#steel-secret-update)
- [steel secret delete](#steel-secret-delete)
- [steel environment](#steel-environment)
- [steel environment list](#steel-environment-list)
- [steel environment create](#steel-environment-create)
- [steel environment get](#steel-environment-get)
- [steel environment update](#steel-environment-update)
- [steel environment delete](#steel-environment-delete)
- [steel init](#steel-init)
- [steel login](#steel-login)
- [steel logout](#steel-logout)
Expand Down Expand Up @@ -1554,6 +1569,9 @@ steel computer
- `delete`: Delete a computer
- `pause`: Pause a running computer
- `resume`: Resume a paused computer
- `stop`: Stop a computer but keep its disk
- `start`: Start a stopped computer
- `restart`: Reboot a running computer
- `use`: Remember a computer as the default for other commands
- `exec`: Run one command in a computer
- `ssh`: Open an SSH session to a computer
Expand All @@ -1577,6 +1595,11 @@ steel computer create
- `--memory` (string, optional): Memory in MiB
- `--timeout` (string, optional): Stop the computer after this many seconds of running time
- `--auto-pause` (boolean, optional): Pause instead of stopping when the timeout is reached
- `--idle-timeout` (string, optional): Pause after this many seconds without incoming traffic (0 disables it)
- `--env` (string[], optional): Environment variable for the computer, repeatable
- `--secret` (string[], optional): Attach a stored secret as an environment variable, repeatable
- `--environment` (string, optional): Start from an environment; its spec and secrets apply unless overridden here
- `--project` (string, optional): Project to create the computer in (defaults to the API key's project)
- `--wait` (boolean, optional): Wait until the computer is running
- `--use` (boolean, optional): Make the new computer the default for other commands

Expand Down Expand Up @@ -1645,7 +1668,52 @@ steel computer resume
### Parameters

- `computer_id` (string, optional): Computer ID (defaults to STEEL_COMPUTER_ID or `steel computer use`)
- `--wait` (boolean, optional): Wait until the computer is running
- `--wait` (boolean, optional): Wait until the computer reaches its new state

## steel computer stop

Stop a computer but keep its disk

### Usage

```bash
steel computer stop
```

### Parameters

- `computer_id` (string, optional): Computer ID (defaults to STEEL_COMPUTER_ID or `steel computer use`)
- `--wait` (boolean, optional): Wait until the computer reaches its new state

## steel computer start

Start a stopped computer

### Usage

```bash
steel computer start
```

### Parameters

- `computer_id` (string, optional): Computer ID (defaults to STEEL_COMPUTER_ID or `steel computer use`)
- `--wait` (boolean, optional): Wait until the computer reaches its new state

## steel computer restart

Reboot a running computer

### Usage

```bash
steel computer restart
```

### Parameters

- `computer_id` (string, optional): Computer ID (defaults to STEEL_COMPUTER_ID or `steel computer use`)
- `--wait` (boolean, optional): Wait until the computer reaches its new state

## steel computer use

Expand Down Expand Up @@ -1803,9 +1871,219 @@ steel checkpoint restore
- `checkpoint_id` (string, required): Checkpoint ID
- `--timeout` (string, optional): Stop the computer after this many seconds of running time
- `--auto-pause` (boolean, optional): Pause instead of stopping when the timeout is reached
- `--idle-timeout` (string, optional): Pause after this many seconds without incoming traffic (0 disables it)
- `--wait` (boolean, optional): Wait until the computer is running
- `--use` (boolean, optional): Make the new computer the default for other commands

## steel secret

Secrets for computers: list, create, update, delete

### Usage

```bash
steel secret
```

### Subcommands

- `list`: List secrets
- `create`: Store a new secret
- `get`: Get one secret's metadata
- `update`: Rename a secret or replace its value
- `delete`: Delete a secret

## steel secret list

List secrets

### Usage

```bash
steel secret list
```

### Parameters

- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel secret create

Store a new secret

### Usage

```bash
steel secret create
```

### Parameters

- `name` (string, required): Secret name, also the environment variable name inside computers
- `--value` (string, optional): The secret value
- `--value-stdin` (boolean, optional): Read the secret value from stdin
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel secret get

Get one secret's metadata

### Usage

```bash
steel secret get
```

### Parameters

- `secret_id` (string, required): Secret ID
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel secret update

Rename a secret or replace its value

### Usage

```bash
steel secret update
```

### Parameters

- `secret_id` (string, required): Secret ID
- `--name` (string, optional): New name
- `--value` (string, optional): New value
- `--value-stdin` (boolean, optional): Read the new value from stdin
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel secret delete

Delete a secret

### Usage

```bash
steel secret delete
```

### Parameters

- `secret_id` (string, required): Secret ID
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel environment

Reusable computer environments: a spec plus secrets

### Usage

```bash
steel environment
```

### Subcommands

- `list`: List environments
- `create`: Create an environment
- `get`: Get one environment
- `update`: Change an environment's name, spec or secrets
- `delete`: Delete an environment

## steel environment list

List environments

### Usage

```bash
steel environment list
```

### Parameters

- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel environment create

Create an environment

### Usage

```bash
steel environment create
```

### Parameters

- `name` (string, required): Environment name
- `--template` (string, optional): Template name
- `--vcpu` (string, optional): Number of vCPUs
- `--memory` (string, optional): Memory in MiB
- `--disk` (string, optional): Disk in MiB
- `--timeout` (string, optional): Stop computers after this many seconds of running time
- `--auto-pause` (boolean, optional): Pause instead of stopping when the timeout is reached
- `--env` (string[], optional): Environment variable for computers, repeatable
- `--secret` (string[], optional): Attach a stored secret as an environment variable, repeatable
- `--secret-value` (string[], optional): Store a new secret and attach it, repeatable
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel environment get

Get one environment

### Usage

```bash
steel environment get
```

### Parameters

- `environment_id` (string, required): Environment ID
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel environment update

Change an environment's name, spec or secrets

### Usage

```bash
steel environment update
```

### Parameters

- `environment_id` (string, required): Environment ID
- `--name` (string, optional): New name
- `--template` (string, optional): Template name
- `--vcpu` (string, optional): Number of vCPUs
- `--memory` (string, optional): Memory in MiB
- `--disk` (string, optional): Disk in MiB
- `--timeout` (string, optional): Stop computers after this many seconds of running time
- `--auto-pause` (boolean, optional): Pause instead of stopping when the timeout is reached
- `--env` (string[], optional): Environment variable for computers, repeatable
- `--secret` (string[], optional): Attach a stored secret as an environment variable, repeatable
- `--secret-value` (string[], optional): Store a new secret and attach it, repeatable
- `--unset-secret` (string[], optional): Detach a secret, repeatable
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel environment delete

Delete an environment

### Usage

```bash
steel environment delete
```

### Parameters

- `environment_id` (string, required): Environment ID
- `--project` (string, optional): Project to use (defaults to the API key's project)

## steel init

One-command onboarding: login + verify + install agent skills
Expand Down
21 changes: 21 additions & 0 deletions src/api/computers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pub struct CreateComputer {
pub auto_pause: Option<bool>,
pub idle_timeout_seconds: Option<u32>,
pub env: BTreeMap<String, String>,
pub secrets: BTreeMap<String, String>,
pub environment_id: Option<String>,
pub project_id: Option<String>,
}

impl CreateComputer {
Expand All @@ -45,6 +48,15 @@ impl CreateComputer {
if !self.env.is_empty() {
body["env"] = json!(self.env);
}
if !self.secrets.is_empty() {
body["secrets"] = json!(self.secrets);
}
if let Some(environment) = &self.environment_id {
body["environmentId"] = json!(environment);
}
if let Some(project) = &self.project_id {
body["projectId"] = json!(project);
}
body
}
}
Expand Down Expand Up @@ -270,6 +282,12 @@ mod tests {
auto_pause: Some(true),
idle_timeout_seconds: Some(90),
env: BTreeMap::from([("TOKEN".into(), "abc".into())]),
secrets: BTreeMap::from([(
"API_KEY".into(),
"2f1b6f2e-2c6f-4d9a-9c2a-8f4c1e0d7b31".into(),
)]),
environment_id: Some("9b2d1c5e-1b2a-4c3d-8e4f-5a6b7c8d9e0f".into()),
project_id: Some("0c1d2e3f-4a5b-4c6d-8e7f-8091a2b3c4d5".into()),
};
assert_eq!(
full.body(),
Expand All @@ -281,6 +299,9 @@ mod tests {
"autoPause": true,
"idleTimeoutSeconds": 90,
"env": { "TOKEN": "abc" },
"secrets": { "API_KEY": "2f1b6f2e-2c6f-4d9a-9c2a-8f4c1e0d7b31" },
"environmentId": "9b2d1c5e-1b2a-4c3d-8e4f-5a6b7c8d9e0f",
"projectId": "0c1d2e3f-4a5b-4c6d-8e7f-8091a2b3c4d5",
})
);
}
Expand Down
Loading
Loading