Skip to content

Commit 6ead3cc

Browse files
committed
feat: multi-workspace profiles (closes #1)
- workspace add/list/use/remove commands - global -w/--workspace flag for per-command override - init --workspace support - auto-migrate old flat config to multi-workspace format - aliases scoped per workspace - all config readers (getApiKey, resolveDb, resolvePageId, alias, move, db-create) workspace-aware - 140 tests passing (added migration test) - README + SKILL.md updated with workspace docs
1 parent 8c36c38 commit 6ead3cc

5 files changed

Lines changed: 293 additions & 66 deletions

File tree

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ Zero UUIDs. One command. You're ready to go.
3636

3737
## What's New
3838

39-
### v1.2 — Database Management & File Uploads
39+
### v1.2 — Multi-Workspace, Database Management & File Uploads
4040

41+
- 🏢 **Multi-workspace** — Named profiles for multiple Notion accounts (`workspace add/use/list/remove`, `--workspace` flag)
4142
- 🤖 **`me`** — Show integration/bot identity and owner
4243
- 📦 **`move`** — Move pages between databases by alias
4344
- 📋 **`templates`** — List page templates available for a database
@@ -369,6 +370,38 @@ notion alias add tasks <database-id> # Add manually
369370
notion alias remove tasks # Remove one
370371
```
371372

373+
### `notion workspace` — Multi-Workspace Profiles
374+
375+
Manage multiple Notion accounts (work, personal, client projects):
376+
377+
```bash
378+
# Add a workspace
379+
notion workspace add work --key ntn_your_work_key
380+
notion workspace add personal --key ntn_your_personal_key
381+
382+
# List workspaces
383+
notion workspace list
384+
# default ← active
385+
# Key: ntn_3871... | Aliases: 5
386+
# work
387+
# Key: ntn_ab12... | Aliases: 0
388+
389+
# Switch active workspace
390+
notion workspace use work
391+
392+
# Discover databases for a workspace
393+
notion init --workspace work
394+
395+
# Per-command override (no switching needed)
396+
notion query tasks --workspace personal
397+
notion -w work add projects --prop "Name=Q2 Plan"
398+
399+
# Remove a workspace
400+
notion workspace remove old-client
401+
```
402+
403+
Aliases are scoped per workspace — same alias name in different workspaces won't collide. Old single-key configs are auto-migrated to a "default" workspace.
404+
372405
### `--json` — Raw JSON Output
373406

374407
Add `--json` to any command for the raw Notion API response:

0 commit comments

Comments
 (0)