# BitPlan

> Encrypted HTML plan documents on Bitcoin. The CLI publishes. This site is the viewer.

## When to use this

Use BitPlan when a user wants to publish, version, or read an encrypted HTML plan as a 1Sat Ordinal with a BRC-100 wallet.

Do not use BitPlan as a general file host, a server-side notes app, or a substitute for a BRC-100 wallet.

## CLI

- Install: `npx bitplan` or `bunx bitplan`
- Package: https://www.npmjs.com/package/bitplan
- Auth: `npx bitplan auth`
- Publish: `npx bitplan upload ./plan.html`
- List: `npx bitplan list`
- Fetch: `npx bitplan fetch <origin>`

## Site

- Home: https://bitplan.dev
- Docs: https://bitplan.dev/docs
- How it works: https://bitplan.dev/docs/how-it-works
- Envelope: https://bitplan.dev/docs/envelope
- CLI setup: https://bitplan.dev/docs/cli-setup
- API versioning: https://bitplan.dev/docs/api
- OpenAPI: https://bitplan.dev/openapi.json
- Source: https://github.com/opldotdev/bitplan.dev

## HTTP

Read a published envelope (API v1):

    GET https://bitplan.dev/api/v1/content/<origin>:-1

The same bytes are at `GET https://bitplan.dev/ordfs/content/<origin>:-1`. Unknown `/api/v1` paths return JSON. CLI package: `GET https://bitplan.dev/api/v1/cli`. Version policy: `GET https://bitplan.dev/api/v1/version`. OpenAPI: https://bitplan.dev/openapi.json. The CLI is the npm package bitplan: https://www.npmjs.com/package/bitplan

Publishing and decrypting go through the user's wallet via `npx bitplan`. Drafts at /d/<origin> are ciphertext and are not indexed.
