Skip to content

Commit 2fb28d9

Browse files
Refactor: Mark all required options as [Required]
Co-authored-by: danieltaox <[email protected]>
1 parent ebd30c5 commit 2fb28d9

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

src/lib/clusters/clusters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export function registerClusters(program: Command) {
5050
users
5151
.command("add")
5252
.description("Add a user to a cluster (always regenerates keys)")
53-
.requiredOption("--cluster <cluster>", "name of the cluster")
53+
.requiredOption("--cluster <cluster>", "[Required] name of the cluster")
5454
.requiredOption(
5555
"--user <username>",
56-
"Username to add. Must follow RFC 1123 subdomain rules (lowercase alphanumeric with hyphens). Non-compliant names will be automatically sanitized.",
56+
"[Required] Username to add. Must follow RFC 1123 subdomain rules (lowercase alphanumeric with hyphens). Non-compliant names will be automatically sanitized.",
5757
)
5858
.option("--json", "Output in JSON format")
5959
.option("--token <token>", "API token")

src/lib/extend/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ function _registerExtend(program: Command) {
2424
.description("Extend an existing contract")
2525
.requiredOption(
2626
"-c, --contract <contract>",
27-
"Contract ID to extend e.g. cont_a9IcKaLesUBTHEY",
27+
"[Required] Contract ID to extend e.g. cont_a9IcKaLesUBTHEY",
2828
)
2929
.requiredOption(
3030
"-d, --duration <duration>",
31-
"Extension duration (rounded up to the nearest hour)",
31+
"[Required] Extension duration (rounded up to the nearest hour)",
3232
parseDuration,
3333
)
3434
.option(

src/lib/nodes/image/upload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ async function readChunk(
4848

4949
const upload = new Command("upload")
5050
.description("Upload a VM image file (multipart)")
51-
.requiredOption("-f, --file <file>", "Path to the image file")
52-
.requiredOption("-n, --name <name>", "Image name")
51+
.requiredOption("-f, --file <file>", "[Required] Path to the image file")
52+
.requiredOption("-n, --name <name>", "[Required] Image name")
5353
.option(
5454
"-c, --concurrency <number>",
5555
"Number of parts to upload concurrently",

src/lib/scale/create.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ $ sf scale create -n 8 --horizon '30m'
303303
.showHelpAfterError()
304304
.requiredOption(
305305
"-n, --accelerators <accelerators>",
306-
"Desired number of GPUs (0 to turn off)",
306+
"[Required] Desired number of GPUs (0 to turn off)",
307307
parseAccelerators,
308308
)
309309
.option("-t, --type <type>", "Specify node type", "h100i")

src/lib/sell.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function registerSell(program: Command) {
2424
program
2525
.command("sell")
2626
.description("Place a sell order")
27-
.requiredOption("-p, --price <price>", "The price in dollars, per GPU hour")
28-
.requiredOption("-c, --contract-id <id>", "Specify the contract ID")
27+
.requiredOption("-p, --price <price>", "[Required] The price in dollars, per GPU hour")
28+
.requiredOption("-c, --contract-id <id>", "[Required] Specify the contract ID")
2929
.option(
3030
"-n, --accelerators <quantity>",
3131
"Specify the number of GPUs",

src/lib/sell/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export function registerSell(program: Command) {
3434
program
3535
.command("sell")
3636
.description("Place a sell order")
37-
.requiredOption("-p, --price <price>", "The price in dollars, per GPU hour")
38-
.requiredOption("-c, --contract-id <id>", "Specify the contract ID")
37+
.requiredOption("-p, --price <price>", "[Required] The price in dollars, per GPU hour")
38+
.requiredOption("-c, --contract-id <id>", "[Required] Specify the contract ID")
3939
.option("-n, --accelerators <quantity>", "Specify the number of GPUs", "8")
4040
.option(
4141
"-s, --start <start>",

src/lib/tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function registerTokens(program: Command) {
4343
.command("delete")
4444
.alias("rm")
4545
.description("Delete a token")
46-
.requiredOption("--id <id>", "Specify the token ID")
46+
.requiredOption("--id <id>", "[Required] Specify the token ID")
4747
.option("--yes", "Force delete the token, skipping confirmation")
4848
.action(deleteTokenAction);
4949
}

src/lib/vm/logs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function formatTimestampToISO(timestamp: string): string {
3434

3535
const logs = new Command("logs")
3636
.description("View or tail VM logs")
37-
.requiredOption("-i, --instance <id>", "VM instance ID")
37+
.requiredOption("-i, --instance <id>", "[Required] VM instance ID")
3838
.option(
3939
"-l, --limit <number>",
4040
"Number of log lines to fetch",

src/lib/vm/replace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { getApiUrl } from "../../helpers/urls.ts";
1212

1313
const replace = new Command("replace")
1414
.description("Replace a virtual machine")
15-
.requiredOption("-i, --id <id>", "ID of the VM to replace")
15+
.requiredOption("-i, --id <id>", "[Required] ID of the VM to replace")
1616
.option("-y, --yes", "Automatically confirm the command.")
1717
.action(async (options) => {
1818
if (!options.yes) {

src/lib/vm/script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { getApiUrl } from "../../helpers/urls.ts";
1010

1111
const script = new Command("script")
1212
.description("Push a startup script to VMs")
13-
.requiredOption("-f, --file <file>", "Path to startup script file")
13+
.requiredOption("-f, --file <file>", "[Required] Path to startup script file")
1414
.action(async (options) => {
1515
let script: string;
1616
try {

0 commit comments

Comments
 (0)