@kernelius/forge-cli 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.1] - 2026-02-01
9
+
10
+ ### Added
11
+ - **Organization Type Support**: Add `--type` option to `forge orgs create` command
12
+ - Store organization type in metadata (e.g., `company`, `team`, `open-source`, `personal`)
13
+ - Display org type in `forge orgs list` and `forge orgs view` commands
14
+ - Flexible string value - use any type that fits your use case
15
+
16
+ ### Changed
17
+ - Update organization endpoints to use new API routes (`/api/orgs`, `/api/user/orgs`)
18
+ - Improved org list command to show metadata (type, description)
19
+
20
+ ### Examples
21
+ ```bash
22
+ forge orgs create --name "Acme Corp" --slug "acme" --type "company"
23
+ forge orgs create --name "React Hooks" --slug "react-hooks" --type "open-source"
24
+ forge orgs create --name "Dev Team" --slug "dev-team" --type "team"
25
+ ```
26
+
8
27
  ## [0.2.0] - 2026-02-01
9
28
 
10
29
  ### Added
package/dist/index.js CHANGED
@@ -1137,13 +1137,11 @@ function createOrgsCommand() {
1137
1137
  try {
1138
1138
  let organizations;
1139
1139
  if (options.member) {
1140
- const user = await apiGet("/api/users/me");
1141
- const result = await apiGet(
1142
- `/api/users/${user.id}/organizations`
1143
- );
1140
+ const result = await apiGet("/api/user/orgs");
1144
1141
  organizations = result.organizations || [];
1145
1142
  } else {
1146
- organizations = await apiGet("/api/organizations");
1143
+ const result = await apiGet("/api/orgs/public");
1144
+ organizations = result.organizations || [];
1147
1145
  }
1148
1146
  if (organizations.length === 0) {
1149
1147
  console.log(chalk5.yellow("No organizations found"));
@@ -1154,6 +1152,9 @@ function createOrgsCommand() {
1154
1152
  for (const org of organizations) {
1155
1153
  console.log(chalk5.cyan(`@${org.slug}`));
1156
1154
  console.log(chalk5.dim(` ${org.name}`));
1155
+ if (org.metadata?.type) {
1156
+ console.log(chalk5.dim(` Type: ${org.metadata.type}`));
1157
+ }
1157
1158
  if (org.metadata?.description) {
1158
1159
  console.log(chalk5.dim(` ${org.metadata.description}`));
1159
1160
  }
@@ -1165,9 +1166,12 @@ function createOrgsCommand() {
1165
1166
  });
1166
1167
  orgs.command("view").description("View organization details").argument("<slug>", "Organization slug").action(async (slug) => {
1167
1168
  try {
1168
- const org = await apiGet(`/api/organizations/${slug}`);
1169
+ const org = await apiGet(`/api/orgs/${slug}`);
1169
1170
  console.log(chalk5.bold(`@${org.slug}`));
1170
1171
  console.log(chalk5.dim(org.name));
1172
+ if (org.metadata?.type) {
1173
+ console.log(chalk5.dim(`Type: ${org.metadata.type}`));
1174
+ }
1171
1175
  console.log();
1172
1176
  if (org.metadata?.description) {
1173
1177
  console.log(org.metadata.description);
@@ -1179,15 +1183,25 @@ function createOrgsCommand() {
1179
1183
  process.exit(1);
1180
1184
  }
1181
1185
  });
1182
- orgs.command("create").description("Create a new organization").requiredOption("--name <name>", "Organization name").requiredOption("--slug <slug>", "Organization slug (URL identifier)").option("--description <desc>", "Organization description").action(async (options) => {
1186
+ orgs.command("create").description("Create a new organization").requiredOption("--name <name>", "Organization name").requiredOption("--slug <slug>", "Organization slug (URL identifier)").option("--description <desc>", "Organization description").option("--type <type>", "Organization type (e.g., personal, team, company, open-source)").action(async (options) => {
1183
1187
  try {
1184
- const org = await apiPost("/api/organizations", {
1188
+ const metadata = {};
1189
+ if (options.description) {
1190
+ metadata.description = options.description;
1191
+ }
1192
+ if (options.type) {
1193
+ metadata.type = options.type;
1194
+ }
1195
+ const org = await apiPost("/api/orgs", {
1185
1196
  name: options.name,
1186
1197
  slug: options.slug,
1187
- metadata: options.description ? { description: options.description } : void 0
1198
+ metadata: Object.keys(metadata).length > 0 ? metadata : void 0
1188
1199
  });
1189
1200
  console.log(chalk5.green("\u2713 Organization created successfully"));
1190
1201
  console.log(chalk5.dim(` @${org.slug}`));
1202
+ if (options.type) {
1203
+ console.log(chalk5.dim(` Type: ${options.type}`));
1204
+ }
1191
1205
  } catch (error) {
1192
1206
  console.error(chalk5.red(`Error: ${error.message}`));
1193
1207
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernelius/forge-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Command-line tool for Kernelius Forge - the agent-native Git platform",
5
5
  "type": "module",
6
6
  "bin": {