@joripspace/cli 0.8.0 → 0.9.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/README.md CHANGED
@@ -1,317 +1,320 @@
1
- # JoripSpace CLI
2
-
3
- ## Approval links in 0.8.0
4
-
5
- CLI 0.8.0 uses browser approval links for new connections. Existing valid CLI logins and MCP OAuth sessions are reused. Only the server retains code APIs for previously released clients.
6
-
7
- For a new connection, run:
8
-
9
- ```sh
10
- joripspace login --no-open --json --cwd PROJECT_ROOT
11
- ```
12
-
13
- The CLI checks server support and emits an `approval_pending` JSON event to **stderr** containing a five-minute `approval_url` and `next_action`. Show that link to the user and keep the same process running. The user signs in, checks the account and approves; no code is copied. Interactive `login` opens the browser unless `--no-open` is set. With `--json`, the CLI prints the link without opening a browser. The CLI then stores the credential and writes one final JSON result to **stdout** with `status`, `next_action` and, when a project is selected, `next_command`. Never print credentials or the private polling secret; that secret stays in process memory.
14
-
15
- Current CLI login uses approval links only. Unsupported servers and errors stop login without switching authentication methods. Existing valid logins are reused. The server retains old code APIs only for previously released clients.
16
-
17
- MCP uses the existing `start_login` to issue approval links and check them with `request_id` in the same initialized MCP session. Follow status, next_action, next_tool and interval; after connection call start_project_session without tokens. No code entry is required.
18
-
19
-
20
- **JoripSpace — Build and deploy web apps with AI agents. Powered by Cosmosfarm.**
21
-
22
- The official command-line client for JoripSpace. Connect a project, deploy your app, and manage its database, files, Secrets, and realtime services from your terminal or coding agent.
23
-
24
- The CLI runs on Windows, macOS, and Linux with **Node.js 18 or later and npm**. It runs directly in Node.js, so you do not need a TypeScript compiler or native build tools to install it.
25
-
26
- [Website](https://joripspace.com) · [Documentation](https://joripspace.com/en/docs/) · [CLI reference](https://joripspace.com/en/docs/cli/) · [GitHub](https://github.com/JoripSpace/joripspace-cli) · [Support](mailto:support@cosmosfarm.com)
27
-
28
- ## Install and update
29
-
30
- Install the CLI, then check the version your terminal runs:
31
-
32
- ```sh
33
- npm install -g @joripspace/cli@latest
34
- joripspace --version
35
- ```
36
-
37
- To update an existing installation, run the same install command again. Global installations do not update automatically. You can check the latest published version with:
38
-
39
- ```sh
40
- npm view @joripspace/cli@latest version
41
- ```
42
-
43
- If the version stays the same after an update, your terminal may still be using an older installation. Check its location with `Get-Command joripspace -All` in PowerShell or `command -v joripspace` on macOS and Linux. For an npm installation, `npm root -g` shows the directory containing `@joripspace/cli/bin/joripspace.js`, which you can run with Node.
44
-
45
- You can also run the CLI without a global installation:
46
-
47
- ```sh
48
- npx -y @joripspace/cli@latest --help
49
- npx -y @joripspace/cli@latest start PROJECT --json
50
- ```
51
-
52
- This selects the latest published npm release. Replace `PROJECT` with your existing project name. Installing the package does not log you in or change your project settings.
53
-
54
- ## Connect a project
55
-
56
- Open your project folder and run:
57
-
58
- ```sh
59
- joripspace login
60
- joripspace projects
61
- joripspace start PROJECT --json
62
- ```
63
-
64
- The login command opens an approval link in your browser. Sign in if needed, check the account and approve the connection. Keep the command running until it confirms the connection, then run `start` for the selected project. For an agent, use `login --no-open --json`; the pending approval link is emitted to stderr.
65
-
66
- `start` connects an existing project. It also prepares the project instructions for your agent and synchronizes source files when required by the connection. To create a project first, see [Create a project](#create-a-project) below.
67
-
68
- To work in another folder, add `--cwd`. Quote paths that contain spaces:
69
-
70
- ```sh
71
- joripspace start my-app --cwd "my project" --json
72
- joripspace get --cwd "my project" --json
73
- ```
74
-
75
- Without `--cwd`, the CLI uses the current folder and searches its parent folders for a project connection. The connected project name is recorded in `.joripspace/project`.
76
-
77
- ## Work with a coding agent
78
-
79
- Use an agent that can run terminal commands, edit files, and access the network. You can send it this prompt after replacing `PROJECT` with your project name:
80
-
81
- ```text
82
- Help me get started with JoripSpace project "PROJECT".
83
- 1. Install or update the official CLI with npm install -g @joripspace/cli@latest.
84
- Compare the version that actually runs with the latest version on npm.
85
- If an older executable is still selected, find and use the updated npm CLI.
86
- 2. Run joripspace start PROJECT --json and read its onboarding guide
87
- and the project instruction files to complete the connection.
88
- 3. Review the existing project and explain the next steps for my task.
89
- ```
90
-
91
- If approval is needed, run the returned login_command, show its approval_url and wait for the connected result, then run resume_command. No code entry is required:
92
-
93
- ```sh
94
- joripspace login --no-open --json
95
- joripspace start PROJECT --json
96
- ```
97
-
98
- The CLI connection works without a plugin or MCP setup. If you also use MCP, its client has a separate sign-in process. Reuse a saved CLI login or complete the CLI connection flow when switching between them. See the [MCP connection guide](https://joripspace.com/en/docs/mcp/) for client setup and tool details.
99
-
100
- ### Project instructions
101
-
102
- `start` returns a guide and writes it into a marked JoripSpace section in `AGENTS.md`. New files place `User instructions` first, followed by `JoripSpace managed instructions`. Existing user content is preserved, and `CLAUDE.md` keeps a reference to `AGENTS.md`.
103
-
104
- Your agent can use the returned guide immediately. If it does not load project files automatically, ask it to read the listed files in the current conversation. No agent restart is needed for this workflow.
105
-
106
- The guide explains how to find relevant CLI help, MCP tools, and task guidance as needed. You do not have to copy every command option into your project instructions. The [task workflows](https://joripspace.com/en/docs/agent-workflows/) show how to use these tools for deployment, database changes, service connections, and reports.
107
-
108
- ## Repeatable app deployment
109
-
110
- For a direct-deployment project, build the app and identify the bundled Worker entrypoint and assets.
111
- For example, when the output is `dist/worker.js`, deploy the output directory:
112
-
113
- ```sh
114
- npm run build
115
- joripspace deploy --cwd . --dir dist --entrypoint worker.js --label "Update app" --json
116
- ```
117
-
118
- The entrypoint is relative to `--dir`. Select the output directory even when `dist` is ignored at the project root;
119
- do not remove credential ignore rules or upload an unbundled source that imports excluded `node_modules`.
120
- Record the verified command in the app's `package.json` so subsequent deployments reuse it:
121
-
122
- ```json
123
- {
124
- "scripts": {
125
- "build": "node build.mjs",
126
- "joripspace:deploy": "npm run build && npx --yes @joripspace/cli@latest deploy --cwd . --dir \"dist\" --entrypoint \"worker.js\""
127
- }
128
- }
129
- ```
130
-
131
- Merge this into the existing scripts, preserving custom commands and using the actual build output paths.
132
- When deployment is requested, run `npm run joripspace:deploy -- --label "Describe the change"`.
133
- The build must succeed before upload. Check deployment status and the production root and changed routes afterward.
134
- GitHub-connected projects use their configured workflow and trigger instead of this direct-deployment script.
135
-
136
- The source tree also implements `deploy --prepare --dir dist --entrypoint worker.js --json`, which validates
137
- the built output and saves that script without deploying. This option is available in 0.7.0 and later; check the executing
138
- CLI's `deploy --help` before using it. Existing published CLIs can use the manual script above.
139
-
140
- ## Refresh guidance without changing app source
141
-
142
- `start` can synchronize GitHub source or restore a deployment into an empty workspace. Do not use it merely to
143
- refresh instructions. For guide-only maintenance, authenticated MCP clients call `prepare_project_workspace`
144
- with `guide_only: true`; the server omits source sync, legacy migrations, scaffold recovery, and service questions.
145
- This is a server capability, not a new CLI option.
146
-
147
- Without MCP, fetch `https://api.joripspace.com/onboarding.md` and use the section starting at the heading line
148
- `# JoripSpace project onboarding` to refresh only the bounded JoripSpace block in `AGENTS.md` and maintain the
149
- `CLAUDE.md` import. Preserve user instructions, the project marker, credentials, and application files.
150
-
151
- ## Find a command
152
-
153
- Start with the CLI help, then open the help for the command you want to use:
154
-
155
- ```sh
156
- joripspace --help
157
- joripspace deploy --help
158
- joripspace report --help
159
- ```
160
-
161
- | Task | Commands |
162
- | --- | --- |
163
- | Connect and inspect a project | `login`, `start`, `projects`, `get` |
164
- | Deploy and inspect history | `deploy`, `deployments`, `deployment get`, `deployment pull`, `rollback` |
165
- | Find and install templates | `templates`, `template list`, `install-template`, `template pull` |
166
- | Work with a database | `db schema`, `db query`, `db migrate` |
167
- | Manage stored files | `storage list`, `storage get`, `storage put`, `storage delete` |
168
- | Save and restore work | `checkpoint save`, `checkpoint list`, `checkpoint restore`, `checkpoint deploy` |
169
- | Manage Secrets | `secret list`, `secret generate`, `secret set`, `secret update` |
170
- | Manage realtime services | `realtime-v2 status`, `realtime-v2 activate`, `realtime-v2 keys` |
171
- | Connect domains, schedules, and mail | `domain`, `cron`, `mail` |
172
- | Inspect errors and usage | `events`, `usage-summary`, `usage-breakdown` |
173
- | Prepare GitHub workflows or find guidance | `github prepare`, `knowledge search` |
174
- | Report a problem or suggest an improvement | `report`, `feedback` |
175
- | Identify or revoke a connection token | `tokens current`, `tokens revoke` |
176
-
177
- The [CLI reference](https://joripspace.com/en/docs/cli/) covers the command groups and common options. GitHub source synchronization and template Git history features also require Git.
178
-
179
- ## Report a problem or suggest an improvement
180
-
181
- Use `report` while connected to the relevant project. Choose `problem` for a general issue, `bug` for a defect, or `feedback` for an improvement idea:
182
-
183
- ```sh
184
- joripspace report --project PROJECT --category bug --summary "Deployment status is incorrect" --details "Steps to reproduce the issue" --json
185
- joripspace feedback --project PROJECT --summary "Add deployment history filters" --expected "Search by label" --json
186
- ```
187
-
188
- A summary is required. You can add context with `--details`, describe the desired and current behavior with `--expected` and `--actual`, or include an error code with `--error-code`. CLI, Node.js, and OS information is attached automatically.
189
-
190
- Review the content before sending and leave out credentials, personal data, and private source code. If you are working with an agent, ask it to submit the report when you are ready. A successful response includes the report ID, `report_id`. If the response is interrupted, the report may already have been received, so avoid sending the same report repeatedly.
191
-
192
- `feedback` is a CLI 0.8.0 wrapper for `report --category feedback`. It shares the same options, authentication, submission and response. Use `feedback --help` for details. Older CLIs can use `report --category feedback`, available since 0.6.1. MCP agents also submit feedback through the CLI.
193
-
194
- ## Revoke an exposed connection token
195
-
196
- If a connection token has been exposed, you can disable it on the server. First check its ID, then revoke the current token:
197
-
198
- ```sh
199
- joripspace tokens current
200
- joripspace tokens revoke --current
201
- ```
202
-
203
- `tokens current` shows the ID without revealing the token value. Revoking the token ends the current connection and any MCP sessions using the same token. Run `joripspace login` to approve a new connection.
204
-
205
- To revoke a token from an older connection, sign in with another valid token in the same account and specify the exact ID:
206
-
207
- ```sh
208
- joripspace tokens revoke --token-id TOKEN_ID
209
- ```
210
-
211
- Check the target ID before running the command. You can also disable tokens on the API token page in your web profile. These CLI commands are available in 0.6.1 and later. `logout` removes a saved local login; it does not revoke the server token.
212
-
213
- ## Saved logins
214
-
215
- The CLI saves new logins in Windows Credential Manager, macOS Keychain, or Linux Secret Service when available. You can reuse that login across project folders under the same OS account. The project's Git-ignored `.env.joripspace` then contains only connection details such as the API URL, account ID, and connection source. An ordinary application `.env` file is not used for CLI authentication.
216
-
217
- If an OS credential store is unavailable before saving, the CLI stores the token in the selected project's `.env.joripspace` instead. This fallback is used only for that project. Keep the file out of Git, deployments, and checkpoints. The login response identifies the storage method as `os-credential-store` or `project-env-fallback`.
218
-
219
- If an OS credential write or verification fails, login stops without creating a file fallback. Once the store is available, running `login` can move an existing project-file token into it and remove the token from the file.
220
-
221
- `logout` removes the saved token entries in the current project file and the matching OS credential when available. Because an OS login is shared, removing it also affects other folders that use it. Other legacy folders and credentials supplied through environment variables are separate. A later OS login can be reused across folders, including folders where you previously logged out.
222
-
223
- For automation, supply `JORIPSPACE_API_TOKEN` and its matching `JORIPSPACE_API_URL` through the process environment. The default API address is `https://api.joripspace.com`; `--api-url` can select another endpoint. Existing project markers, `--project`, environment authentication, and legacy credential migration remain supported.
224
-
225
- ## Project Secrets
226
-
227
- If your app needs a random value, such as a session signing key, generate one without displaying it:
228
-
229
- ```sh
230
- joripspace secret generate --name SESSION_SECRET --json
231
- joripspace secret list --json
232
- ```
233
-
234
- An existing active value is preserved. For a key issued by an external provider, use `secret set --name API_KEY --value-stdin --json`, or its alias, `secret update`. Pass the exact value through standard input rather than command arguments, chat, logs, source, or temporary project files. Input must be 1–5120 UTF-8 bytes; whitespace and newlines are preserved. Secret values are never returned.
235
-
236
- ### Let the user enter a value
237
-
238
- When the user needs to supply a value, prepare a link for the required key:
239
-
240
- ```sh
241
- joripspace secret list --project PROJECT --name SECRET_NAME --json
242
- ```
243
-
244
- This reads the registered key metadata without creating or changing a value. Show the returned `secret_management_url` as a clickable link and explain what the value is needed for. The page opens with the key selected and the value field focused. The user enters the value and selects **Save**, or **Update** when replacing an existing value. Values do not belong in chat or URLs. Do not generate a placeholder for a value the user must supply.
245
-
246
- After the user confirms saving, run the same command again. Confirm that the key is registered; for a replacement, require `updated_at` to be newer than the initial `secret_entry.previous_updated_at`. Then test the feature that uses the value. The API's `active` status means the key is registered; it does not prove the application is using it or that an external service connection works.
247
-
248
- `secret_entry.verify_with` supplies CLI arguments and the existing MCP `list_secrets` call for this check. MCP accepts the same optional `name` argument. Keep the initial replacement timestamp until verification is complete.
249
-
250
- The Secret page also provides **Change** and **Delete** for each key. Change opens that key's value field; deletion requires confirmation. Secret deletion remains a web operation. All changes require project access and a valid, non-reserved key name.
251
-
252
- ## Create a project
253
-
254
- To create a new Free project, run `joripspace create --name my-app --json` first. It returns all three required agreements
255
- in English with the Korean web originals. Login is verified with the server before any agreements are shown;
256
- missing or revoked credentials stop creation. Agents must present the agreements faithfully in the user's language
257
- and obtain explicit consent before rerunning with `--agree-noncommercial --agree-billing --agree-retention --json`. Interactive
258
- terminals ask each agreement separately. `--yes` cannot replace consent. Web/server name restrictions and uniqueness
259
- checks apply. Creation does not link or change local project source; use `start` separately when requested.
260
-
261
- ## JSON output and agent integrations
262
-
263
- Add `--json` for structured output without browser launch or interactive prompts. Successful results go to stdout, and errors go to stderr. Existing result fields and exit codes `0`, `1`, and `2` are preserved. The shared agent guide is English; CLI notices and prompts follow the OS locale, using Korean for `ko` and English otherwise. JSON field names and error codes remain unchanged. Agreement payloads retain the English text and Korean originals so agents can explain them in your conversation language.
264
-
265
- The `onboarding` object provides `schema_version`, `instructions`, `read_files`, `invocation`, and `commands`. It also appears under `error.details.onboarding` when authentication is required, along with the login and resume steps.
266
-
267
- For tools that accept a command and argument list, run `invocation.command`, append CLI arguments after `invocation.args`, and use `invocation.cwd` as the working folder. With an npm installation, this runs Node with the absolute JavaScript entrypoint. The `executable`, `login_command`, `resume_command`, and `install_command` fields remain available for existing integrations. In PowerShell, use `&` before a quoted executable path.
268
-
269
- If an interactive connection cannot open a browser, open the printed URL yourself. Interactive `start` uses Windows `cmd.exe`, macOS `open`, or Linux `xdg-open` for that step.
270
-
271
- ## What's new in 0.6.1
272
-
273
- - Submit improvement suggestions with `report --category feedback` and read the dedicated `report --help`.
274
- - Identify the current connection token and revoke exposed tokens with `tokens current` and `tokens revoke`.
275
- - Keep user instructions separate from the managed JoripSpace section in `AGENTS.md`, with existing user content preserved.
276
- - The onboarding guide now asks your coding agent to check the running CLI version against npm, use the CLI when available, and keep CLI and MCP logins separate.
277
- - Find current command options and task guidance as needed, with links to the public CLI, MCP, and workflow documentation.
278
-
279
- ## Development and package verification
280
-
281
- This repository works independently of the platform repository and runs without a compilation step. To check the source and package:
282
-
283
- ```sh
284
- npm ci --ignore-scripts
285
- npm run check
286
- npm test
287
- npm run test:package
288
- ```
289
-
290
- The package's `prepack` check validates metadata, JavaScript syntax, the Node shebang, and executable permissions. There are no installation lifecycle hooks.
291
-
292
- `test:package` builds a tarball in `.artifacts/` and checks its contents, hashes, licenses, and permissions. It then verifies clean installation, npx, npm exec, arguments, output, exit codes, working folders, cancellation, and saved login reuse against a local mock API. Temporary test folders include paths with spaces and Korean characters. Production projects and real user credentials are not used.
293
-
294
- Set `JORIPSPACE_BASELINE_CLI` to an original `bin/joripspace.js` to compare against that CLI. Otherwise, comparisons use this repository's source. To try the tarball before publishing:
295
-
296
- ```sh
297
- npm exec --yes --package="/absolute/path/joripspace-cli-VERSION.tgz" -- joripspace --help
298
- ```
299
-
300
- Replace `VERSION` with the tarball version. On Windows, use a path such as `C:/path/to/joripspace-cli-VERSION.tgz`. See the [release guide](https://github.com/JoripSpace/joripspace-cli/blob/main/docs/release.md) for the local publishing procedure. Package checks and npm publishing run locally; this repository does not use GitHub Actions for them.
301
-
302
- ## License
303
-
304
- JoripSpace CLI is available under the [MIT License](LICENSE).
305
-
306
- Copyright (c) 2026 Cosmosfarm Software
307
-
308
- Use of the JoripSpace cloud service is subject to separate service terms and pricing plans. Platform server, administration, and infrastructure code are not included in this CLI distribution. Included Worker examples are public customer templates.
309
-
310
- Third-party dependencies retain their original licenses and copyrights. See [Third-party notices](THIRD_PARTY_NOTICES.md) for the preserved license texts.
311
-
312
- ## Support
313
-
314
- - Documentation: [CLI reference](https://joripspace.com/en/docs/cli/) · [MCP connection and tools](https://joripspace.com/en/docs/mcp/) · [Task workflows](https://joripspace.com/en/docs/agent-workflows/)
315
- - Platform problems and suggestions: use `joripspace report` from a connected project.
316
- - CLI repository issues: [GitHub Issues](https://github.com/JoripSpace/joripspace-cli/issues)
317
- - Email: [support@cosmosfarm.com](mailto:support@cosmosfarm.com)
1
+ # JoripSpace CLI
2
+
3
+ ## Approval links in 0.8.0
4
+
5
+ CLI 0.8.0 uses browser approval links for new connections. Existing valid CLI logins and MCP OAuth sessions are reused. Only the server retains code APIs for previously released clients.
6
+
7
+ For a new connection, run:
8
+
9
+ ```sh
10
+ joripspace login --no-open --json --cwd PROJECT_ROOT
11
+ ```
12
+
13
+ The CLI checks server support and emits an `approval_pending` JSON event to **stderr** containing a five-minute `approval_url` and `next_action`. Show that link to the user and keep the same process running. The user signs in, checks the account and approves; no code is copied. Interactive `login` opens the browser unless `--no-open` is set. With `--json`, the CLI prints the link without opening a browser. The CLI then stores the credential and writes one final JSON result to **stdout** with `status`, `next_action` and, when a project is selected, `next_command`. Never print credentials or the private polling secret; that secret stays in process memory.
14
+
15
+ Current CLI login uses approval links only. Unsupported servers and errors stop login without switching authentication methods. Existing valid logins are reused. The server retains old code APIs only for previously released clients.
16
+
17
+ MCP uses the existing `start_login` to issue approval links and check them with `request_id` in the same initialized MCP session. Follow status, next_action, next_tool and interval; after connection call start_project_session without tokens. No code entry is required.
18
+
19
+
20
+ **JoripSpace — Build and deploy web apps with AI agents. Powered by Cosmosfarm.**
21
+
22
+ The official command-line client for JoripSpace. Connect a project, deploy your app, and manage its database, files, Secrets, and realtime services from your terminal or coding agent.
23
+
24
+ The CLI runs on Windows, macOS, and Linux with **Node.js 18 or later and npm**. It runs directly in Node.js, so you do not need a TypeScript compiler or native build tools to install it.
25
+
26
+ [Website](https://joripspace.com) · [Documentation](https://joripspace.com/en/docs/) · [CLI reference](https://joripspace.com/en/docs/cli/) · [GitHub](https://github.com/JoripSpace/joripspace-cli) · [Support](mailto:support@cosmosfarm.com)
27
+
28
+ ## Install and update
29
+
30
+ Install the CLI, then check the version your terminal runs:
31
+
32
+ ```sh
33
+ npm install -g @joripspace/cli@latest
34
+ joripspace --version
35
+ ```
36
+
37
+ To update an existing installation, run the same install command again. Global installations do not update automatically. You can check the latest published version with:
38
+
39
+ ```sh
40
+ npm view @joripspace/cli@latest version
41
+ ```
42
+
43
+ If the version stays the same after an update, your terminal may still be using an older installation. Check its location with `Get-Command joripspace -All` in PowerShell or `command -v joripspace` on macOS and Linux. For an npm installation, `npm root -g` shows the directory containing `@joripspace/cli/bin/joripspace.js`, which you can run with Node.
44
+
45
+ You can also run the CLI without a global installation:
46
+
47
+ ```sh
48
+ npx -y @joripspace/cli@latest --help
49
+ npx -y @joripspace/cli@latest start PROJECT --json
50
+ ```
51
+
52
+ This selects the latest published npm release. Replace `PROJECT` with your existing project name. Installing the package does not log you in or change your project settings.
53
+
54
+ ## Connect a project
55
+
56
+ Open your project folder and run:
57
+
58
+ ```sh
59
+ joripspace login
60
+ joripspace projects
61
+ joripspace start PROJECT --json
62
+ ```
63
+
64
+ The login command opens an approval link in your browser. Sign in if needed, check the account and approve the connection. Keep the command running until it confirms the connection, then run `start` for the selected project. For an agent, use `login --no-open --json`; the pending approval link is emitted to stderr.
65
+
66
+ `start` connects an existing project. It also prepares the project instructions for your agent and synchronizes source files when required by the connection. To create a project first, see [Create a project](#create-a-project) below.
67
+
68
+ To work in another folder, add `--cwd`. Quote paths that contain spaces:
69
+
70
+ ```sh
71
+ joripspace start my-app --cwd "my project" --json
72
+ joripspace get --cwd "my project" --json
73
+ ```
74
+
75
+ Without `--cwd`, the CLI uses the current folder and searches its parent folders for a project connection. The connected project name is recorded in `.joripspace/project`.
76
+
77
+ ## Work with a coding agent
78
+
79
+ Use an agent that can run terminal commands, edit files, and access the network. You can send it this prompt after replacing `PROJECT` with your project name:
80
+
81
+ ```text
82
+ Help me get started with JoripSpace project "PROJECT".
83
+ 1. Install or update the official CLI with npm install -g @joripspace/cli@latest.
84
+ Compare the version that actually runs with the latest version on npm.
85
+ If an older executable is still selected, find and use the updated npm CLI.
86
+ 2. Run joripspace start PROJECT --json and read its onboarding guide
87
+ and the project instruction files to complete the connection.
88
+ 3. Review the existing project and explain the next steps for my task.
89
+ ```
90
+
91
+ If approval is needed, run the returned login_command, show its approval_url and wait for the connected result, then run resume_command. No code entry is required:
92
+
93
+ ```sh
94
+ joripspace login --no-open --json
95
+ joripspace start PROJECT --json
96
+ ```
97
+
98
+ The CLI connection works without a plugin or MCP setup. If you also use MCP, its client has a separate sign-in process. Reuse a saved CLI login or complete the CLI connection flow when switching between them. See the [MCP connection guide](https://joripspace.com/en/docs/mcp/) for client setup and tool details.
99
+
100
+ ### Project instructions
101
+
102
+ `start` retrieves the current guide from the project server and writes it into a marked JoripSpace section in `AGENTS.md`. New files place `User instructions` first, followed by `JoripSpace managed instructions`. Existing user content is preserved, and `CLAUDE.md` keeps a reference to `AGENTS.md`.
103
+
104
+ Your agent can use the returned guide immediately. If it does not load project files automatically, ask it to read the listed files in the current conversation. No agent restart is needed for this workflow.
105
+
106
+ The guide explains how to find relevant CLI help, MCP tools, and task guidance as needed. You do not have to copy every command option into your project instructions. The [task workflows](https://joripspace.com/en/docs/agent-workflows/) show how to use these tools for deployment, database changes, service connections, and reports.
107
+
108
+ ## Repeatable app deployment
109
+
110
+ For a direct-deployment project, build the app and identify the bundled Worker entrypoint and assets.
111
+ For example, when the output is `dist/worker.js`, deploy the output directory:
112
+
113
+ ```sh
114
+ npm run build
115
+ joripspace deploy --cwd . --dir dist --entrypoint worker.js --label "Update app" --json
116
+ ```
117
+
118
+ The entrypoint is relative to `--dir`. Select the output directory even when `dist` is ignored at the project root;
119
+ do not remove credential ignore rules or upload an unbundled source that imports excluded `node_modules`.
120
+ Record the verified command in the app's `package.json` so subsequent deployments reuse it:
121
+
122
+ ```json
123
+ {
124
+ "scripts": {
125
+ "build": "node build.mjs",
126
+ "joripspace:deploy": "npm run build && npx --yes @joripspace/cli@latest deploy --cwd . --dir \"dist\" --entrypoint \"worker.js\""
127
+ }
128
+ }
129
+ ```
130
+
131
+ Merge this into the existing scripts, preserving custom commands and using the actual build output paths.
132
+ When deployment is requested, run `npm run joripspace:deploy -- --label "Describe the change"`.
133
+ The build must succeed before upload. Check deployment status and the production root and changed routes afterward.
134
+ GitHub-connected projects use their configured workflow and trigger instead of this direct-deployment script.
135
+
136
+ The source tree also implements `deploy --prepare --dir dist --entrypoint worker.js --json`, which validates
137
+ the built output and saves that script without deploying. This option is available in 0.7.0 and later; check the executing
138
+ CLI's `deploy --help` before using it. Existing published CLIs can use the manual script above.
139
+
140
+ ## Refresh guidance without changing app source
141
+
142
+ In CLI 0.9.0 and later, use the guide-only option to retrieve current instructions from the project server:
143
+
144
+ ```sh
145
+ joripspace start PROJECT --guide-only --json
146
+ ```
147
+
148
+ This updates only the JoripSpace managed block in `AGENTS.md`, the `CLAUDE.md` import and the canonical project marker. User instructions, notes and examples outside the managed block are preserved. It does not synchronize application source, restore deployments or migrate legacy files. A normal `start` can synchronize source, so use `--guide-only` when you only need to refresh instructions.
149
+
150
+ Authenticated MCP clients use `prepare_project_workspace` with `guide_only: true` for the same server-managed instructions. The legacy `/onboarding.md` URL is not used for refresh. An older CLI needs a one-time upgrade to use `--guide-only`; later guide content changes require only a server update and a project guide refresh.
151
+
152
+ The guide tells agents to check for updates at the start of each new task, when resuming a session or compacted context, at major phase transitions during long-running work and immediately before deployment. These checks are performed by the agent during its work; they are not background polling or server pushes. After an update, the agent rereads `AGENTS.md` and continues to follow the preserved user instructions.
153
+
154
+ ## Find a command
155
+
156
+ Start with the CLI help, then open the help for the command you want to use:
157
+
158
+ ```sh
159
+ joripspace --help
160
+ joripspace deploy --help
161
+ joripspace report --help
162
+ ```
163
+
164
+ | Task | Commands |
165
+ | --- | --- |
166
+ | Connect and inspect a project | `login`, `start`, `projects`, `get` |
167
+ | Deploy and inspect history | `deploy`, `deployments`, `deployment get`, `deployment pull`, `rollback` |
168
+ | Find and install templates | `templates`, `template list`, `install-template`, `template pull` |
169
+ | Work with a database | `db schema`, `db query`, `db migrate` |
170
+ | Manage stored files | `storage list`, `storage get`, `storage put`, `storage delete` |
171
+ | Save and restore work | `checkpoint save`, `checkpoint list`, `checkpoint restore`, `checkpoint deploy` |
172
+ | Manage Secrets | `secret list`, `secret generate`, `secret set`, `secret update` |
173
+ | Manage realtime services | `realtime-v2 status`, `realtime-v2 activate`, `realtime-v2 keys` |
174
+ | Connect domains, schedules, and mail | `domain`, `cron`, `mail` |
175
+ | Inspect errors and usage | `events`, `usage-summary`, `usage-breakdown` |
176
+ | Prepare GitHub workflows or find guidance | `github prepare`, `knowledge search` |
177
+ | Report a problem or suggest an improvement | `report`, `feedback` |
178
+ | Identify or revoke a connection token | `tokens current`, `tokens revoke` |
179
+
180
+ The [CLI reference](https://joripspace.com/en/docs/cli/) covers the command groups and common options. GitHub source synchronization and template Git history features also require Git.
181
+
182
+ ## Report a problem or suggest an improvement
183
+
184
+ Use `report` while connected to the relevant project. Choose `problem` for a general issue, `bug` for a defect, or `feedback` for an improvement idea:
185
+
186
+ ```sh
187
+ joripspace report --project PROJECT --category bug --summary "Deployment status is incorrect" --details "Steps to reproduce the issue" --json
188
+ joripspace feedback --project PROJECT --summary "Add deployment history filters" --expected "Search by label" --json
189
+ ```
190
+
191
+ A summary is required. You can add context with `--details`, describe the desired and current behavior with `--expected` and `--actual`, or include an error code with `--error-code`. CLI, Node.js, and OS information is attached automatically.
192
+
193
+ Review the content before sending and leave out credentials, personal data, and private source code. If you are working with an agent, ask it to submit the report when you are ready. A successful response includes the report ID, `report_id`. If the response is interrupted, the report may already have been received, so avoid sending the same report repeatedly.
194
+
195
+ `feedback` is a CLI 0.8.0 wrapper for `report --category feedback`. It shares the same options, authentication, submission and response. Use `feedback --help` for details. Older CLIs can use `report --category feedback`, available since 0.6.1. MCP agents also submit feedback through the CLI.
196
+
197
+ ## Revoke an exposed connection token
198
+
199
+ If a connection token has been exposed, you can disable it on the server. First check its ID, then revoke the current token:
200
+
201
+ ```sh
202
+ joripspace tokens current
203
+ joripspace tokens revoke --current
204
+ ```
205
+
206
+ `tokens current` shows the ID without revealing the token value. Revoking the token ends the current connection and any MCP sessions using the same token. Run `joripspace login` to approve a new connection.
207
+
208
+ To revoke a token from an older connection, sign in with another valid token in the same account and specify the exact ID:
209
+
210
+ ```sh
211
+ joripspace tokens revoke --token-id TOKEN_ID
212
+ ```
213
+
214
+ Check the target ID before running the command. You can also disable tokens on the API token page in your web profile. These CLI commands are available in 0.6.1 and later. `logout` removes a saved local login; it does not revoke the server token.
215
+
216
+ ## Saved logins
217
+
218
+ The CLI saves new logins in Windows Credential Manager, macOS Keychain, or Linux Secret Service when available. You can reuse that login across project folders under the same OS account. The project's Git-ignored `.env.joripspace` then contains only connection details such as the API URL, account ID, and connection source. An ordinary application `.env` file is not used for CLI authentication.
219
+
220
+ If an OS credential store is unavailable before saving, the CLI stores the token in the selected project's `.env.joripspace` instead. This fallback is used only for that project. Keep the file out of Git, deployments, and checkpoints. The login response identifies the storage method as `os-credential-store` or `project-env-fallback`.
221
+
222
+ If an OS credential write or verification fails, login stops without creating a file fallback. Once the store is available, running `login` can move an existing project-file token into it and remove the token from the file.
223
+
224
+ `logout` removes the saved token entries in the current project file and the matching OS credential when available. Because an OS login is shared, removing it also affects other folders that use it. Other legacy folders and credentials supplied through environment variables are separate. A later OS login can be reused across folders, including folders where you previously logged out.
225
+
226
+ For automation, supply `JORIPSPACE_API_TOKEN` and its matching `JORIPSPACE_API_URL` through the process environment. The default API address is `https://api.joripspace.com`; `--api-url` can select another endpoint. Existing project markers, `--project`, environment authentication, and legacy credential migration remain supported.
227
+
228
+ ## Project Secrets
229
+
230
+ If your app needs a random value, such as a session signing key, generate one without displaying it:
231
+
232
+ ```sh
233
+ joripspace secret generate --name SESSION_SECRET --json
234
+ joripspace secret list --json
235
+ ```
236
+
237
+ An existing active value is preserved. For a key issued by an external provider, use `secret set --name API_KEY --value-stdin --json`, or its alias, `secret update`. Pass the exact value through standard input rather than command arguments, chat, logs, source, or temporary project files. Input must be 1–5120 UTF-8 bytes; whitespace and newlines are preserved. Secret values are never returned.
238
+
239
+ ### Let the user enter a value
240
+
241
+ When the user needs to supply a value, prepare a link for the required key:
242
+
243
+ ```sh
244
+ joripspace secret list --project PROJECT --name SECRET_NAME --json
245
+ ```
246
+
247
+ This reads the registered key metadata without creating or changing a value. Show the returned `secret_management_url` as a clickable link and explain what the value is needed for. The page opens with the key selected and the value field focused. The user enters the value and selects **Save**, or **Update** when replacing an existing value. Values do not belong in chat or URLs. Do not generate a placeholder for a value the user must supply.
248
+
249
+ After the user confirms saving, run the same command again. Confirm that the key is registered; for a replacement, require `updated_at` to be newer than the initial `secret_entry.previous_updated_at`. Then test the feature that uses the value. The API's `active` status means the key is registered; it does not prove the application is using it or that an external service connection works.
250
+
251
+ `secret_entry.verify_with` supplies CLI arguments and the existing MCP `list_secrets` call for this check. MCP accepts the same optional `name` argument. Keep the initial replacement timestamp until verification is complete.
252
+
253
+ The Secret page also provides **Change** and **Delete** for each key. Change opens that key's value field; deletion requires confirmation. Secret deletion remains a web operation. All changes require project access and a valid, non-reserved key name.
254
+
255
+ ## Create a project
256
+
257
+ To create a new Free project, run `joripspace create --name my-app --json` first. It returns all three required agreements
258
+ in English with the Korean web originals. Login is verified with the server before any agreements are shown;
259
+ missing or revoked credentials stop creation. Agents must present the agreements faithfully in the user's language
260
+ and obtain explicit consent before rerunning with `--agree-noncommercial --agree-billing --agree-retention --json`. Interactive
261
+ terminals ask each agreement separately. `--yes` cannot replace consent. Web/server name restrictions and uniqueness
262
+ checks apply. Creation does not link or change local project source; use `start` separately when requested.
263
+
264
+ ## JSON output and agent integrations
265
+
266
+ Add `--json` for structured output without browser launch or interactive prompts. Successful results go to stdout, and errors go to stderr. Existing result fields and exit codes `0`, `1`, and `2` are preserved. The shared agent guide is English; CLI notices and prompts follow the OS locale, using Korean for `ko` and English otherwise. JSON field names and error codes remain unchanged. Agreement payloads retain the English text and Korean originals so agents can explain them in your conversation language.
267
+
268
+ The `onboarding` object provides `schema_version`, `instructions`, `read_files`, `invocation`, and `commands`. When authentication is required, `error.details.onboarding` contains login and resume steps; the full project guide is retrieved after authentication.
269
+
270
+ For tools that accept a command and argument list, run `invocation.command`, append CLI arguments after `invocation.args`, and use `invocation.cwd` as the working folder. With an npm installation, this runs Node with the absolute JavaScript entrypoint. The `executable`, `login_command`, `resume_command`, and `install_command` fields remain available for existing integrations. In PowerShell, use `&` before a quoted executable path.
271
+
272
+ If an interactive connection cannot open a browser, open the printed URL yourself. Interactive `start` uses Windows `cmd.exe`, macOS `open`, or Linux `xdg-open` for that step.
273
+
274
+ ## What's new in 0.6.1
275
+
276
+ - Submit improvement suggestions with `report --category feedback` and read the dedicated `report --help`.
277
+ - Identify the current connection token and revoke exposed tokens with `tokens current` and `tokens revoke`.
278
+ - Keep user instructions separate from the managed JoripSpace section in `AGENTS.md`, with existing user content preserved.
279
+ - The onboarding guide now asks your coding agent to check the running CLI version against npm, use the CLI when available, and keep CLI and MCP logins separate.
280
+ - Find current command options and task guidance as needed, with links to the public CLI, MCP, and workflow documentation.
281
+
282
+ ## Development and package verification
283
+
284
+ This repository works independently of the platform repository and runs without a compilation step. To check the source and package:
285
+
286
+ ```sh
287
+ npm ci --ignore-scripts
288
+ npm run check
289
+ npm test
290
+ npm run test:package
291
+ ```
292
+
293
+ The package's `prepack` check validates metadata, JavaScript syntax, the Node shebang, and executable permissions. There are no installation lifecycle hooks.
294
+
295
+ `test:package` builds a tarball in `.artifacts/` and checks its contents, hashes, licenses, and permissions. It then verifies clean installation, npx, npm exec, arguments, output, exit codes, working folders, cancellation, and saved login reuse against a local mock API. Temporary test folders include paths with spaces and Korean characters. Production projects and real user credentials are not used.
296
+
297
+ Set `JORIPSPACE_BASELINE_CLI` to an original `bin/joripspace.js` to compare against that CLI. Otherwise, comparisons use this repository's source. To try the tarball before publishing:
298
+
299
+ ```sh
300
+ npm exec --yes --package="/absolute/path/joripspace-cli-VERSION.tgz" -- joripspace --help
301
+ ```
302
+
303
+ Replace `VERSION` with the tarball version. On Windows, use a path such as `C:/path/to/joripspace-cli-VERSION.tgz`. See the [release guide](https://github.com/JoripSpace/joripspace-cli/blob/main/docs/release.md) for the local publishing procedure. Package checks and npm publishing run locally; this repository does not use GitHub Actions for them.
304
+
305
+ ## License
306
+
307
+ JoripSpace CLI is available under the [MIT License](LICENSE).
308
+
309
+ Copyright (c) 2026 Cosmosfarm Software
310
+
311
+ Use of the JoripSpace cloud service is subject to separate service terms and pricing plans. Platform server, administration, and infrastructure code are not included in this CLI distribution. Included Worker examples are public customer templates.
312
+
313
+ Third-party dependencies retain their original licenses and copyrights. See [Third-party notices](THIRD_PARTY_NOTICES.md) for the preserved license texts.
314
+
315
+ ## Support
316
+
317
+ - Documentation: [CLI reference](https://joripspace.com/en/docs/cli/) · [MCP connection and tools](https://joripspace.com/en/docs/mcp/) · [Task workflows](https://joripspace.com/en/docs/agent-workflows/)
318
+ - Platform problems and suggestions: use `joripspace report` from a connected project.
319
+ - CLI repository issues: [GitHub Issues](https://github.com/JoripSpace/joripspace-cli/issues)
320
+ - Email: [support@cosmosfarm.com](mailto:support@cosmosfarm.com)