cassian-cli 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,6 @@ export interface InitOptions {
3
3
  gpu?: string;
4
4
  gpuCount?: string;
5
5
  disk?: string;
6
- storage?: string;
7
6
  yes?: boolean;
8
7
  }
9
8
  export declare function init(options?: InitOptions): Promise<void>;
@@ -64,8 +64,7 @@ function promptChoice(rl, question, choices, fallback) {
64
64
  });
65
65
  }
66
66
  function buildYaml(opts) {
67
- const storageLines = opts.storage.length
68
- ? `\nstorage:\n${opts.storage.map(p => ` - ${p}`).join("\n")}\n` : "";
67
+ const storageLine = opts.storage ? "\nstorage: true\n" : "";
69
68
  const excludeLines = opts.exclude.length
70
69
  ? `\nworkspace:\n exclude:\n${opts.exclude.map(p => ` - "${p}"`).join("\n")}\n` : "";
71
70
  return `name: ${opts.name}
@@ -75,7 +74,7 @@ gpu:
75
74
  type: ${opts.gpuType}
76
75
 
77
76
  disk: ${opts.diskSize}
78
- ${storageLines}${excludeLines}`;
77
+ ${storageLine}${excludeLines}`;
79
78
  }
80
79
  export async function init(options = {}) {
81
80
  if (existsSync("cassian.yaml")) {
@@ -89,7 +88,7 @@ export async function init(options = {}) {
89
88
  gpuType: options.gpu || "rtx3090",
90
89
  gpuCount: parseInt(options.gpuCount || "1"),
91
90
  diskSize: options.disk || "50G",
92
- storage: [],
91
+ storage: true,
93
92
  exclude: ["node_modules/", ".venv/", "__pycache__/", "*.pyc", "wandb/"],
94
93
  });
95
94
  writeFileSync("cassian.yaml", yaml);
@@ -127,12 +126,10 @@ export async function init(options = {}) {
127
126
  { label: "500 GB", value: "500G" },
128
127
  ], "50G");
129
128
  console.log();
130
- console.log(dim(" Large folders that need more storage (datasets, pretrained models)"));
131
- console.log(dim(" These get unlimited storage, accessible at /workspace/<folder>"));
132
- const storageRaw = options.storage ?? await prompt(rl, ` Storage folders ${dim("[none]")}: `, "");
133
- const storage = storageRaw
134
- ? storageRaw.split(",").map(s => s.trim().replace(/\/+$/, "/")).filter(Boolean)
135
- : [];
129
+ console.log(dim(" Cloud storage gives you unlimited persistent space at /workspace/storage"));
130
+ console.log(dim(" Great for datasets, model weights, and large files"));
131
+ const storageAnswer = await prompt(rl, ` Enable cloud storage? ${dim("[Y/n]")}: `, "Y");
132
+ const storage = storageAnswer.toLowerCase() !== "n";
136
133
  console.log();
137
134
  console.log(dim(" Folders to exclude (build artifacts, can be recreated)"));
138
135
  const excludeRaw = await prompt(rl, ` Exclude ${dim("[node_modules/, .venv/, __pycache__/, *.pyc, wandb/]")}: `, "");
@@ -58,10 +58,10 @@ export async function up() {
58
58
  info("Disk", config.disk);
59
59
  }
60
60
  else if (config.volumes?.length) {
61
- info("Storage", config.volumes.map((v) => `${v.size} at ${v.mount}`).join(", "));
61
+ info("Disk", config.volumes.map((v) => `${v.size} at ${v.mount}`).join(", "));
62
62
  }
63
- if (config.storage?.length) {
64
- info("Storage", config.storage.join(", "));
63
+ if (config.storage) {
64
+ info("Storage", "enabled (/workspace/storage)");
65
65
  }
66
66
  console.log();
67
67
  const vm = dev.vm;
@@ -125,7 +125,7 @@ export async function up() {
125
125
  },
126
126
  workspace: {
127
127
  no_sync: config.workspace?.no_sync || [],
128
- storage: config.storage || config.workspace?.storage || [],
128
+ storage: config.storage === true ? ["storage"] : (Array.isArray(config.storage) ? config.storage : config.workspace?.storage || []),
129
129
  exclude: config.workspace?.exclude || config.workspace?.syncignore || [],
130
130
  },
131
131
  });
package/dist/index.js CHANGED
@@ -88,14 +88,12 @@ program
88
88
  .option("--gpu <type>", "GPU type (e.g. h100-sxm, a100-sxm, rtx3090)")
89
89
  .option("--gpu-count <n>", "Number of GPUs")
90
90
  .option("--disk <size>", "Disk size (e.g. 50G, 200G)")
91
- .option("--storage <folders>", "Comma-separated storage folders (e.g. datasets/,models/)")
92
91
  .option("-y, --yes", "Skip all prompts, use defaults")
93
92
  .action((opts) => init({
94
93
  name: opts.name,
95
94
  gpu: opts.gpu,
96
95
  gpuCount: opts.gpuCount,
97
96
  disk: opts.disk,
98
- storage: opts.storage,
99
97
  yes: opts.yes,
100
98
  }));
101
99
  program.parse();
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface CassianConfig {
12
12
  };
13
13
  image?: string;
14
14
  disk?: string;
15
- storage?: string[];
15
+ storage?: boolean | string[];
16
16
  volumes?: Array<{
17
17
  name: string;
18
18
  size: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cassian-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "The Cassian GPU cloud CLI — provision GPUs, sync files, and run workloads from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {