Skip to content

docs: add headless server setup guide#13

Open
juulieen wants to merge 2 commits into
beeper:mainfrom
juulieen:docs/headless-server-setup
Open

docs: add headless server setup guide#13
juulieen wants to merge 2 commits into
beeper:mainfrom
juulieen:docs/headless-server-setup

Conversation

@juulieen
Copy link
Copy Markdown

Summary

  • Add a Headless server setup section to setup.md with a step-by-step guide for email-based authentication (no browser required)
  • Document auth email start and auth email response commands in auth.md
  • Add a headless server example to the main README.md under the "Local Beeper Server" section

Closes #12

Context

Setting up Beeper Server on a headless machine (VPS, remote server) currently defaults to browser-based OAuth which fails without a graphical environment. The CLI already supports an email-based auth flow (auth email startauth email response) that works perfectly for this use case, but it was not documented.

Test plan

  • Verify the documented steps work end-to-end on a headless machine
  • Confirm internal links between setup.md and auth.md resolve correctly

🤖 Generated with Claude Code

Document the email-based authentication flow for setting up Beeper Server
on machines without a graphical environment (VPS, headless servers).

Closes beeper#12

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 27, 2026 22:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ee39c4c-f0a8-4396-a164-75dcc6f32a62

📥 Commits

Reviewing files that changed from the base of the PR and between 5e18df8 and be4ec8b.

📒 Files selected for processing (2)
  • packages/cli/docs/auth.md
  • packages/cli/docs/setup.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/cli/docs/setup.md
📜 Recent review details
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-05-27T22:40:16.795Z
Learnt from: juulieen
Repo: beeper/cli PR: 13
File: README.md:178-178
Timestamp: 2026-05-27T22:40:16.795Z
Learning: In beeper CLI documentation, the correct recovery-key verification command syntax is:
`beeper verify recovery-key -t <target> --key "<key>"`.
Use the top-level `verify` subcommand and pass the recovery key via the `--key` flag. Do not use the previously incorrect form like `beeper auth verify recovery-key --code KEY`—update any doc snippets to match the supported syntax.

Applied to files:

  • packages/cli/docs/auth.md
📚 Learning: 2026-05-27T22:40:20.614Z
Learnt from: juulieen
Repo: beeper/cli PR: 13
File: packages/cli/docs/setup.md:47-47
Timestamp: 2026-05-27T22:40:20.614Z
Learning: In beeper/cli documentation, ensure the recovery-key verification command is documented as a top-level subcommand: `beeper verify recovery-key --key "RECOVERY_KEY"`. Do not document it as `beeper auth verify recovery-key --code ...`, and use the `--key` flag (not `--code`).

Applied to files:

  • packages/cli/docs/auth.md
🔇 Additional comments (2)
packages/cli/docs/auth.md (2)

26-26: LGTM!


48-48: LGTM!


📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added docs for email-based authentication on headless servers/VPS with step-by-step setup and verification commands.
    • Added --email option to setup for browser-free verification and an example --server --install flow.
    • Documented new commands: beeper auth email start and beeper auth email response.
    • Updated recovery-key command to beeper verify recovery-key --key <value> and refreshed examples.
    • Notes cover non-interactive runs and target persistence.

Walkthrough

This PR adds documentation for a complete headless server setup flow and a two-step browserless email sign-in (beeper auth email start / beeper auth email response), updates recovery-key command syntax, and documents beeper setup --email with a step-by-step VPS/server walkthrough linked from the README.

Changes

Headless Email Auth Documentation

Layer / File(s) Summary
Email authentication command documentation
packages/cli/docs/auth.md
Documented beeper auth email start --email <addr> and beeper auth email response --code <code> --setup-request-id <id> as a two-step browserless sign-in flow; updated recovery-key command form to beeper verify recovery-key --key <value>; expanded notes and examples including -t and --yes.
Headless server setup walkthrough
packages/cli/docs/setup.md, README.md
Added --email option to beeper setup, expanded Notes with headless/token guidance, full "Headless server setup" walkthrough (install, email auth, code submission, recovery-key verification, enable server target), and added beeper setup --server --install example; README links to the detailed setup docs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • beeper/cli#8: Implements the auth email start/auth email response commands and setup --email option referenced by this PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add headless server setup guide' is clear, specific, and accurately summarizes the main change—adding documentation for headless server setup.
Description check ✅ Passed The description is directly related to the changeset, explaining the context (email-based auth for headless machines) and listing the three files modified with their purposes.
Linked Issues check ✅ Passed The PR fulfills the objectives from issue #12 by documenting the email-based auth flow for headless servers and providing step-by-step instructions for setup without a graphical interface.
Out of Scope Changes check ✅ Passed All changes—updates to README.md, auth.md, and setup.md—are directly scoped to documenting the headless server setup flow and email-based authentication as required by issue #12.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds documentation for the new email-based (headless) authentication flow, intended for environments without a browser such as VPS/headless servers.

Changes:

  • Documents beeper auth email start / auth email response commands in auth.md.
  • Adds a "Headless server setup" walkthrough section to setup.md.
  • Adds a headless server example block to the top-level README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/cli/docs/setup.md Adds --email bullet and a step-by-step headless setup walkthrough.
packages/cli/docs/auth.md Documents the new email sign-in subcommands and adds usage examples.
README.md Adds a "Headless server" section with a sample end-to-end session.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

beeper auth email response --code 123456 --setup-request-id <id-from-step-2> -t server --yes

# 4. Verify the device (approve from another Beeper device, or use your recovery key)
beeper verify recovery-key -t server --key "YOUR_RECOVERY_KEY"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the actual CLI: beeper verify recovery-key is indeed a top-level command (not under auth), and the flag is --key, not --code.

$ beeper verify recovery-key --help
USAGE
  $ beeper verify recovery-key --key <value> [...]

FLAGS
      --key=<value>       (required) Recovery key string

The pre-existing auth.md had the wrong syntax (beeper auth verify recovery-key [--code KEY]). Fixed in be4ec8b — both auth.md and the new docs now use the correct command.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/cli/docs/setup.md (1)

14-14: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add --email to the command synopsis for consistency.

setup --email is documented in Notes, but not listed in the beeper setup [...] command line. This can mislead users scanning the command header first.

Suggested doc fix
-beeper setup [--local | --oauth | --remote URL | --desktop | --server] [--install] [--channel stable|nightly]
+beeper setup [--local | --oauth | --email | --remote URL | --desktop | --server] [--install] [--channel stable|nightly]

Also applies to: 25-25

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/docs/setup.md` at line 14, Update the command synopsis string
"beeper setup [--local | --oauth | --remote URL | --desktop | --server]
[--install] [--channel stable|nightly]" to include the --email option (e.g. add
" --email" in the bracketed options) so it matches the Notes section; make the
same change for the other identical occurrence mentioned (the second synopsis at
the other location). Ensure the displayed usage explicitly lists --email
alongside the other flags so the header and Notes remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/docs/setup.md`:
- Line 47: The README line uses the wrong CLI syntax; replace the incorrect
command "beeper verify recovery-key -t server --key \"YOUR_RECOVERY_KEY\"" with
the documented auth subcommand and correct flag, e.g. "beeper auth verify
recovery-key --code YOUR_RECOVERY_KEY" so it matches the usage in auth.md
(update references to the recovery-key, verify, auth verify, --key -> --code
accordingly).

In `@README.md`:
- Line 178: Update the README example to match the auth docs by replacing the
divergent command "beeper verify recovery-key -t server --key
\"XXXX-XXXX-XXXX-…\"" with the canonical "beeper auth verify recovery-key
[--code KEY]" usage; specifically, remove the "-t server" and "--key" form and
use the "beeper auth verify recovery-key" command with the "--code KEY" flag so
README matches packages/cli/docs/auth.md.

---

Outside diff comments:
In `@packages/cli/docs/setup.md`:
- Line 14: Update the command synopsis string "beeper setup [--local | --oauth |
--remote URL | --desktop | --server] [--install] [--channel stable|nightly]" to
include the --email option (e.g. add " --email" in the bracketed options) so it
matches the Notes section; make the same change for the other identical
occurrence mentioned (the second synopsis at the other location). Ensure the
displayed usage explicitly lists --email alongside the other flags so the header
and Notes remain consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f6c67c1-4f27-4ea1-a704-d085419ed1ad

📥 Commits

Reviewing files that changed from the base of the PR and between 9502715 and 5e18df8.

📒 Files selected for processing (3)
  • README.md
  • packages/cli/docs/auth.md
  • packages/cli/docs/setup.md
📜 Review details
🔇 Additional comments (1)
packages/cli/docs/auth.md (1)

15-16: LGTM!

Also applies to: 35-35, 45-46

Comment thread packages/cli/docs/setup.md
Comment thread README.md
$ beeper auth email response --code 570056 --setup-request-id 20260527…-a76ef169-… -t server --yes
▎ Not ready needs verification

$ beeper verify recovery-key -t server --key "XXXX-XXXX-XXXX-…"
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the same recovery-key command/flag as the auth docs.

This example currently diverges from packages/cli/docs/auth.md (beeper auth verify recovery-key [--code KEY]). Inconsistent command syntax in README can break headless onboarding.

Suggested doc fix
-$ beeper verify recovery-key -t server --key "XXXX-XXXX-XXXX-…"
+$ beeper auth verify recovery-key -t server --code "XXXX-XXXX-XXXX-…"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$ beeper verify recovery-key -t server --key "XXXX-XXXX-XXXX-…"
$ beeper auth verify recovery-key -t server --code "XXXX-XXXX-XXXX-…"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 178, Update the README example to match the auth docs by
replacing the divergent command "beeper verify recovery-key -t server --key
\"XXXX-XXXX-XXXX-…\"" with the canonical "beeper auth verify recovery-key
[--code KEY]" usage; specifically, remove the "-t server" and "--key" form and
use the "beeper auth verify recovery-key" command with the "--code KEY" flag so
README matches packages/cli/docs/auth.md.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README example is correct — beeper verify recovery-key -t server --key "..." matches the actual CLI usage. The pre-existing auth.md had the wrong syntax which has been fixed in be4ec8b.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juulieen, thanks for the clarification! You're right — the README example was correct, and my comment was based on the stale/incorrect syntax in the pre-existing auth.md. Glad that's been fixed in be4ec8b. I'll note the correct command form for future reviews.


✏️ Learnings added
Learnt from: juulieen
Repo: beeper/cli PR: 13
File: README.md:178-178
Timestamp: 2026-05-27T22:40:16.795Z
Learning: In the beeper CLI, the correct command for recovery-key verification is `beeper verify recovery-key -t <target> --key "<key>"` (top-level `verify` subcommand, `--key` flag). The `auth.md` docs previously had incorrect syntax (`beeper auth verify recovery-key --code KEY`), which was fixed in commit be4ec8b of PR `#13`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

- Add --email to setup command synopsis
- Fix recovery-key command: it's `beeper verify recovery-key --key`
  (top-level), not `beeper auth verify recovery-key --code`
- Verified against actual CLI --help output

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@juulieen
Copy link
Copy Markdown
Author

All review comments addressed in be4ec8b:

  • --email in synopsis (CodeRabbit): Added to the command line in setup.md
  • verify vs auth verify and --key vs --code (Copilot + CodeRabbit): Both bots suggested changing to beeper auth verify recovery-key --code, but this is incorrect. Verified against the actual CLI:
$ beeper verify recovery-key --help
USAGE
  $ beeper verify recovery-key --key <value>
FLAGS
      --key=<value>       (required) Recovery key string

verify is a top-level command, and the flag is --key. The pre-existing auth.md had the wrong syntax (--code), which has been corrected in this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Install self-hosted server on VPS with no graphical interface How do I sign-in in beeper desktop ?

2 participants