@standardagents/cli 0.13.0 → 0.13.1

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.
package/dist/index.js CHANGED
@@ -227,7 +227,7 @@ Models define which LLM provider and model to use for prompts.
227
227
  | Property | Type | Required | Description |
228
228
  |----------|------|----------|-------------|
229
229
  | \`name\` | \`string\` | Yes | Unique identifier for this model configuration |
230
- | \`provider\` | \`'openai' \\| 'anthropic' \\| 'openrouter' \\| 'google'\` | Yes | LLM provider |
230
+ | \`provider\` | \`'openai' \\| 'anthropic' \\| 'openrouter' \\| 'google' \\| 'cerebras'\` | Yes | LLM provider |
231
231
  | \`model\` | \`string\` | Yes | Model ID sent to provider API |
232
232
  | \`fallbacks\` | \`string[]\` | No | Fallback model names to try if primary fails |
233
233
  | \`inputPrice\` | \`number\` | No | Cost per 1M input tokens (USD) |
@@ -265,6 +265,7 @@ Set these environment variables in \`.dev.vars\` (local) or Cloudflare secrets (
265
265
 
266
266
  | Provider | Environment Variable |
267
267
  |----------|---------------------|
268
+ | Cerebras | \`CEREBRAS_API_KEY\` |
268
269
  | OpenAI | \`OPENAI_API_KEY\` |
269
270
  | Anthropic | \`ANTHROPIC_API_KEY\` |
270
271
  | OpenRouter | \`OPENROUTER_API_KEY\` |
@@ -1780,12 +1781,13 @@ async function promptPassword(question) {
1780
1781
  stdin.on("data", onData);
1781
1782
  });
1782
1783
  }
1783
- function runCommand(command, args, cwd) {
1784
+ function runCommand(command, args, cwd, env) {
1784
1785
  return new Promise((resolve, reject) => {
1785
1786
  const child = spawn(command, args, {
1786
1787
  cwd,
1787
1788
  stdio: "inherit",
1788
- shell: false
1789
+ shell: false,
1790
+ env: { ...process.env, ...env }
1789
1791
  });
1790
1792
  child.on("close", (code) => {
1791
1793
  if (code === 0) {
@@ -1817,7 +1819,7 @@ function getPackageVersion() {
1817
1819
  if (process.env.STANDARDAGENTS_WORKSPACE === "1") {
1818
1820
  return "workspace:*";
1819
1821
  }
1820
- return "0.13.0";
1822
+ return "0.13.1";
1821
1823
  }
1822
1824
  async function selectPackageManager(detected) {
1823
1825
  const options = ["npm", "pnpm", "yarn", "bun"];
@@ -1914,21 +1916,21 @@ async function init(projectNameArg, options = {}) {
1914
1916
  switch (pm) {
1915
1917
  case "pnpm":
1916
1918
  createCmd = "pnpm";
1917
- createArgs = ["create", "vite@latest", projectName, "--template", template, "--yes"];
1919
+ createArgs = ["dlx", "create-vite@latest", projectName, "--template", template, "--no-interactive"];
1918
1920
  break;
1919
1921
  case "yarn":
1920
1922
  createCmd = "yarn";
1921
- createArgs = ["create", "vite@latest", projectName, "--template", template, "--yes"];
1923
+ createArgs = ["dlx", "create-vite@latest", projectName, "--template", template, "--no-interactive"];
1922
1924
  break;
1923
1925
  case "bun":
1924
1926
  createCmd = "bun";
1925
- createArgs = ["create", "vite@latest", projectName, "--template", template, "--yes"];
1927
+ createArgs = ["x", "create-vite@latest", projectName, "--template", template, "--no-interactive"];
1926
1928
  break;
1927
1929
  default:
1928
- createCmd = "npm";
1929
- createArgs = ["create", "vite@latest", projectName, "--", "--template", template, "--yes"];
1930
+ createCmd = "npx";
1931
+ createArgs = ["create-vite@latest", projectName, "--template", template, "--no-interactive"];
1930
1932
  }
1931
- await runCommand(createCmd, createArgs, cwd);
1933
+ await runCommand(createCmd, createArgs, cwd, { CI: "1" });
1932
1934
  const createdPackageJsonPath = path3.join(projectPath, "package.json");
1933
1935
  if (!fs3.existsSync(createdPackageJsonPath)) {
1934
1936
  throw new Error("Vite project scaffolding did not create package.json");
@@ -1961,6 +1963,7 @@ export default defineConfig({
1961
1963
  logger.info("Step 2: Configuring environment variables...");
1962
1964
  logger.log("");
1963
1965
  const encryptionKey = crypto.randomBytes(32).toString("hex");
1966
+ let cerebrasKey = "";
1964
1967
  let openrouterKey = "";
1965
1968
  let openaiKey = "";
1966
1969
  let adminPassword = "";
@@ -1968,6 +1971,7 @@ export default defineConfig({
1968
1971
  logger.log("API keys are optional but required to use AI models.");
1969
1972
  logger.log("You can add them later by editing .dev.vars");
1970
1973
  logger.log("");
1974
+ cerebrasKey = await prompt("Cerebras API key (optional, press Enter to skip): ");
1971
1975
  openrouterKey = await prompt("OpenRouter API key (optional, press Enter to skip): ");
1972
1976
  openaiKey = await prompt("OpenAI API key (optional, press Enter to skip): ");
1973
1977
  logger.log("");
@@ -2012,6 +2016,9 @@ export default defineConfig({
2012
2016
  `@standardagents/sip@${packageVersion}`,
2013
2017
  "zod"
2014
2018
  ];
2019
+ if (cerebrasKey) {
2020
+ deps.push(`@standardagents/cerebras@${packageVersion}`);
2021
+ }
2015
2022
  if (openaiKey) {
2016
2023
  deps.push(`@standardagents/openai@${packageVersion}`);
2017
2024
  }
@@ -2045,6 +2052,11 @@ export default defineConfig({
2045
2052
  "# AI Provider API Keys",
2046
2053
  "# Uncomment and add your keys as needed"
2047
2054
  ];
2055
+ if (cerebrasKey) {
2056
+ devVarsLines.push(`CEREBRAS_API_KEY=${cerebrasKey}`);
2057
+ } else {
2058
+ devVarsLines.push("# CEREBRAS_API_KEY=your-cerebras-key");
2059
+ }
2048
2060
  if (openrouterKey) {
2049
2061
  devVarsLines.push(`OPENROUTER_API_KEY=${openrouterKey}`);
2050
2062
  } else {
@@ -3328,7 +3340,7 @@ async function deploy(options) {
3328
3340
 
3329
3341
  // src/index.ts
3330
3342
  var program = new Command();
3331
- program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.13.0");
3343
+ program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.13.1");
3332
3344
  program.command("init [project-name]").description("Create a new Standard Agents project (runs create vite, then scaffold)").option("-y, --yes", "Skip prompts and use defaults").option("--template <template>", "Vite template to use", "vanilla-ts").action(init);
3333
3345
  program.command("scaffold").description("Add Standard Agents to an existing Vite project").option("--force", "Overwrite existing configuration").action(scaffold);
3334
3346
  program.command("init-chat [project-name]").description("Scaffold a frontend chat application").option("-y, --yes", "Skip prompts and use defaults").option("--framework <framework>", "Framework to use (vite or nextjs)").action(initChat);