mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
feat(plugin): agent-first onboarding — cloud-default login, wiki auto-detection, hub-URL payoff
- login copy across README/skill/commands: bare `bdrive login` (BearDrive Cloud) is the default; signup auto-creates a free personal workspace, pending invites route into the team; self-hosted hubs pass a URL - init flows propose a detected knowledge folder (wiki/docs/notes/handbook/ vault) as --shared instead of asking open-endedly; repo-root rule restated - install always ends by handing the user a `bdrive url` link to a representative page — the activation moment Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbiaaVM2ACxeRi8ySG9ybc
This commit is contained in:
co-authored by
Claude Fable 5
parent
01902d435f
commit
66f7a98fcc
@@ -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 <new-url>` |
|
||||
| `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 <new-url>` |
|
||||
| `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 <new-url>` 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
|
||||
|
||||
@@ -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,
|
||||
|
||||
+24
-17
@@ -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 <name>` creates-or-joins by name;
|
||||
`bdrive init --project <p-id>` 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 <file>` and hand them the teammate link (sign-in
|
||||
required — safe by default); mention `bdrive share <file>` 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 <file>`, 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 <file>` exists for fully
|
||||
public links when someone outside the hub needs it.
|
||||
|
||||
@@ -22,7 +22,7 @@ Use this skill whenever the user is working with the `bdrive` CLI: initializing
|
||||
| Mounts + daemon + pending state | `bdrive status [<folder>]` |
|
||||
| Change history | `bdrive log [<folder>] [-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 <new-url>`, 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 <new-url>`, 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 <file>` — 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 <file>` — 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 <token-or-url>` 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 <dir>` — 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 `<folder>/.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/<mount-id>/`,
|
||||
|
||||
Reference in New Issue
Block a user