fimo 0.6.0-experimental.1 → 0.6.0-staging.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.
@@ -6,7 +6,7 @@ existing RR project.
6
6
 
7
7
  ## Prerequisites
8
8
 
9
- - Node 20+
9
+ - Node 22.22+
10
10
  - A Fimo project created via `fimo init` (gives you `projectId`,
11
11
  `organizationId`, and an `apiUrl`).
12
12
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-07-14T13:44:49.449Z",
4
+ "bundledAt": "2026-07-14T20:55:18.930Z",
5
5
  "cliVersion": "0.5.0",
6
6
  "external": [
7
7
  "oxc-parser",
package/dist/cli/index.js CHANGED
@@ -48789,13 +48789,15 @@ function isCommandAvailable(command) {
48789
48789
  const result = spawnSync(probe, [command], { stdio: "ignore" });
48790
48790
  return result.status === 0;
48791
48791
  }
48792
- async function resolveOrganization(api, explicit) {
48792
+ async function resolveOrganization(api, explicit, options = {}) {
48793
48793
  if (explicit) {
48794
48794
  return explicit;
48795
48795
  }
48796
48796
  const creds = readCredentials();
48797
- if (creds?.activeOrganization?.id) {
48798
- return creds.activeOrganization.id;
48797
+ const activeOrganizationId = creds?.activeOrganization?.id;
48798
+ const nonInteractive2 = options.nonInteractive ?? (currentMode().format === "json" || !isInteractive());
48799
+ if (nonInteractive2 && activeOrganizationId) {
48800
+ return activeOrganizationId;
48799
48801
  }
48800
48802
  let orgs2;
48801
48803
  try {
@@ -48810,7 +48812,30 @@ async function resolveOrganization(api, explicit) {
48810
48812
  if (orgs2.length === 0) {
48811
48813
  throw new ScaffoldError("NO_ORGANIZATIONS", "No organization found for this account.");
48812
48814
  }
48813
- return orgs2[0].id;
48815
+ if (orgs2.length === 1) {
48816
+ return orgs2[0].id;
48817
+ }
48818
+ if (nonInteractive2) {
48819
+ throw new ScaffoldError(
48820
+ "ORGANIZATION_REQUIRED",
48821
+ "Several organizations are available and no active organization is configured.",
48822
+ "Pass --org <organizationId>, or run `fimo orgs switch --org <id-or-slug>` first."
48823
+ );
48824
+ }
48825
+ const currentId = orgs2.some((organization) => organization.id === activeOrganizationId) ? activeOrganizationId : void 0;
48826
+ const selected = await _t({
48827
+ message: "Select an organization for this project",
48828
+ initialValue: currentId,
48829
+ options: orgs2.map((organization) => ({
48830
+ value: organization.id,
48831
+ label: organization.name,
48832
+ hint: organization.id === currentId ? "current" : organization.slug
48833
+ }))
48834
+ });
48835
+ if (q(selected)) {
48836
+ throw new ScaffoldError("ORGANIZATION_SELECTION_CANCELLED", "Organization selection cancelled.");
48837
+ }
48838
+ return selected;
48814
48839
  }
48815
48840
  var execFileAsync7, MAIN_BRANCH, ScaffoldError;
48816
48841
  var init_scaffold_project = __esm({
@@ -48824,6 +48849,7 @@ var init_scaffold_project = __esm({
48824
48849
  init_auth_errors();
48825
48850
  init_git_credential_setup();
48826
48851
  init_git();
48852
+ init_interactive();
48827
48853
  init_local_project_files();
48828
48854
  init_scaffold();
48829
48855
  init_skills();
@@ -49048,6 +49074,7 @@ async function planInit(args) {
49048
49074
  let projectId;
49049
49075
  let targetDir;
49050
49076
  let displayName;
49077
+ const derived = { ...options };
49051
49078
  if (useExisting) {
49052
49079
  projectId = options.projectId ?? await selectProjectId({
49053
49080
  api,
@@ -49075,8 +49102,27 @@ async function planInit(args) {
49075
49102
  });
49076
49103
  return null;
49077
49104
  }
49105
+ try {
49106
+ derived.org = await resolveOrganization(api, options.org, {
49107
+ nonInteractive: nonInteractive(options)
49108
+ });
49109
+ } catch (error45) {
49110
+ if (error45 instanceof ScaffoldError && error45.code === "ORGANIZATION_SELECTION_CANCELLED") {
49111
+ ui.info({ command: "init", message: "Cancelled." });
49112
+ return null;
49113
+ }
49114
+ if (error45 instanceof ScaffoldError) {
49115
+ ui.error({
49116
+ command: "init",
49117
+ code: error45.code,
49118
+ message: error45.message,
49119
+ hint: error45.hint
49120
+ });
49121
+ return null;
49122
+ }
49123
+ throw error45;
49124
+ }
49078
49125
  }
49079
- const derived = { ...options };
49080
49126
  const gatherAgents = !nonInteractive(options) && (!useExisting || options.skills !== false);
49081
49127
  if (gatherAgents) {
49082
49128
  let agents;
@@ -110175,7 +110221,7 @@ registerChannelsCommands(program);
110175
110221
  registerSchedulesCommands(program);
110176
110222
  program.command("invite").description("Invite a user to an organization or project").option("--target <target>", "Invite target: organization or project").option("--org <organizationId>", "Organization ID (defaults to active when needed)").option("--project <projectId>", "Project ID (defaults to the current project when available)").option("--email <email>", "Email address of the user to invite").option("--role <role>", "Role or access level to grant").option("-C, --cwd <dir>", "Project directory used to resolve the current project").option("-y, --yes", "Skip the confirmation prompt").option("--resend", "Resend an existing pending organization invite").action(inviteCommand);
110177
110223
  program.command("clone").description("Clone an existing Fimo project locally").argument("[projectId]", "Project ID to clone").argument("[dir]", "Target directory (defaults to the project name)").option("--env <name>", "Env to clone (defaults to main)").action(cloneCommand);
110178
- program.command("init").description("Set up a Fimo project locally: sign in, create or link a project, install deps and skills").argument("[dir]", "Target directory").option("--project-id <id>", "Link an existing project instead of creating a new one").option("--org <organizationId>", "Target organization ID when creating (auto if you belong to one)").option("--env <name>", "Env to check out when linking an existing project (defaults to main)").option("--template-root <path>", "Override template directory when creating").option("--package-manager <pm>", "Install dependencies with: npm | pnpm | yarn | bun").option("--install", "Install dependencies after checkout").option("--no-install", "Skip dependency installation after checkout").option("--skills", "Set up Fimo skills for your AI coding agents").option("--no-skills", "Skip setting up Fimo skills").option(
110224
+ program.command("init").description("Set up a Fimo project locally: sign in, create or link a project, install deps and skills").argument("[dir]", "Target directory").option("--project-id <id>", "Link an existing project instead of creating a new one").option("--org <organizationId>", "Target organization ID when creating (recommended for agents and CI)").option("--env <name>", "Env to check out when linking an existing project (defaults to main)").option("--template-root <path>", "Override template directory when creating").option("--package-manager <pm>", "Install dependencies with: npm | pnpm | yarn | bun").option("--install", "Install dependencies after checkout").option("--no-install", "Skip dependency installation after checkout").option("--skills", "Set up Fimo skills for your AI coding agents").option("--no-skills", "Skip setting up Fimo skills").option(
110179
110225
  "--agents <list>",
110180
110226
  'Comma-separated list of AI agents to set up project rules for (e.g. claude-code,cursor). Pass "none" to skip per-agent variants.'
110181
110227
  ).option(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.6.0-experimental.1",
3
+ "version": "0.6.0-staging.1",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -21,7 +21,7 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "0.6.0-experimental.1",
24
+ "fimo": "0.6.0-staging.1",
25
25
  "input-otp": "^1.4.2",
26
26
  "isbot": "^5",
27
27
  "lucide-react": "^0.577.0",