Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,20 @@
## Quickstart

```bash
git clone https://github.com/2witstudios/pagespace-cli.git
cd pagespace-cli
npm install # resolves vendored pi workspaces in packages/
npm run build # required: builds workspace pi packages to dist/ (~3s)
npm install -g pagespace-cli
pagespace
```

This repo vendors pi via npm workspaces (`packages/`), so you do **not** need a global pi install.
That's it. The first run walks you through onboarding (token → drives → models → launch).

Launch either way:
**From source (contributors):**

```bash
npm link # optional: puts `pagespace` on your PATH
git clone https://github.com/2witstudios/pagespace-cli.git
cd pagespace-cli
npm install
npm link # puts `pagespace` on your PATH
pagespace

# or without linking
node bin/pagespace.mjs
```

### First run (Cursor-grade onboarding)
Expand Down Expand Up @@ -179,18 +177,15 @@ pi install -l .

## Install & distribution

- Root package is `private: true` and not published.
- Exposed CLI bin: `pagespace` → `bin/pagespace.mjs`.
- Packaged files include `extensions`, `src`, `skills`, `prompts`, `bin`, `packages`, `README.md`.

Local distribution options:

```bash
npm link # put pagespace on PATH locally
npm pack # create a tarball
npm install -g pagespace-cli # global install (recommended)
npx pagespace-cli # one-shot without global install
```

There is currently no `peerDependencies` section in the root `package.json`; this repo vendors required pi packages via npm workspaces.
- Exposed CLI bin: `pagespace` → `bin/pagespace.mjs`.
- Packaged files: `extensions`, `src`, `skills`, `prompts`, `bin`, `packages`, `README.md`.
- pi packages are vendored in `packages/` and built automatically via `postinstall`.
- No global pi install required.

## Status & pointers

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "pagespace-cli",
"version": "0.0.1",
"private": true,
"type": "module",
"workspaces": [
"packages/*"
Expand All @@ -21,6 +20,7 @@
"url": "https://github.com/2witstudios/pagespace-cli/issues"
},
"scripts": {
"postinstall": "npm run build",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not build workspaces in postinstall

On the documented npm install -g pagespace-cli path, this lifecycle script runs in the published package (checked npm install --help: global install is supported and scripts are only skipped with --ignore-scripts). The packed files omit tsconfig.base.json, but every workspace tsconfig.build.json extends ../../tsconfig.base.json, and the tsgo compiler is only in root devDependencies, which consumers do not get. This makes the new postinstall fail before the package finishes installing; ship prebuilt dist output or include the required build inputs/tools for runtime installs.

Useful? React with 👍 / 👎.

"build": "npm run build -w packages/pi-tui -w packages/pi-ai -w packages/pi-agent-core -w packages/pi-coding-agent",
"typecheck": "tsc --noEmit -p .",
"lint": "biome check src extensions test",
Expand All @@ -30,13 +30,15 @@
"check": "npm run typecheck && npm run lint && npm run test",
"prepare": "husky"
},
"dependencies": {
"tsx": "^4.19.2"
},
Comment on lines +33 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the pi CLI as a runtime dependency

After installing the published tarball, npm leaves the included workspace folders under packages/ and does not link them into this package's node_modules (verified with a minimal packed workspace package); however bin/pagespace.mjs launches ../node_modules/@earendil-works/pi-coding-agent/dist/cli.js. This dependencies block installs only tsx, so even if the build step is bypassed or fixed, the pagespace bin exits with MODULE_NOT_FOUND for the pi CLI. Add the pi package as a real runtime dependency or launch from the vendored packages/pi-coding-agent path.

Useful? React with 👍 / 👎.

"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@earendil-works/pi-ai": "workspace:*",
"@earendil-works/pi-coding-agent": "workspace:*",
"@typescript/native-preview": "7.0.0-dev.20260120.1",
"husky": "^9.1.7",
"tsx": "^4.19.2",
"typebox": "^1.1.39",
"typescript": "^5.9.3"
},
Expand Down
Loading