Skip to content

Commit d510c4e

Browse files
phernandezclaude
andcommitted
feat: add subscription validation to CLI authentication (SPEC-13 Phase 2)
Implements subscription validation for CLI cloud login flow to ensure only users with active subscriptions can access cloud features. Changes: - Add SubscriptionRequiredError exception for 403 subscription errors - Update login flow to verify subscription before enabling cloud mode - Support both FastAPI nested and flat error response formats - Add comprehensive test coverage (6 tests, all passing) - Update documentation with subscription prerequisites Error Handling: - Clean, user-friendly error messages (no traceback) - Subscribe URL prominently displayed - Clear next steps for users Validation: - Tested with unauthorized user (blocked as expected) - Tested with authorized user (full access granted) - All tests passing, zero type errors Related: SPEC-13 CLI Authentication with Subscription Validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fc38877 commit d510c4e

5 files changed

Lines changed: 1766 additions & 25 deletions

File tree

docs/cloud-cli.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ The cloud CLI enables you to:
1212
- **Integrity verification** with `bm cloud check`
1313
- **Automatic project creation** from local directories
1414

15+
## Prerequisites
16+
17+
Before using Basic Memory Cloud, you need:
18+
19+
- **Active Subscription**: An active Basic Memory Cloud subscription is required to access cloud features
20+
- **Subscribe**: Visit [https://basicmemory.com/subscribe](https://basicmemory.com/subscribe) to sign up
21+
22+
If you attempt to log in without an active subscription, you'll receive a "Subscription Required" error with a link to subscribe.
23+
1524
## The Cloud Mode Paradigm
1625

1726
Basic Memory Cloud follows the **Dropbox/iCloud model** - a single cloud space containing all your projects, not per-project connections.
@@ -474,6 +483,26 @@ bm cloud logout
474483
bm cloud login
475484
```
476485

486+
### Subscription Issues
487+
488+
**Problem**: "Subscription Required" error when logging in
489+
490+
**Solution**: You need an active Basic Memory Cloud subscription to use cloud features.
491+
492+
1. Visit the subscribe URL shown in the error message
493+
2. Sign up for a subscription
494+
3. Once your subscription is active, run `bm cloud login` again
495+
496+
**Problem**: "Subscription Required" error for existing user
497+
498+
**Solution**: Your subscription may have expired or been cancelled.
499+
500+
1. Check your subscription status at [https://basicmemory.com/account](https://basicmemory.com/account)
501+
2. Renew your subscription if needed
502+
3. Run `bm cloud login` again
503+
504+
Note: Access is immediately restored when your subscription becomes active.
505+
477506
### Sync Issues
478507

479508
**Problem**: "Bisync not initialized"

0 commit comments

Comments
 (0)