@stainlu/faam-cli 0.2.4 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.5 (2026-02-10)
4
+
5
+ - `faam init` now works with zero arguments — name auto-generates, description optional
6
+ - API no longer requires description for agent profile
7
+
3
8
  ## 0.2.4 (2026-02-10)
4
9
 
5
10
  - Fix CI workflow (pin pnpm version)
package/README.md CHANGED
@@ -64,24 +64,27 @@ faam logout
64
64
 
65
65
  ### `faam init`
66
66
 
67
- Initialize your agent card with name, description, auto-discover skills, and sync to API.
67
+ Initialize your agent card, auto-discover skills, and sync to API. Works with zero arguments — name auto-generates from your account ID and description is optional.
68
68
 
69
69
  ```bash
70
- # Interactive mode (prompts for values)
70
+ # Zero-config (auto-generates name, no description)
71
71
  faam init
72
72
 
73
- # Non-interactive mode (for AI agents)
73
+ # With custom name
74
+ faam init --name "My AI Agent"
75
+
76
+ # With name and description
74
77
  faam init --name "My AI Agent" --description "What my agent does"
75
78
  ```
76
79
 
77
80
  Options:
78
- - `-n, --name <name>` - Agent name
79
- - `-d, --description <desc>` - Agent description
81
+ - `-n, --name <name>` - Agent name (default: `agent-<account_id>`)
82
+ - `-d, --description <desc>` - Agent description (optional)
80
83
  - `-o, --organization <org>` - Provider organization (optional)
81
84
  - `-f, --force` - Overwrite existing config file
82
85
 
83
86
  **Features:**
84
- - **Interactive mode**: If name/description not provided, prompts for values
87
+ - **Zero-config**: Run `faam init` with no arguments — name auto-generates, description is optional
85
88
  - **Auto-discovery**: Finds skills from `~/.claude/skills/`, `.claude/skills/`, etc.
86
89
  - **Auto-sync**: Immediately syncs to API when logged in
87
90
 
package/dist/index.cjs CHANGED
@@ -22215,7 +22215,7 @@ var import_prompts = __toESM(require_prompts3(), 1);
22215
22215
  async function initCommand(options2) {
22216
22216
  const configPath = getAgentCardConfigPath();
22217
22217
  if (agentCardConfigExists() && !options2.force) {
22218
- if (!process.stdin.isTTY || options2.name && options2.description) {
22218
+ if (!process.stdin.isTTY || options2.name) {
22219
22219
  console.log(source_default.yellow("agent-card.json already exists at:"));
22220
22220
  console.log(source_default.gray(configPath));
22221
22221
  console.log();
@@ -22233,23 +22233,23 @@ async function initCommand(options2) {
22233
22233
  return;
22234
22234
  }
22235
22235
  }
22236
- const isInteractive2 = !(options2.name && options2.description) && process.stdin.isTTY;
22236
+ const clientConfig = isLoggedIn() ? readConfig() : null;
22237
+ const defaultName = clientConfig?.account_id ? `agent-${clientConfig.account_id}` : "My AI Agent";
22238
+ const isInteractive2 = process.stdin.isTTY && !options2.name;
22237
22239
  let config;
22238
22240
  if (isInteractive2) {
22239
22241
  const response = await (0, import_prompts.default)([
22240
22242
  {
22241
22243
  type: "text",
22242
22244
  name: "name",
22243
- message: "Agent name",
22244
- initial: options2.name || "",
22245
- validate: (v) => v.length > 0 || "Name is required"
22245
+ message: "Agent name (press Enter for default)",
22246
+ initial: options2.name || defaultName
22246
22247
  },
22247
22248
  {
22248
22249
  type: "text",
22249
22250
  name: "description",
22250
- message: "Description",
22251
- initial: options2.description || "",
22252
- validate: (v) => v.length > 0 || "Description is required"
22251
+ message: "Description (optional)",
22252
+ initial: options2.description || ""
22253
22253
  },
22254
22254
  {
22255
22255
  type: "text",
@@ -22263,12 +22263,9 @@ async function initCommand(options2) {
22263
22263
  process.exit(0);
22264
22264
  }
22265
22265
  });
22266
- if (!response.name || !response.description) {
22267
- return;
22268
- }
22269
22266
  config = {
22270
- name: response.name,
22271
- description: response.description,
22267
+ name: response.name || defaultName,
22268
+ description: response.description || "",
22272
22269
  version: "1.0.0",
22273
22270
  provider: {
22274
22271
  organization: response.organization || "",
@@ -22285,16 +22282,9 @@ async function initCommand(options2) {
22285
22282
  is_public: true
22286
22283
  };
22287
22284
  } else {
22288
- if (!options2.name || !options2.description) {
22289
- console.log(source_default.red("Error: --name and --description are required in non-interactive mode."));
22290
- console.log();
22291
- console.log("Usage:");
22292
- console.log(source_default.cyan(' faam init --name "My Agent" --description "What my agent does"'));
22293
- process.exit(1);
22294
- }
22295
22285
  config = {
22296
- name: options2.name,
22297
- description: options2.description,
22286
+ name: options2.name || defaultName,
22287
+ description: options2.description || "",
22298
22288
  version: "1.0.0",
22299
22289
  provider: {
22300
22290
  organization: options2.organization || "",
@@ -22347,8 +22337,8 @@ async function initCommand(options2) {
22347
22337
  console.log();
22348
22338
  const syncSpinner = ora("Syncing to Faam...").start();
22349
22339
  try {
22350
- const clientConfig = readConfig();
22351
- const client = new RlpApiClient(clientConfig);
22340
+ const syncConfig = clientConfig || readConfig();
22341
+ const client = new RlpApiClient(syncConfig);
22352
22342
  const result = await syncToApi(client, config, fileSkills);
22353
22343
  syncSpinner.succeed("Synced successfully");
22354
22344
  if (result.created.length > 0) {
@@ -22365,7 +22355,7 @@ async function initCommand(options2) {
22365
22355
  }
22366
22356
  console.log();
22367
22357
  console.log("Your agent card is live at:");
22368
- console.log(source_default.cyan(`https://agent-${clientConfig.account_id}.faam.io/.well-known/agent-card.json`));
22358
+ console.log(source_default.cyan(`https://agent-${syncConfig.account_id}.faam.io/.well-known/agent-card.json`));
22369
22359
  console.log();
22370
22360
  console.log("Go back to the onboarding page and click", source_default.bold('"Verify Setup"'), "to continue.");
22371
22361
  } catch (err) {
@@ -22487,7 +22477,7 @@ function configListKeysCommand() {
22487
22477
 
22488
22478
  // src/index.ts
22489
22479
  var program2 = new Command();
22490
- program2.name("faam").description("CLI tool to sync local skills to your FAAM Agent Card").version("0.2.4");
22480
+ program2.name("faam").description("CLI tool to sync local skills to your FAAM Agent Card").version("0.2.5");
22491
22481
  program2.command("login").description("Store your FAAM account key").requiredOption("-k, --key <account_key>", "Your FAAM account key").option("--api-url <url>", "API URL (default: https://api.faam.io)").action(async (options2) => {
22492
22482
  await loginCommand({
22493
22483
  key: options2.key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainlu/faam-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "CLI tool to sync local skills to your FAAM Agent Card",
5
5
  "type": "module",
6
6
  "bin": {