@forloop-cc/forloop-cli 0.2.1 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ForLoop
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -63,7 +63,7 @@ npm install -g @forloop-cc/forloop-cli
63
63
 
64
64
  ```bash
65
65
  forloop --version
66
- # Output: forloop 0.2.0
66
+ # Output: forloop 0.2.1
67
67
  ```
68
68
 
69
69
  ---
@@ -99,10 +99,7 @@ That's it. You're connected.
99
99
 
100
100
  Visit the ForLoop settings page to generate a token:
101
101
 
102
- | Environment | URL |
103
- |-------------|-----|
104
102
  | Production | https://forloop.cc/profile?tab=api-tokens |
105
- | Development | https://dev.forloop.cc/profile?tab=api-tokens |
106
103
 
107
104
  Tokens start with `floop_`. Create a token with at least these scopes:
108
105
  - `sprint:read`, `sprint:write`
@@ -132,69 +129,6 @@ forloop auth logout # Remove saved token
132
129
 
133
130
  ---
134
131
 
135
- ## Environments
136
-
137
- ForLoop has two environments — **Production** and **Development**. By default, the CLI connects to production. Use the development environment when you want to test features or work on staging data without affecting production.
138
-
139
- ### Production (default)
140
-
141
- No extra setup needed. The CLI connects to `https://api.forloop.cc` automatically.
142
-
143
- ```bash
144
- forloop sprint list
145
- ```
146
-
147
- ### Development
148
-
149
- The development environment connects to `https://api.dev.forloop.cc`. You need two things:
150
-
151
- 1. **A dev API token** — create one at https://dev.forloop.cc/profile?tab=api-tokens
152
- 2. **Environment variables** — the CLI requires explicit opt-in for security:
153
-
154
- ```bash
155
- export FORLOOP_ENV=development
156
- export FORLOOP_ALLOW_DEV=true
157
- forloop auth login --api-key floop_xxxxx
158
- ```
159
-
160
- > **Security note:** `FORLOOP_ALLOW_DEV=true` is required because dev API tokens have fewer restrictions. This flag prevents accidentally using a dev token against production data. Set it only when you intend to use the dev environment.
161
-
162
- ### One-Liner for Dev
163
-
164
- ```bash
165
- FORLOOP_ENV=development FORLOOP_ALLOW_DEV=true forloop sprint list
166
- ```
167
-
168
- ### Persistent Dev Setup
169
-
170
- To always use dev for a specific project, add an `opencode.json` in your project root:
171
-
172
- ```json
173
- {
174
- "forloop": {
175
- "apiUrl": "https://api.dev.forloop.cc",
176
- "allowDev": true
177
- }
178
- }
179
- ```
180
-
181
- Or set it globally in `~/.config/opencode/config.json`:
182
-
183
- ```json
184
- {
185
- "forloop": {
186
- "apiUrl": "https://api.dev.forloop.cc",
187
- "allowDev": true
188
- }
189
- }
190
- ```
191
-
192
- | Question | Answer |
193
- |----------|--------|
194
- | What happens if I don't set `FORLOOP_ALLOW_DEV=true`? | The CLI will ignore your dev URL and connect to production instead, with a warning message |
195
- | Can I switch between prod and dev per-command? | Yes, the `--api-url` flag or `FORLOOP_ENV` env var overrides the config |
196
- | Do I need separate tokens for prod and dev? | Yes — create one token at each environment's settings page |
197
-
198
132
  ---
199
133
 
200
134
  ## Commands
@@ -419,9 +353,7 @@ These flags work with every command:
419
353
  | Variable | Purpose |
420
354
  |----------|---------|
421
355
  | `FORLOOP_API_KEY` | API token (alternative to `forloop auth login`) |
422
- | `FORLOOP_API_URL` | Override the API base URL |
423
- | `FORLOOP_ENV` | Set to `production` or `development` |
424
- | `FORLOOP_ALLOW_DEV` | Set to `true` to enable dev environment URLs |
356
+ | `FORLOOP_API_URL` | Override the API base URL (e.g., `https://api.dev.forloop.cc`) |
425
357
  | `FORLOOP_SPRINT_ID` | Default sprint ID for commands that auto-detect it |
426
358
 
427
359
  ---
@@ -561,8 +493,7 @@ The CLI resolves configuration from these sources, in priority order:
561
493
  ```json
562
494
  {
563
495
  "forloop": {
564
- "apiUrl": "https://api.dev.forloop.cc",
565
- "allowDev": true
496
+ "apiUrl": "https://api.forloop.cc"
566
497
  }
567
498
  }
568
499
  ```
@@ -572,8 +503,7 @@ The CLI resolves configuration from these sources, in priority order:
572
503
  ```json
573
504
  {
574
505
  "forloop": {
575
- "apiUrl": "https://api.forloop.cc",
576
- "allowDev": false
506
+ "apiUrl": "https://api.forloop.cc"
577
507
  }
578
508
  }
579
509
  ```
@@ -600,23 +530,11 @@ export FORLOOP_API_KEY=floop_xxxxx
600
530
 
601
531
  Tokens must start with `floop_`. Double-check you copied the entire token from https://forloop.cc/profile?tab=api-tokens.
602
532
 
603
- ### "Dev API URL ignored"
604
-
605
- The CLI refuses dev URLs unless you explicitly opt in:
606
-
607
- ```bash
608
- export FORLOOP_ALLOW_DEV=true
609
- export FORLOOP_ENV=development
610
- ```
611
-
612
- This is a security measure — dev tokens should never accidentally hit production APIs.
613
-
614
533
  ### "Forbidden" or "Not Found" on Specific Resources
615
534
 
616
535
  Some resources (organizations, stories, files) return 403/404 when you don't have access or they don't exist in your current environment. Try:
617
- - Checking you're in the right environment (prod vs dev)
618
536
  - Verifying the resource ID exists with `forloop sprint get --id <id>`
619
- - Checking that your token has the required scopes
537
+ - Checking your token has the required scopes
620
538
 
621
539
  ### Verbose Debugging
622
540
 
@@ -142,7 +142,7 @@ var GLOBAL_OPTIONS = [
142
142
  { flag: "--version", description: "Print version" }
143
143
  ];
144
144
 
145
- // ../forloop-opencode-plugin-planner/plugins/capabilities/token-storage.ts
145
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/capabilities/token-storage.ts
146
146
  import { promises as fs } from "fs";
147
147
  import path from "path";
148
148
  var getTokenPath = () => {
@@ -216,7 +216,7 @@ async function clearToken(profile) {
216
216
  await saveTokens(tokens);
217
217
  }
218
218
 
219
- // ../forloop-opencode-plugin-planner/plugins/capabilities/config.ts
219
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/capabilities/config.ts
220
220
  import fs2 from "fs";
221
221
  import path2 from "path";
222
222
  var PROD_API_URL = "https://api.forloop.cc";
@@ -339,7 +339,7 @@ var isLambdaExecution = () => {
339
339
  return !!(process.env.AWS_LAMBDA_FUNCTION_NAME || process.env.AWS_EXECUTION_ENV || process.env.LAMBDA_TASK_ROOT);
340
340
  };
341
341
 
342
- // ../forloop-opencode-plugin-planner/plugins/capabilities/auth.ts
342
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/capabilities/auth.ts
343
343
  function detectTokenType(token) {
344
344
  if (!token) return null;
345
345
  if (token.startsWith("floop_")) {
@@ -390,7 +390,7 @@ async function validateToken(providedToken) {
390
390
  };
391
391
  }
392
392
 
393
- // ../forloop-opencode-plugin-planner/plugins/capabilities/api-client.ts
393
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/capabilities/api-client.ts
394
394
  var APIError = class extends Error {
395
395
  constructor(code, message, status) {
396
396
  super(message);
@@ -736,10 +736,10 @@ var ForLoopAPIClient = class {
736
736
  }
737
737
  };
738
738
 
739
- // ../forloop-opencode-plugin-planner/plugins/tools/sprint-tools.ts
739
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/sprint-tools.ts
740
740
  import { tool } from "@opencode-ai/plugin";
741
741
 
742
- // ../forloop-opencode-plugin-planner/plugins/capabilities/context-resolver.ts
742
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/capabilities/context-resolver.ts
743
743
  import { exec } from "child_process";
744
744
  import { promisify } from "util";
745
745
  import * as fs3 from "fs";
@@ -818,46 +818,46 @@ function getForloopRoot(sprintId) {
818
818
  return root;
819
819
  }
820
820
 
821
- // ../forloop-opencode-plugin-planner/plugins/tools/story-tools.ts
821
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/story-tools.ts
822
822
  import { tool as tool2 } from "@opencode-ai/plugin";
823
823
 
824
- // ../forloop-opencode-plugin-planner/plugins/tools/template-tools.ts
824
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/template-tools.ts
825
825
  import { tool as tool3 } from "@opencode-ai/plugin";
826
826
 
827
- // ../forloop-opencode-plugin-planner/plugins/tools/user-tools.ts
827
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/user-tools.ts
828
828
  import { tool as tool4 } from "@opencode-ai/plugin";
829
829
 
830
- // ../forloop-opencode-plugin-planner/plugins/tools/organization-tools.ts
830
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/organization-tools.ts
831
831
  import { tool as tool5 } from "@opencode-ai/plugin";
832
832
 
833
- // ../forloop-opencode-plugin-planner/plugins/tools/file-tools.ts
833
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/file-tools.ts
834
834
  import { tool as tool6 } from "@opencode-ai/plugin";
835
835
 
836
- // ../forloop-opencode-plugin-planner/plugins/tools/schedule-tools.ts
836
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/schedule-tools.ts
837
837
  import { tool as tool7 } from "@opencode-ai/plugin";
838
838
 
839
- // ../forloop-opencode-plugin-planner/plugins/tools/folder-tools.ts
839
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/folder-tools.ts
840
840
  import { tool as tool8 } from "@opencode-ai/plugin";
841
841
 
842
- // ../forloop-opencode-plugin-planner/plugins/tools/sync-tools.ts
842
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/sync-tools.ts
843
843
  import { tool as tool9 } from "@opencode-ai/plugin";
844
844
 
845
- // ../forloop-opencode-plugin-planner/plugins/tools/agent-tools.ts
845
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/agent-tools.ts
846
846
  import { tool as tool10 } from "@opencode-ai/plugin";
847
847
 
848
- // ../forloop-opencode-plugin-planner/plugins/tools/agent-suggestion-tools.ts
848
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/agent-suggestion-tools.ts
849
849
  import { tool as tool11 } from "@opencode-ai/plugin";
850
850
 
851
- // ../forloop-opencode-plugin-planner/plugins/tools/agent-sprint-tools.ts
851
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/agent-sprint-tools.ts
852
852
  import { tool as tool12 } from "@opencode-ai/plugin";
853
853
 
854
- // ../forloop-opencode-plugin-planner/plugins/tools/ai-trigger-tools.ts
854
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/ai-trigger-tools.ts
855
855
  import { tool as tool13 } from "@opencode-ai/plugin";
856
856
 
857
- // ../forloop-opencode-plugin-planner/plugins/tools/developer-status-tool.ts
857
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/tools/developer-status-tool.ts
858
858
  import { tool as tool14 } from "@opencode-ai/plugin";
859
859
 
860
- // ../forloop-opencode-plugin-planner/plugins/hooks/shell-env.ts
860
+ // node_modules/@forloop-cc/forloop-opencode-plugin-planner/plugins/hooks/shell-env.ts
861
861
  import { exec as exec2 } from "child_process";
862
862
  import { promisify as promisify2 } from "util";
863
863
  var execAsync2 = promisify2(exec2);
@@ -2362,7 +2362,7 @@ Tip: ${suggestion}
2362
2362
  }
2363
2363
 
2364
2364
  // src/main.ts
2365
- var CLI_VERSION = "0.2.0";
2365
+ var CLI_VERSION = "0.2.3";
2366
2366
  process.on("SIGINT", () => {
2367
2367
  process.stderr.write("\nInterrupted. Exiting.\n");
2368
2368
  process.exit(130);
@@ -2422,7 +2422,7 @@ async function main() {
2422
2422
  process.exit(3);
2423
2423
  }
2424
2424
  const cliConfig = {
2425
- region: pluginConfig.apiUrl.includes("dev.forloop.cc") ? "dev" : "global",
2425
+ region: "global",
2426
2426
  apiUrl: pluginConfig.apiUrl,
2427
2427
  serverLambdaUrl: "",
2428
2428
  environment: pluginConfig.environment,
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@forloop-cc/forloop-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Command-line interface for the ForLoop AI development platform",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/forloop-cc/forloop-cli#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/forloop-cc/forloop-cli/issues"
10
+ },
7
11
  "keywords": [
8
12
  "forloop",
9
13
  "cli",
@@ -13,10 +17,10 @@
13
17
  ],
14
18
  "repository": {
15
19
  "type": "git",
16
- "url": "https://github.com/forloop-cc/forloop-cli"
20
+ "url": "git+https://github.com/forloop-cc/forloop-cli.git"
17
21
  },
18
22
  "bin": {
19
- "forloop": "./dist/forloop.mjs"
23
+ "forloop": "dist/forloop"
20
24
  },
21
25
  "files": [
22
26
  "dist/",
@@ -36,7 +40,7 @@
36
40
  "prepublishOnly": "npm run build"
37
41
  },
38
42
  "dependencies": {
39
- "@forloop/opencode-plugin": "^2.2.0",
43
+ "@forloop-cc/forloop-opencode-plugin-planner": "^2.2.0",
40
44
  "@opencode-ai/plugin": "^1.3.0"
41
45
  },
42
46
  "devDependencies": {