pageship 0.1.1 → 0.3.0

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.
Files changed (43) hide show
  1. package/README.md +18 -108
  2. package/dist/cli.mjs +1889 -481
  3. package/dist/skills/LICENSE +21 -0
  4. package/dist/skills/pageship/SKILL.md +150 -0
  5. package/dist/skills/pageship/references/download.md +9 -0
  6. package/dist/skills/pageship/references/list-and-history.md +15 -0
  7. package/dist/skills/pageship/references/restore.md +9 -0
  8. package/dist/skills/pageship/references/visibility.md +12 -0
  9. package/dist/skills/pageship-chart/SKILL.md +110 -0
  10. package/dist/skills/pageship-code-block/SKILL.md +113 -0
  11. package/dist/skills/pageship-code-block/references/highlight-lock.json +542 -0
  12. package/dist/skills/pageship-code-block/references/highlight.mjs +138 -0
  13. package/dist/skills/pageship-decision-record/SKILL.md +43 -0
  14. package/dist/skills/pageship-diagram/SKILL.md +92 -0
  15. package/dist/skills/pageship-diagram/references/check-diagram.js +301 -0
  16. package/dist/skills/pageship-diagram/references/computed-layout.md +49 -0
  17. package/dist/skills/pageship-diagram/references/layout.mjs +310 -0
  18. package/dist/skills/pageship-diagram/references/mermaid.md +89 -0
  19. package/dist/skills/pageship-diagram/references/svg.md +205 -0
  20. package/dist/skills/pageship-docs/NOTICES.md +35 -0
  21. package/dist/skills/pageship-docs/SKILL.md +67 -0
  22. package/dist/skills/pageship-docs/references/ask.md +18 -0
  23. package/dist/skills/pageship-docs/references/check.md +39 -0
  24. package/dist/skills/pageship-docs/references/content.md +29 -0
  25. package/dist/skills/pageship-docs/references/design.md +60 -0
  26. package/dist/skills/pageship-docs/references/file.md +52 -0
  27. package/dist/skills/pageship-docs/references/plain-default.md +331 -0
  28. package/dist/skills/pageship-explainer/SKILL.md +92 -0
  29. package/dist/skills/pageship-interaction/SKILL.md +115 -0
  30. package/dist/skills/pageship-interaction/references/pointer.md +271 -0
  31. package/dist/skills/pageship-interaction/references/step-through.md +146 -0
  32. package/dist/skills/pageship-key-figures/SKILL.md +127 -0
  33. package/dist/skills/pageship-media/SKILL.md +122 -0
  34. package/dist/skills/pageship-motion/SKILL.md +58 -0
  35. package/dist/skills/pageship-plan/SKILL.md +55 -0
  36. package/dist/skills/pageship-report/SKILL.md +29 -0
  37. package/dist/skills/pageship-review-report/SKILL.md +90 -0
  38. package/dist/skills/pageship-slide-deck/SKILL.md +53 -0
  39. package/dist/skills/pageship-slide-deck/references/engine.md +362 -0
  40. package/dist/skills/pageship-spec/SKILL.md +58 -0
  41. package/dist/skills/pageship-table/SKILL.md +243 -0
  42. package/dist/skills/pageship-table/references/sort-and-filter.md +235 -0
  43. package/package.json +1 -1
package/README.md CHANGED
@@ -1,122 +1,32 @@
1
- # Pageship
1
+ # Pageship CLI
2
2
 
3
- Pageship is an HTML publishing service in development. This CLI checks a server's API
4
- compatibility, authorizes an installation through a browser, and identifies your
5
- personal workspace. It publishes HTML documents and revisions behind stable addresses. Private browser delivery requires the owner to sign in.
3
+ Pageship is an HTML publishing service in development. This CLI signs you in to the hosted Pageship service through a browser, publishes HTML files as documents behind stable links, and lists, downloads, restores and changes the visibility of the documents you published. It also installs the Pageship skills for your agents.
6
4
 
7
- Requires Node.js 24.11 or newer.
5
+ The full reference, with every command, option and result, is at https://pageship.dev/docs/cli.
8
6
 
9
- ```sh
10
- npx pageship
11
- npx pageship --help
12
- npx pageship --version
13
- npx pageship status --server http://localhost:8787
14
- npx pageship --json status --server http://localhost:8787
15
- ```
16
-
17
- `status` accepts an HTTP or HTTPS server base URL and checks the API major this CLI
18
- requires against the majors advertised by the server. Package versions do not
19
- determine API compatibility. The request times out after 10 seconds.
20
-
21
- The `--json` flag is global and may appear before or after `status`, including on
22
- help, version, and invalid invocations. JSON mode writes one JSON value to stdout
23
- without human output or prompts. Like other flags, `--json` after the `--` separator
24
- is treated as an argument. Interactive wizard and shell-completion options are
25
- available only in human mode.
26
-
27
- - Exit `0`: compatible server, help, or version.
28
- - Exit `1`: invalid arguments, network failure, or invalid server response.
29
- - Exit `2`: incompatible API major. The result explains whether the CLI or server
30
- needs updating, or the requested major is unsupported.
31
-
32
- JSON status results contain `ok`, `command: "status"`, `status`, `requiredApiMajor`,
33
- `server`, and `message`. `status` is `compatible`, `client_too_old`, `server_too_old`,
34
- or `unsupported`. The server object contains `serverVersion`, `currentApiMajor`,
35
- and `supportedApiMajors`. Failures contain `ok: false` and an `error` object with
36
- `code` and `message`; codes are `usage_error`, `request_failed`, or `internal_error`.
37
- Help and version use `command: "help"` and `command: "version"`, respectively.
38
-
39
- ## Browser authorization
40
-
41
- Run `pageship login --server https://api.example.com`, open the displayed link on
42
- any machine, and approve the code using your invited GitHub account. Interactive
43
- terminals wait for approval. JSON and non-TTY calls return immediately with a link,
44
- code and completion arguments; then run `pageship login --complete --server
45
- https://api.example.com`. Run `pageship whoami --server https://api.example.com`
46
- to reuse the stored credential in a new process. Add global `--json` for structured
47
- results. Pending or denied authorization exits 2, success exits 0, request/storage
48
- failures exit 1, and interrupted waiting exits 130.
49
-
50
- Credentials are plaintext JSON outside projects. POSIX uses an owner-only directory
51
- and 0600 files. Windows uses the current user's local app data and inherits
52
- user-profile permissions; the CLI does not configure Windows ACLs.
53
- `PAGESHIP_CONFIG_DIR` selects an absolute private directory. They are bound to the
54
- exact HTTPS server origin; HTTP is allowed only on loopback for development.
55
- Use `login --restart` for a new code. Address selection and publication are not
56
- required for authorization. No credentials appear in command output.
7
+ ## Install
57
8
 
58
- ## Publish HTML
9
+ The CLI requires Node.js 24.11 or newer. Install it globally with your package manager:
59
10
 
60
- Run `pageship publish report.html --server https://api.example.com` after login.
61
- Absolute file arguments work too. Add `--json` for structured success, source-path
62
- collisions and address choices. If publication fails after transfer, retry with
63
- the returned `--idempotency-key`. Reusing that key with the same input returns the
64
- same document; a different input produces a conflict. Ordinary path collisions
65
- never update or duplicate a document without an explicit choice.
66
-
67
- In a terminal, select `o <number>` to open a matching document, `r <number>` to
68
- revise it, `n` to create a separate private document, or `q` to cancel. Opening and
69
- cancellation do not change published content. JSON returns candidates and
70
- `resolutions` containing complete follow-up command arguments. Run those arguments
71
- in another invocation to choose explicitly.
72
-
73
- Use `--new` to create a separate document even when its source path matches. Use
74
- `--revise <documentId> --expected-revision <revisionId>` from a returned candidate
75
- to publish a revision. A concurrent publication returns `revision_conflict` and
76
- does not overwrite the newer revision. Revisions retain document identity, URL,
77
- visibility and old immutable content. An interrupted action returns `next` arguments
78
- including its operation key and selected target; repeat those with unchanged bytes.
79
- Explicit actions require a server that advertises support; an older server returns
80
- upgrade guidance before HTML upload.
81
-
82
- The default per-file limit is 10,000,000 bytes, configurable by the server. The CLI
83
- checks it before upload. Source paths are relative to the file's Git root, containing
84
- working directory, or parent for outside-cwd non-Git files. Git origin URLs contribute
85
- a normalized, credential-free hashed context. No local manifest is required.
86
-
87
- Generated address choices use `--address-choice <choiceId>` or
88
- `--refresh-addresses`; arbitrary subdomain input is not supported. An interactive
89
- terminal can select, refresh or cancel. JSON and non-TTY output never waits for a
90
- choice. Published results exit 0; unresolved choices, collisions, access and size
91
- failures exit 2; file/request/usage failures exit 1. See the repository's
92
- [publishing contract](../../docs/publishing.md) for details.
11
+ ```sh
12
+ npm i -g pageship
13
+ pnpm add -g pageship
14
+ bun add -g pageship
15
+ ```
93
16
 
94
- ## Development
17
+ Then run `pageship --version` to check that the shell finds it. To have an agent install the CLI and the Pageship skills and sign you in, give it the [setup guide](https://pageship.dev/setup-guide) instead.
95
18
 
96
- Install dependencies from the workspace root as described in the
97
- [root README](../../README.md). From this directory:
19
+ ## Get started
98
20
 
99
21
  ```sh
100
- pnpm run check
101
- pnpm run build
102
- node dist/cli.mjs --help
103
- npm pack --dry-run
22
+ pageship login # authorize this installation in your browser
23
+ pageship skills install # install the Pageship skills for your agents
24
+ pageship status # check that you are ready to publish
25
+ pageship publish report.html # publish a file as a private document
104
26
  ```
105
27
 
106
- The CLI uses TypeScript and Effect v4's unstable CLI API. Effect and its Node
107
- platform package are pinned to matching release candidates.
108
- The shared generated API client is a workspace development dependency bundled
109
- into `dist/cli.mjs`. Installing the published CLI does not require the private
110
- workspace package or a checkout of this repository.
111
-
112
- ## Revoke installation access
113
-
114
- `whoami --server <origin>` shows this CLI installation's non-secret ID. JSON mode
115
- returns it in `installation.id`. Match that ID in the signed-in dashboard's CLI
116
- installations list and select Revoke access. The next protected request returns
117
- exit 2 with sign-in guidance; other installations remain authorized. Run `login`
118
- with the same server to authorize again explicitly.
28
+ Add `--json` to any command for one structured result, which is what agents use. Run `pageship --help`, or any command with `--help`, to see its options.
119
29
 
120
30
  ## License
121
31
 
122
- UNLICENSED. No open-source license is granted.
32
+ UNLICENSED. No open-source license is granted for the CLI. The Pageship skills in `dist/skills` are MIT licensed, as `dist/skills/LICENSE` states.