amorphous-cli 0.1.9 → 0.1.11

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,6 +1,6 @@
1
1
  # amorphous-cli
2
2
 
3
- Make whatever you want, yourself, with your own agent, or with others. And whatever you want can be private, public, or even have users.
3
+ Make whatever you want, yourself, with your own agent, or with others. And whatever you want can be private, public, or even have users of its own.
4
4
 
5
5
  ```bash
6
6
  npx amorphous-cli@latest setup
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
5
5
  import { homedir } from 'node:os'
6
6
  import { CLI_VERSION } from './version.mjs'
7
7
 
8
- export const CONTRACT_VERSION = 10
8
+ export const CONTRACT_VERSION = 13
9
9
 
10
10
  const skillRoot = join(dirname(fileURLToPath(import.meta.url)), '../skill/amorphous')
11
11
 
package/lib/api.mjs CHANGED
@@ -2,7 +2,6 @@ import { cliAppFetchOrigin, cliAppHostHeader } from './config.mjs'
2
2
  import { ensureFreshSession } from './session.mjs'
3
3
 
4
4
  const FRIENDLY = {
5
- 'You already own 2 abstracts': 'You already own 2 abstracts. Run: amorphous-cli list',
6
5
  'This abstract already has 8 people': 'This abstract already has 8 people. Run: amorphous-cli people',
7
6
  'User not found': 'No account with that email yet.',
8
7
  'Grant failed': 'Could not invite. Run: amorphous-cli people',
@@ -27,6 +26,9 @@ export function friendlyMessage(raw) {
27
26
  if (FRIENDLY[text]) return FRIENDLY[text]
28
27
  const stripped = text.replace(/^\d{3}\s+/, '')
29
28
  if (FRIENDLY[stripped]) return FRIENDLY[stripped]
29
+ if (/^You already own \d+ abstracts$/.test(stripped)) {
30
+ return `${stripped}. Run: amorphous-cli list`
31
+ }
30
32
  return stripped || text || 'Request failed.'
31
33
  }
32
34
 
package/lib/commands.mjs CHANGED
@@ -199,6 +199,11 @@ async function cmdSetup(rest) {
199
199
  }
200
200
  console.log('Installed the Amorphous skill.')
201
201
  for (const dir of dirs ?? installUserSkill()) console.log(dir)
202
+ console.log(`
203
+ Tell the person:
204
+ They describe what they want made. You make it.
205
+ Prefer amorphous-cli serve while you edit. Open the URL and leave it running. It reloads when the files change.
206
+ They tell you when to push, preview, publish, or invite.`)
202
207
  }
203
208
 
204
209
  async function cmdCreate(cwd, rest) {
@@ -225,7 +230,10 @@ async function cmdCreate(cwd, rest) {
225
230
  writeStarter(cwd)
226
231
  syncProjectContract(cwd)
227
232
  if (jsonMode(flags)) printJson({ id, name: name || 'Untitled' })
228
- else console.log(id)
233
+ else {
234
+ console.log(id)
235
+ console.log('Prefer amorphous-cli serve while you edit.')
236
+ }
229
237
  }
230
238
 
231
239
  function takeAccess(flags, positional) {
@@ -326,6 +334,7 @@ async function cmdPull(cwd, rest) {
326
334
  })
327
335
  syncProjectContract(cwd)
328
336
  console.log('Pulled.')
337
+ console.log('Prefer amorphous-cli serve while you edit.')
329
338
  }
330
339
 
331
340
  async function cmdPush(cwd, rest) {
package/lib/help.mjs CHANGED
@@ -7,7 +7,7 @@ export const ROOT_HELP = `Amorphous
7
7
  create New abstract
8
8
  open [abstract] Open URL
9
9
  preview [abstract] Preview URL (draft)
10
- serve Serve this folder locally
10
+ serve Develop in this folder
11
11
  pull Pull draft and records to this folder
12
12
  push Push local files
13
13
  publish [--live] Publish a version; --live is Go live
@@ -67,7 +67,7 @@ Print the Preview URL (draft).`,
67
67
 
68
68
  serve: `serve [--port <n>] [--json]
69
69
 
70
- Serve this folder on 127.0.0.1 and reload when index.html, styles.css, or app.js changes.
70
+ Preferred way to develop in this folder. Serves it on 127.0.0.1 and reloads when index.html, styles.css, or app.js changes. Leave it running and open the URL.
71
71
  Records start local, in this folder. The page can switch to prod, which reads and writes the abstract's records.`,
72
72
 
73
73
  pull: `pull
package/mcp.mjs CHANGED
@@ -72,7 +72,7 @@ await serveStdio(() => {
72
72
  {
73
73
  title: 'Pull the abstract',
74
74
  description:
75
- 'Download the abstract files and records into this folder. Overwrites the local copies of those files.',
75
+ 'Download the abstract files and records into this folder. Overwrites the local copies of those files. Prefer amorphous-cli serve while editing; it reloads as the files change.',
76
76
  inputSchema: z.object({}),
77
77
  annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true },
78
78
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amorphous-cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "mcpName": "io.github.amorphous-one/amorphous",
5
5
  "description": "Make whatever you want, yourself, with your own agent, or with others.",
6
6
  "type": "module",
@@ -3,7 +3,7 @@ name: amorphous
3
3
  description: Make whatever you want, yourself, with your own agent, or with others. Use when someone wants an abstract other people can open, or wants to invite people, publish, or change an abstract.
4
4
  ---
5
5
 
6
- Make whatever you want, yourself, with your own agent, or with others. And whatever you want can be private, public, or even have users.
6
+ Make whatever you want, yourself, with your own agent, or with others. And whatever you want can be private, public, or even have users of its own.
7
7
 
8
8
  ## Files
9
9
 
@@ -30,6 +30,14 @@ A running abstract provides `amorphous` in `app.js`:
30
30
 
31
31
  A private record belongs to the signed-in person who wrote it. The abstract does not read `private.ndjson`.
32
32
 
33
+ ## Person
34
+
35
+ After `setup`, tell them this, briefly. `setup` also prints it. Say it to them in your own words.
36
+
37
+ They describe what they want made. You make it.
38
+ Prefer `amorphous-cli serve` while you edit. Open the URL and leave it running. It reloads when the files change, and it is the easiest way for them to look at the work.
39
+ They tell you when to push, preview, publish, or invite. Do those when they ask.
40
+
33
41
  ## Loop
34
42
 
35
43
  Install the CLI once with `npm install -g amorphous-cli@latest`, then call it as `amorphous-cli <command>`. If a command prints `Run: npm install -g amorphous-cli@latest && amorphous-cli setup`, run that line, then repeat the command.
@@ -37,11 +45,14 @@ Install the CLI once with `npm install -g amorphous-cli@latest`, then call it as
37
45
  1. If you are not signed in, run `amorphous-cli login`. Show the person the link it prints and ask them to finish in the browser. Do not ask for an email or a code.
38
46
  2. `amorphous-cli create --name "..."` in a folder, or `amorphous-cli pull` when `.amorphous.json` is already there.
39
47
  3. Edit the files to match what they asked for. `me` and `names` are how the abstract knows who is here.
40
- 4. `amorphous-cli serve` and open that URL. It reloads when the files change. Records on that page start in this folder. Switch the page to prod to read and write the abstract's records.
41
- 5. `amorphous-cli push` sends the source. `amorphous-cli push --data` also sends the records in this folder.
42
- 6. `amorphous-cli preview` and open that URL.
43
- 7. `amorphous-cli publish --live`
44
- 8. `amorphous-cli invite <email> use` or `edit` or `view`. It prints a link and does not send an email. Give them that link. They open it and sign in with that email.
48
+ 4. Prefer `amorphous-cli serve` while you edit. Open that URL and leave it running. It reloads when the files change, and it is the easiest way to check the work. Records on that page start in this folder. Switch the page to prod to read and write the abstract's records. You can push and preview without it.
49
+
50
+ When they ask:
51
+
52
+ - `amorphous-cli push` sends the source. `amorphous-cli push --data` also sends the records in this folder.
53
+ - `amorphous-cli preview` and open that URL.
54
+ - `amorphous-cli publish --live`
55
+ - `amorphous-cli invite <email> use` or `edit` or `view`. It prints a link and does not send an email. Give them that link. They open it and sign in with that email.
45
56
 
46
57
  `amorphous-cli visibility anyone` lets anyone view and write shared records. `amorphous-cli visibility members` keeps the abstract to invited people.
47
58