mirror of
https://github.com/runbear-io/beardrive.git
synced 2026-08-25 08:08:08 +02:00
feat(cli): "bdrive serve" replaces "bdrive web" (web stays as an alias), and the README leads with the agent install (#94)
This commit is contained in:
@@ -12,7 +12,7 @@ one paste in Codex, Gemini CLI, or Hermes, and the folder is connected: your
|
||||
agent reads the team's current files before it answers and pushes whatever it
|
||||
writes when the turn ends.
|
||||
|
||||
Underneath there is a CLI called `bdrive` and a **hub** — a `bdrive web` server
|
||||
Underneath there is a CLI called `bdrive` and a **hub** — a `bdrive serve` server
|
||||
you (or we) run on an object store, which clients sync through over HTTPS and
|
||||
never touch the storage directly. You can drive all of it by hand, and most
|
||||
people never do.
|
||||
|
||||
@@ -28,7 +28,7 @@ One binary, `bdrive` — the CLI, the sync daemon, and the web server.
|
||||
| `bdrive restore <file> [version]` | Put an earlier version of a file back, as a new change. No version restores the previous one; `--list` shows the versions with their short hashes |
|
||||
| `bdrive export [folder]` | Export the whole project — all devices' history and content — to a portable `.tar.gz` (`-o` names the file) |
|
||||
| `bdrive import <archive>` | Import an export archive as a new project on the hub you're logged into (`--name` overrides the archive's name) |
|
||||
| `bdrive web [folder \| storage-root-url]` | Web server: viewer, uploads, multi-project sync hub |
|
||||
| `bdrive serve [folder \| storage-root-url]` | Web server: viewer, uploads, multi-project sync hub (`bdrive web` is a deprecated alias) |
|
||||
| `bdrive whoami` | Signed-in account and device identity used in change tracking |
|
||||
| `bdrive version` | Version (also `bdrive --version`) |
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
---
|
||||
title: Hub config
|
||||
description: Every bdrive web flag and config-file key.
|
||||
description: Every bdrive serve flag and config-file key.
|
||||
---
|
||||
|
||||
`bdrive web` serves a website — browse folders and files, read markdown rendered
|
||||
`bdrive serve` serves a website — browse folders and files, read markdown rendered
|
||||
Obsidian-style (including `[[wikilinks]]`, task lists, and tables), download any
|
||||
file. Pointed at a storage root, it becomes a multi-project sync hub.
|
||||
|
||||
It is read-only unless started with `--upload`.
|
||||
|
||||
```sh
|
||||
bdrive web # serve the current directory (viewer)
|
||||
bdrive web ./notes # serve a folder from disk (viewer)
|
||||
bdrive web -c config.json # everything from a config file
|
||||
bdrive web s3://my-bucket/root --upload # multi-project sync hub
|
||||
bdrive serve # serve the current directory (viewer)
|
||||
bdrive serve ./notes # serve a folder from disk (viewer)
|
||||
bdrive serve -c config.json # everything from a config file
|
||||
bdrive serve s3://my-bucket/root --upload # multi-project sync hub
|
||||
```
|
||||
|
||||
With a folder it serves files straight from disk. On a BearDrive mount the
|
||||
@@ -36,7 +36,7 @@ cloud credentials on the serving machine.
|
||||
## Config file
|
||||
|
||||
```jsonc
|
||||
// bdrive web -c config.json
|
||||
// bdrive serve -c config.json
|
||||
{
|
||||
"remote": "s3://my-bucket/root", // storage root (hub) — or "dir": "./folder" (viewer)
|
||||
"addr": ":4173",
|
||||
|
||||
@@ -18,7 +18,7 @@ that's a member of the project.
|
||||
- A device that syncs the project (any member device works).
|
||||
- An account on the destination hub (sign up there first if you don't have one).
|
||||
- Uploads enabled on the destination hub (`--upload` on a self-hosted
|
||||
`bdrive web`; BearDrive Cloud has them on).
|
||||
`bdrive serve`; BearDrive Cloud has them on).
|
||||
|
||||
## Step 1 — sync, so the export is complete
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ description: The three signup postures, admin controls, device sign-in, and SMTP
|
||||
Hubs always require sign-in — every change is attributed to a real account. The
|
||||
whole API (web UI, uploads, project creation, device sync) needs a session; only
|
||||
`/api/config` and the auth pages stay open. The plain-folder viewer,
|
||||
`bdrive web ./folder`, remains auth-free.
|
||||
`bdrive serve ./folder`, remains auth-free.
|
||||
|
||||
Accounts are email, password, and name, kept in a file-backed registry
|
||||
(`auth.json`): bcrypt password hashes and SHA-256 token digests, atomically
|
||||
|
||||
@@ -59,7 +59,7 @@ Every knob: [Hub config](/reference/hub-config/). Signup postures and SMTP:
|
||||
## 4. Run it
|
||||
|
||||
```sh
|
||||
bdrive web -c config.json
|
||||
bdrive serve -c config.json
|
||||
```
|
||||
|
||||
Put TLS in front — Caddy, nginx, or your platform's load balancer. Device tokens
|
||||
|
||||
Reference in New Issue
Block a user