feat(cli): add client commands and home-based local runtime defaults
This commit is contained in:
@@ -21,12 +21,32 @@ This starts:
|
||||
- API server: `http://localhost:3100`
|
||||
- UI: served by the API server in dev middleware mode (same origin as API)
|
||||
|
||||
## One-Command Local Run
|
||||
|
||||
For a first-time local install, you can bootstrap and run in one command:
|
||||
|
||||
```sh
|
||||
pnpm paperclip run
|
||||
```
|
||||
|
||||
`paperclip run` does:
|
||||
|
||||
1. auto-onboard if config is missing
|
||||
2. `paperclip doctor` with repair enabled
|
||||
3. starts the server when checks pass
|
||||
|
||||
## Database in Dev (Auto-Handled)
|
||||
|
||||
For local development, leave `DATABASE_URL` unset.
|
||||
The server will automatically use embedded PostgreSQL and persist data at:
|
||||
|
||||
- `./data/embedded-postgres`
|
||||
- `~/.paperclip/instances/default/db`
|
||||
|
||||
Override home and instance:
|
||||
|
||||
```sh
|
||||
PAPERCLIP_HOME=/custom/path PAPERCLIP_INSTANCE_ID=dev pnpm paperclip run
|
||||
```
|
||||
|
||||
No Docker or external database is required for this mode.
|
||||
|
||||
@@ -49,7 +69,7 @@ Expected:
|
||||
To wipe local dev data and start fresh:
|
||||
|
||||
```sh
|
||||
rm -rf server/data/embedded-postgres
|
||||
rm -rf ~/.paperclip/instances/default/db
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
@@ -61,7 +81,7 @@ If you set `DATABASE_URL`, the server will use that instead of embedded PostgreS
|
||||
|
||||
Agent env vars now support secret references. By default, secret values are stored with local encryption and only secret refs are persisted in agent config.
|
||||
|
||||
- Default local key path: `./data/secrets/master.key`
|
||||
- Default local key path: `~/.paperclip/instances/default/secrets/master.key`
|
||||
- Override key material directly: `PAPERCLIP_SECRETS_MASTER_KEY`
|
||||
- Override key file path: `PAPERCLIP_SECRETS_MASTER_KEY_FILE`
|
||||
|
||||
@@ -85,3 +105,30 @@ Migration helper for existing inline env secrets:
|
||||
pnpm secrets:migrate-inline-env # dry run
|
||||
pnpm secrets:migrate-inline-env --apply # apply migration
|
||||
```
|
||||
|
||||
## CLI Client Operations
|
||||
|
||||
Paperclip CLI now includes client-side control-plane commands in addition to setup commands.
|
||||
|
||||
Quick examples:
|
||||
|
||||
```sh
|
||||
pnpm paperclip issue list --company-id <company-id>
|
||||
pnpm paperclip issue create --company-id <company-id> --title "Investigate checkout conflict"
|
||||
pnpm paperclip issue update <issue-id> --status in_progress --comment "Started triage"
|
||||
```
|
||||
|
||||
Set defaults once with context profiles:
|
||||
|
||||
```sh
|
||||
pnpm paperclip context set --api-base http://localhost:3100 --company-id <company-id>
|
||||
```
|
||||
|
||||
Then run commands without repeating flags:
|
||||
|
||||
```sh
|
||||
pnpm paperclip issue list
|
||||
pnpm paperclip dashboard get
|
||||
```
|
||||
|
||||
See full command reference in `doc/CLI.md`.
|
||||
|
||||
Reference in New Issue
Block a user