agdi 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -29
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -323,22 +323,19 @@ import { input, select, password } from "@inquirer/prompts";
323
323
  import chalk from "chalk";
324
324
  async function login() {
325
325
  console.log(chalk.cyan.bold("\n\u{1F510} Agdi Authentication\n"));
326
+ console.log(chalk.gray("Configure your API key to use Agdi CLI.\n"));
326
327
  const config = loadConfig();
327
328
  const provider = await select({
328
- message: "How would you like to authenticate?",
329
+ message: "Select your AI provider:",
329
330
  choices: [
330
- { name: "\u{1F193} Agdi Cloud (FREE) - No API key needed!", value: "puter" },
331
- { name: "\u{1F511} Bring Your Own Key", value: "byok" },
331
+ { name: "\u{1F511} Google Gemini (Recommended)", value: "gemini" },
332
+ { name: "\u{1F511} OpenAI (GPT-4, GPT-5)", value: "openai" },
333
+ { name: "\u{1F511} Anthropic (Claude)", value: "anthropic" },
334
+ { name: "\u{1F511} DeepSeek", value: "deepseek" },
335
+ { name: "\u{1F511} OpenRouter (Multi-model)", value: "openrouter" },
332
336
  { name: "\u{1F3E0} Local LLM (Ollama)", value: "ollama" }
333
337
  ]
334
338
  });
335
- if (provider === "puter") {
336
- config.defaultProvider = "puter";
337
- saveConfig(config);
338
- console.log(chalk.green("\n\u2705 Using FREE Agdi Cloud (Puter.com)"));
339
- console.log(chalk.gray("No API key needed - access to 400+ models!\n"));
340
- return;
341
- }
342
339
  if (provider === "ollama") {
343
340
  const ollamaUrl = await input({
344
341
  message: "Ollama server URL:",
@@ -352,22 +349,11 @@ async function login() {
352
349
  `));
353
350
  return;
354
351
  }
355
- console.log(chalk.cyan("\n\u{1F511} Configure API Keys\n"));
356
- const keyType = await select({
357
- message: "Which provider?",
358
- choices: [
359
- { name: "Google Gemini", value: "gemini" },
360
- { name: "OpenAI (GPT-4)", value: "openai" },
361
- { name: "Anthropic (Claude)", value: "anthropic" },
362
- { name: "DeepSeek", value: "deepseek" },
363
- { name: "OpenRouter (Multi-model)", value: "openrouter" }
364
- ]
365
- });
366
352
  const apiKey = await password({
367
- message: `Enter your ${keyType} API key:`,
353
+ message: `Enter your ${provider} API key:`,
368
354
  mask: "*"
369
355
  });
370
- switch (keyType) {
356
+ switch (provider) {
371
357
  case "gemini":
372
358
  config.geminiApiKey = apiKey;
373
359
  break;
@@ -384,10 +370,10 @@ async function login() {
384
370
  config.openrouterApiKey = apiKey;
385
371
  break;
386
372
  }
387
- config.defaultProvider = keyType;
373
+ config.defaultProvider = provider;
388
374
  saveConfig(config);
389
375
  console.log(chalk.green(`
390
- \u2705 ${keyType} API key saved securely`));
376
+ \u2705 ${provider} API key saved securely`));
391
377
  console.log(chalk.gray("Keys stored in ~/.agdi/config.json\n"));
392
378
  }
393
379
  async function showStatus() {
@@ -755,12 +741,12 @@ program.command("init").description("Create a new project interactively").action
755
741
  process.exit(1);
756
742
  }
757
743
  });
758
- program.command("generate <prompt>").alias("g").description("Generate an app from a prompt").option("-p, --provider <provider>", "AI provider (puter or gemini)", "puter").option("-m, --model <model>", "AI model to use", "claude-sonnet-4").option("-o, --output <dir>", "Output directory", "./generated-app").action(async (prompt, options) => {
744
+ program.command("generate <prompt>").alias("g").description("Generate an app from a prompt").option("-p, --provider <provider>", "AI provider (gemini, openai, anthropic)", "gemini").option("-m, --model <model>", "AI model to use", "gemini-2.5-flash").option("-o, --output <dir>", "Output directory", "./generated-app").action(async (prompt, options) => {
759
745
  const config = loadConfig();
760
746
  const provider = options.provider;
761
- if (provider === "gemini" && !config.geminiApiKey) {
762
- console.error(chalk3.red("\u274C No Gemini API key configured. Run: agdi auth"));
763
- console.error(chalk3.yellow("\u{1F4A1} Tip: Use --provider puter for FREE access without API keys!"));
747
+ if (!config.geminiApiKey && provider === "gemini") {
748
+ console.error(chalk3.red("\u274C No Gemini API key configured."));
749
+ console.error(chalk3.yellow("\u{1F4A1} Run: agdi auth"));
764
750
  process.exit(1);
765
751
  }
766
752
  const spinner = ora2(`Generating app with ${chalk3.cyan(options.model)}...`).start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdi",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "AI-powered app generator - build full-stack apps from natural language in your terminal",
5
5
  "type": "module",
6
6
  "bin": {