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.3"
version = "0.5.0-preview.4"
edition = "2024"
description = "Steel CLI - Browser automation for AI agents"
license = "MIT"
Expand Down
1 change: 0 additions & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,6 @@ steel computer create
### Parameters

- `--template` (string, optional): Template name (defaults to the only one the API offers)
- `--region` (string, optional): Region, for example us-east
- `--vcpu` (string, optional): Number of vCPUs
- `--memory` (string, optional): Memory in MiB
- `--timeout` (string, optional): Stop the computer after this many seconds of running time
Expand Down
6 changes: 0 additions & 6 deletions src/api/computers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ pub fn computer_path(id: &str) -> String {
#[derive(Debug, Default, Clone)]
pub struct CreateComputer {
pub template: Option<String>,
pub region: Option<String>,
pub vcpu: Option<u32>,
pub memory_mib: Option<u32>,
pub timeout_seconds: Option<u32>,
Expand All @@ -24,9 +23,6 @@ impl CreateComputer {
if let Some(template) = &self.template {
body["template"] = json!(template);
}
if let Some(region) = &self.region {
body["region"] = json!(region);
}
if let Some(vcpu) = self.vcpu {
body["vcpu"] = json!(vcpu);
}
Expand Down Expand Up @@ -204,7 +200,6 @@ mod tests {

let full = CreateComputer {
template: Some("steel".into()),
region: Some("us-east".into()),
vcpu: Some(4),
memory_mib: Some(4096),
timeout_seconds: Some(600),
Expand All @@ -214,7 +209,6 @@ mod tests {
full.body(),
json!({
"template": "steel",
"region": "us-east",
"vcpu": 4,
"memoryMib": 4096,
"timeoutSeconds": 600,
Expand Down
17 changes: 4 additions & 13 deletions src/commands/computer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ pub struct CreateArgs {
#[arg(long)]
pub template: Option<String>,

/// Region, for example us-east
#[arg(long)]
pub region: Option<String>,

/// Number of vCPUs
#[arg(long)]
pub vcpu: Option<u32>,
Expand Down Expand Up @@ -208,7 +204,6 @@ async fn run_create(args: CreateArgs) -> Result<()> {
let client = SteelClient::new()?;
let request = CreateComputer {
template: args.template,
region: args.region,
vcpu: args.vcpu,
memory_mib: args.memory_mib,
timeout_seconds: args.timeout_seconds,
Expand Down Expand Up @@ -420,13 +415,12 @@ fn print_computers(data: &Value) {
println!("No computers.");
return;
}
let rows: Vec<[String; 6]> = computers
let rows: Vec<[String; 5]> = computers
.iter()
.map(|computer| {
[
computer["id"].as_str().unwrap_or("").to_string(),
status_of(computer).to_string(),
computer["region"].as_str().unwrap_or("-").to_string(),
computer["template"].as_str().unwrap_or("-").to_string(),
format!(
"{}/{}",
Expand All @@ -440,7 +434,7 @@ fn print_computers(data: &Value) {
]
})
.collect();
let header = ["ID", "STATUS", "REGION", "TEMPLATE", "VCPU/MIB", "SINCE"];
let header = ["ID", "STATUS", "TEMPLATE", "VCPU/MIB", "SINCE"];
let widths: Vec<usize> = (0..header.len())
.map(|column| {
rows.iter()
Expand All @@ -450,7 +444,7 @@ fn print_computers(data: &Value) {
.unwrap_or(0)
})
.collect();
let line = |cells: [&str; 6]| {
let line = |cells: [&str; 5]| {
cells
.iter()
.enumerate()
Expand All @@ -462,10 +456,7 @@ fn print_computers(data: &Value) {
};
println!("{}", line(header));
for row in &rows {
println!(
"{}",
line([&row[0], &row[1], &row[2], &row[3], &row[4], &row[5]])
);
println!("{}", line([&row[0], &row[1], &row[2], &row[3], &row[4]]));
}
}

Expand Down
Loading