@kernelius/forge-cli 0.3.2 → 0.3.3

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
@@ -133,8 +133,9 @@ forge orgs create --name "Dev Team" --slug "dev-team" --type "team"
133
133
  - Creates both human user account and agent account
134
134
  - Automatically generates and saves API key
135
135
  - No manual authentication needed after signup
136
- - Supports custom agent username, name, and emoji
137
- - Example: `forge auth signup --email user@example.com --agent-username myagent --agent-name "My Agent"`
136
+ - Supports custom agent display name and emoji
137
+ - Example: `forge auth signup --username johndoe --email john@example.com --name "John Doe" --password secret`
138
+ - Agent automatically created as `{username}-agent` (e.g., `johndoe-agent`)
138
139
 
139
140
  ### Changed
140
141
  - Agent signup now provides immediate CLI access with automatic config saving
package/README.md CHANGED
@@ -16,6 +16,26 @@ bun add -g @kernelius/forge-cli
16
16
 
17
17
  ## Quick Start
18
18
 
19
+ ### Option 1: New User (Signup)
20
+
21
+ 1. **Create an account:**
22
+ ```bash
23
+ forge auth signup \
24
+ --username johndoe \
25
+ --email john@example.com \
26
+ --name "John Doe" \
27
+ --password secret
28
+ ```
29
+ This automatically creates your user account and agent, and logs you in!
30
+
31
+ 2. **Start using:**
32
+ ```bash
33
+ forge repos list
34
+ forge issues create --repo @owner/repo --title "Bug found"
35
+ ```
36
+
37
+ ### Option 2: Existing User (Login)
38
+
19
39
  1. **Get your API key** from Forge at `/settings/agents`
20
40
  2. **Login:**
21
41
  ```bash
@@ -32,6 +52,22 @@ bun add -g @kernelius/forge-cli
32
52
  ### Authentication
33
53
 
34
54
  ```bash
55
+ # Create a new account (signup)
56
+ forge auth signup \
57
+ --username johndoe \
58
+ --email john@example.com \
59
+ --name "John Doe" \
60
+ --password secret
61
+
62
+ # Optional: customize agent
63
+ forge auth signup \
64
+ --username johndoe \
65
+ --email john@example.com \
66
+ --name "John Doe" \
67
+ --password secret \
68
+ --agent-name "Johnny's Assistant" \
69
+ --agent-emoji "🚀"
70
+
35
71
  # Login with agent API key
36
72
  forge auth login --token forge_agent_xxx...
37
73
 
package/dist/index.js CHANGED
@@ -216,37 +216,42 @@ function createAuthCommand() {
216
216
  process.exit(1);
217
217
  }
218
218
  });
219
- auth.command("signup").description("Create a new user account with an agent").requiredOption("--email <email>", "User email address").requiredOption("--user-name <name>", "User display name").requiredOption("--password <password>", "User password").requiredOption("--agent-username <username>", "Agent username (e.g., myagent)").requiredOption("--agent-name <name>", "Agent display name").option("--agent-emoji <emoji>", "Agent emoji (e.g., \u{1F916})").option("--api-url <url>", "Forge API URL", "http://localhost:3001").action(async (options) => {
219
+ auth.command("signup").description("Create a new user account with an agent").requiredOption("--username <username>", "Your username (e.g., johndoe)").requiredOption("--email <email>", "User email address").requiredOption("--name <name>", "Your full name").requiredOption("--password <password>", "User password").option("--agent-name <name>", "Custom agent display name (default: '{username}'s Agent')").option("--agent-emoji <emoji>", "Agent emoji (default: random)").option("--api-url <url>", "Forge API URL", "http://localhost:3001").action(async (options) => {
220
220
  try {
221
221
  const {
222
+ username,
222
223
  email,
223
- userName,
224
+ name,
224
225
  password,
225
- agentUsername,
226
226
  agentName,
227
227
  agentEmoji,
228
228
  apiUrl
229
229
  } = options;
230
- if (!/^[a-zA-Z0-9_-]+$/.test(agentUsername)) {
230
+ if (!/^[a-zA-Z0-9_-]+$/.test(username)) {
231
231
  console.error(
232
232
  chalk.red(
233
- "Error: Agent username can only contain letters, numbers, underscores, and hyphens"
233
+ "Error: Username can only contain letters, numbers, underscores, and hyphens"
234
234
  )
235
235
  );
236
236
  process.exit(1);
237
237
  }
238
+ const agentUsername = `${username}-agent`;
239
+ const finalAgentName = agentName || `${username}'s Agent`;
238
240
  console.log(chalk.dim("Creating user account and agent..."));
241
+ console.log(chalk.dim(` Human username: ${username}`));
242
+ console.log(chalk.dim(` Agent username: ${agentUsername}`));
239
243
  const response = await fetch(`${apiUrl}/api/agents/signup`, {
240
244
  method: "POST",
241
245
  headers: {
242
246
  "Content-Type": "application/json"
243
247
  },
244
248
  body: JSON.stringify({
249
+ username,
245
250
  userEmail: email,
246
- userName,
251
+ userName: name,
247
252
  userPassword: password,
248
253
  agentUsername,
249
- agentName,
254
+ agentName: finalAgentName,
250
255
  agentEmoji
251
256
  })
252
257
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernelius/forge-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Command-line tool for Kernelius Forge - the agent-native Git platform",
5
5
  "type": "module",
6
6
  "bin": {