diff --git a/README.md b/README.md index 8b6ab94..1aa02b5 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,9 @@ initialized /Users/snow/workspace daemon: running (pid 55434, scan 3s, remote sync 10s) ``` -> BearDrive Cloud — zero-setup, bare `bdrive login` — is on the waitlist -> at [beardrive.ai](https://beardrive.ai). Self-host to try it today. +> BearDrive Cloud — zero-setup, bare `bdrive login`, free personal +> workspace on signup — at [beardrive.ai](https://beardrive.ai). Or +> self-host your own hub. On another machine: @@ -87,9 +88,9 @@ go install github.com/runbear-io/beardrive/cmd/bdrive@latest ```sh # 1. Sign this device in against your hub (once per device). # Self-host a hub in ~10 minutes (docs/self-hosting.md), then: -bdrive login https://your-hub -# (BearDrive Cloud — zero-setup, bare `bdrive login` — is coming; -# join the waitlist at beardrive.ai. Self-host to try it today.) +bdrive login +# (BearDrive Cloud: sign up in the browser, get a free personal +# workspace automatically. Self-hosting? bdrive login https://your-hub) # 2. Start syncing a project — interactive: create or connect a project, # sync the whole folder or just ./shared. Re-run any time to resume. @@ -134,7 +135,7 @@ hub's own storage, never something a syncing client points at directly: | Command | Description | |---|---| -| `bdrive login [server-url]` | Sign this device in (browser flow; `--device` for headless; default server beardrive.ai — the managed cloud, waitlist-only: pass your hub URL). Switch hubs with `bdrive login ` | +| `bdrive login [server-url]` | Sign this device in (browser flow; `--device` for headless; default server beardrive.ai — the managed cloud, free personal workspace on signup; pass your hub URL to self-host). Switch hubs with `bdrive login ` | | `bdrive logout` | Sign this device out — clear the saved token/account (`--forget` also drops the remembered server) | | `bdrive init [folder]` | Create/connect a project and start syncing — interactive on a TTY, flags (`--name/--project/--shared/--yes`) for scripts; re-run to resume | | `bdrive stop [folder]` | Stop syncing (files stay; `bdrive init` resumes) | @@ -260,8 +261,9 @@ cd ~/some-project && bdrive init # once per project `bdrive login` signs the device in and remembers the server (`settings.json` under the bdrive home; bare `bdrive login` defaults to beardrive.ai — the -managed cloud, currently waitlist-only, so pass your hub's URL — -`--status` shows the current server and account). To move to a **different +managed cloud, where signup auto-creates a free personal workspace; pass +your hub's URL to use a self-hosted hub instead — `--status` shows the +current server and account). To move to a **different hub**, run `bdrive login ` and then re-run `bdrive init` in each folder to connect it to a project there; `bdrive logout` signs out entirely. `bdrive init` then, per diff --git a/plugin/commands/init.md b/plugin/commands/init.md index 1991fcc..93f3f39 100644 --- a/plugin/commands/init.md +++ b/plugin/commands/init.md @@ -14,11 +14,12 @@ Follow these steps: wait for the user's choice before installing. 2. **Sign in if needed**: run `bdrive login --status`. With no valid - session, ask the user for their team's hub URL and run - `bdrive login https://their-hub` (tell the user a browser window is - coming; it completes by itself). Bare `bdrive login` targets BearDrive - Cloud, which is not open yet — only use it if the user says their team - is on the cloud beta. + session, tell the user a browser window is coming, then run bare + `bdrive login` (BearDrive Cloud — signing up auto-creates a free + personal workspace; a pending team invite routes them into that team). + If the user says their team runs its own hub, use + `bdrive login https://their-hub` instead. Either way it completes by + itself. 3. **Detect knowledge tooling** (skip if the folder already contains `.bdrive/` — then just run `bdrive init --yes`; it resumes syncing, diff --git a/plugin/commands/install.md b/plugin/commands/install.md index 1ca8cd8..1ba3aff 100644 --- a/plugin/commands/install.md +++ b/plugin/commands/install.md @@ -15,13 +15,15 @@ If neither works, stop and tell the user how to install manually. ## 2. Sign in if needed -Run `bdrive login --status`. If there is no valid session, sign in against -the team's hub: ask the user for their hub URL and run -`bdrive login https://their-hub` — it opens the browser to sign in (or -sign up) and completes by itself. (Bare `bdrive login` targets BearDrive -Cloud, which is not open yet — don't use it unless the user says their -team is on the cloud beta.) Tell the user a browser window is coming -before you run it. +Run `bdrive login --status`. If there is no valid session, tell the user a +browser window is coming, then sign in: +- **Default: BearDrive Cloud.** Run bare `bdrive login` — the browser opens + beardrive.ai where they sign in or sign up. A brand-new account gets a + free personal workspace automatically (no forms beyond signup itself); a + pending team invite lands them in that team instead. No prior signup is + needed — this step IS the signup. +- **Self-hosted team:** if the user says their team runs its own hub, ask + for the URL and run `bdrive login https://their-hub`. ## 3. Initialize the project @@ -30,11 +32,14 @@ Otherwise ask the user two questions (or infer from their request): - **Create a new project or connect an existing one?** (`bdrive share --list` isn't needed here — `bdrive init --name ` creates-or-joins by name; `bdrive init --project ` connects by id.) -- **Sync the whole folder, or only a shared subfolder** (e.g. `./wiki` or - `./shared`)? Hard rule: **never sync a repo root** — inside a repo, - knowledge always syncs as a scoped subfolder via `--shared`. Whole-folder - is only for a dedicated knowledge folder (an empty dir, a standalone - vault) that is the mount itself. +- **Sync the whole folder, or only a shared subfolder?** Hard rule: + **never sync a repo root** — inside a repo, knowledge always syncs as a + scoped subfolder via `--shared`. Whole-folder is only for a dedicated + knowledge folder (an empty dir, a standalone vault) that is the mount + itself. Don't ask open-endedly: scan the repo for an existing knowledge + folder (`wiki/`, `docs/`, `notes/`, `handbook/`, an Obsidian vault — + markdown-heavy, not source code) and propose the best candidate for + confirmation, e.g. "I found `./wiki` — sync that?". Then run it non-interactively, e.g.: ```sh @@ -117,8 +122,10 @@ that wasn't detected: `bdrive hooks install --agent claude,codex,gemini,hermes`. ## 6. Verify and summarize Run `bdrive status` and confirm the daemon is running and pending is 0. -Then tell the user what was set up, and demonstrate the payoff: if they -have (or you just generated) an HTML/PDF/markdown artifact in the synced -folder, run `bdrive url ` and hand them the teammate link (sign-in -required — safe by default); mention `bdrive share ` exists for -fully public links when someone outside the hub needs it. +Then tell the user what was set up — and ALWAYS finish with the payoff: +pick a representative file in the synced folder (the wiki's index/README, +or an artifact you just generated), run `bdrive url `, and hand the +user the link with an invitation to open it — seeing their folder rendered +in the browser is the moment the setup clicks. Teammate links require +sign-in (safe by default); mention `bdrive share ` exists for fully +public links when someone outside the hub needs it. diff --git a/plugin/skills/beardrive/SKILL.md b/plugin/skills/beardrive/SKILL.md index 48f11e6..8ae7a1c 100644 --- a/plugin/skills/beardrive/SKILL.md +++ b/plugin/skills/beardrive/SKILL.md @@ -22,7 +22,7 @@ Use this skill whenever the user is working with the `bdrive` CLI: initializing | Mounts + daemon + pending state | `bdrive status []` | | Change history | `bdrive log [] [-p path] [-n N]` | | This device's identity | `bdrive whoami` | -| Sign this device in (once per device) | `bdrive login [url]` — bare form uses the remembered server or beardrive.ai — currently waitlist-only; pass your hub URL. Opens the sign-in page in a browser (sign-up available there); the terminal completes on its own and stores a per-device token. `--device` prints a code to approve from any browser (SSH/headless); `--status` shows server + account. Password reset: "Forgot password?" on the sign-in page (emailed via the server's SMTP config, or the link appears in the server log). **Switch hubs** with `bdrive login `, then re-run `bdrive init` in each folder. | +| Sign this device in (once per device) | `bdrive login [url]` — bare form targets BearDrive Cloud (beardrive.ai): signing up there auto-creates a free personal workspace, no questions asked. Self-hosting teams pass their hub URL instead. Opens the sign-in page in a browser (sign-up available there); the terminal completes on its own and stores a per-device token. `--device` prints a code to approve from any browser (SSH/headless); `--status` shows server + account. Password reset: "Forgot password?" on the sign-in page (emailed via the server's SMTP config, or the link appears in the server log). **Switch hubs** with `bdrive login `, then re-run `bdrive init` in each folder. | | Sign this device out | `bdrive logout` — clears the saved token + account (folders untouched); `--forget` also drops the remembered server. The device token stays valid server-side until it expires — revoke it from the hub's device list to be sure. | | Link a synced file for teammates | `bdrive url ` — prints the file's hub viewer URL (sign-in + project membership required; always the latest content). Computed locally, no network; `--sync` pushes first so a just-created file's link resolves immediately; no arg = the project home page. **After creating a shareable artifact (.md/.html/.csv/report/plan) in the shared folder, include this link in your reply** so teammates can open it. | | Share a synced file publicly by URL | `bdrive share ` — prints a link anyone can open (HTML renders as a page, markdown rendered, PDFs inline; sandboxed; always the latest content; no account needed). `--expires 24h` for self-destructing links; `--list` / `--revoke ` to manage. Put generated reports in the shared folder, sync, then share. | @@ -69,8 +69,8 @@ Selective-sync semantics — important when advising users: ### Init flow -1. `bdrive login https://your-hub` once per device (browser sign-in; sign-up available on the page). Bare `bdrive login` targets BearDrive Cloud, which is not open yet — use the team's hub URL. -2. Run `bdrive init` in the folder. Interactive on a TTY (create new / connect existing project; whole folder / shared subfolder); with flags or without a TTY it creates-or-joins a project named after the folder and syncs everything. It: +1. Sign-in happens lazily: `bdrive init` runs the login flow itself when the device has no session, so don't ask users to sign up ahead of time. Bare `bdrive login` targets BearDrive Cloud (beardrive.ai) — signing up in the browser auto-creates a free personal workspace; a pending team invite routes them into that team instead. Self-hosting teams: `bdrive login https://your-hub`. +2. Pick what to sync BEFORE running init. In a repo, look for an existing knowledge folder (`wiki/`, `docs/`, `notes/`, `handbook/`, an Obsidian vault) and propose it as `--shared ` — confirm, don't interrogate. Never sync a repo root. Then run `bdrive init` in the folder. Interactive on a TTY (create new / connect existing project; whole folder / shared subfolder); with flags or without a TTY it creates-or-joins a project named after the folder and syncs everything. It: - writes `/.bdrive/config.json` (mount id + project + remote) and registers the mount id in `~/.bdrive/mounts.json`, - seeds a starter `.bdriveignore` (node_modules, build dirs, caches, `.env*`) when none exists, - opens the volume store under `~/.bdrive/volumes//`,