Sync BMAD project artifacts to Notion - Pages and Databases
Project description
bmadnotion
Sync BMAD project artifacts to Notion. Keep your planning documents and sprint tracking in sync between local files and Notion workspace.
Features
- Page Sync: Sync planning artifacts (PRD, Architecture, UX Design) to Notion Pages
- Database Sync: Sync sprint status (Epics, Stories) to Notion Databases
- Incremental Sync: Only sync changed files based on content hash
- BMAD Native: Understands BMAD project structure and conventions
Installation
pip install bmadnotion
Or with uv:
uv add bmadnotion
Quick Start
1. Initialize Configuration
cd your-bmad-project
bmadnotion init
This creates .bmadnotion.yaml configuration file.
2. Configure Notion
Set your Notion integration token:
export NOTION_TOKEN=your_notion_integration_token
Edit .bmadnotion.yaml to set your Notion workspace page ID:
project: my-project
notion:
token_env: NOTION_TOKEN
workspace_page_id: "your-workspace-page-id"
3. Sync
# Sync everything
bmadnotion sync
# Sync only planning documents (Pages)
bmadnotion sync pages
# Sync only sprint tracking (Database)
bmadnotion sync db
# Preview changes without syncing
bmadnotion sync --dry-run
# Force full sync (ignore cache)
bmadnotion sync --force
4. Check Status
bmadnotion status
Configuration
.bmadnotion.yaml Reference
# Project name
project: bloomy
# Notion configuration
notion:
token_env: NOTION_TOKEN # Environment variable name for token
workspace_page_id: "abc123..." # Root page for synced content
# BMAD paths (auto-detected from _bmad/bmm/config.yaml if not specified)
paths:
bmad_output: "_bmad-output"
planning_artifacts: "_bmad-output/planning-artifacts"
implementation_artifacts: "_bmad-output/implementation-artifacts"
epics_dir: "_bmad-output/planning-artifacts/epics"
sprint_status: "_bmad-output/implementation-artifacts/sprint-status.yaml"
# Page sync configuration
page_sync:
enabled: true
parent_page_id: "..." # Parent page for documents
documents:
- path: "prd.md"
title: "PRD - {project}"
- path: "architecture.md"
title: "Architecture - {project}"
- path: "ux-design-specification.md"
title: "UX Design - {project}"
- path: "product-brief.md"
title: "Product Brief - {project}"
# Database sync configuration
database_sync:
enabled: true
sprints:
database_id: "..." # Notion database ID for Sprints
status_mapping:
backlog: "Not Started"
in-progress: "In Progress"
done: "Done"
tasks:
database_id: "..." # Notion database ID for Tasks
status_mapping:
backlog: "Backlog"
ready-for-dev: "Ready"
in-progress: "In Progress"
review: "Review"
done: "Done"
BMAD Project Structure
bmadnotion expects a standard BMAD project structure:
your-project/
├── _bmad/
│ └── bmm/
│ └── config.yaml # BMAD configuration
├── _bmad-output/
│ ├── planning-artifacts/ # → Notion Pages
│ │ ├── prd.md
│ │ ├── architecture.md
│ │ ├── ux-design-specification.md
│ │ └── epics/
│ │ ├── epic-1-*.md
│ │ └── epic-2-*.md
│ └── implementation-artifacts/ # → Notion Database
│ ├── sprint-status.yaml # Sprint tracking
│ ├── 1-1-story-name.md # Story files
│ └── 1-2-another-story.md
└── .bmadnotion.yaml # bmadnotion config
Sync Behavior
Page Sync (Planning Artifacts)
| Local File | Notion |
|---|---|
prd.md |
Page: "PRD - {project}" |
architecture.md |
Page: "Architecture - {project}" |
ux-design-specification.md |
Page: "UX Design - {project}" |
- Creates new pages if not exist
- Updates existing pages if content changed (based on MD5 hash)
- Preserves Notion page IDs across syncs
Database Sync (Sprint Tracking)
| Local | Notion |
|---|---|
epic-N in sprint-status.yaml |
Row in Sprints database |
N-M-story-name in sprint-status.yaml |
Row in Tasks database |
| Story file content | Page content in Task row |
- Syncs Epic/Story status
- Creates Relation between Task and Sprint
- Story file content becomes page blocks
CLI Reference
# Initialize project
bmadnotion init [--project NAME]
# Sync all
bmadnotion sync [--force] [--dry-run]
# Sync pages only
bmadnotion sync pages [--force] [--dry-run]
# Sync database only
bmadnotion sync db [--force] [--dry-run]
# Show sync status
bmadnotion status
# Show configuration
bmadnotion config show
Notion Setup
1. Create a Notion Integration
- Go to Notion Integrations
- Click "New integration"
- Give it a name (e.g., "bmadnotion")
- Select the workspace
- Copy the "Internal Integration Token"
2. Share Pages/Databases with Integration
- Open the parent page where documents will be synced
- Click "..." menu → "Add connections"
- Select your integration
- Repeat for any databases you want to sync to
3. Get Page/Database IDs
Page and database IDs are in the URL:
https://notion.so/Your-Page-**abc123def456**→ ID isabc123def456https://notion.so/**abc123def456**?v=...→ ID isabc123def456
Troubleshooting
"Token not found" error
# Make sure NOTION_TOKEN is set
export NOTION_TOKEN=your_token_here
# Verify it's set
echo $NOTION_TOKEN
"Page not found" error
- Ensure the integration has access to the page
- Check that the page ID is correct
"Database not found" error
- Ensure the integration has access to the database
- Verify database ID in configuration
Sync not detecting changes
- bmadnotion uses content hash to detect changes
- Use
--forceto sync everything regardless of cache
Requirements
- Python 3.13+
- Notion Integration Token with appropriate permissions:
- Read/Write access to pages
- Read/Write access to databases
Related Projects
- marknotion - Markdown ↔ Notion blocks conversion
- BMAD Method - Breakthrough Method of Agile AI-Driven Development
Development
# Clone the repository
git clone git@github.com:li3p/bmadnotion.git
cd bmadnotion
# Install dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=bmadnotion --cov-report=html
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bmadnotion-0.1.2.tar.gz.
File metadata
- Download URL: bmadnotion-0.1.2.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318b5f50ca2f84c56976f559398ee07f8d6fe7d3f501cc58422675ba1c93c164
|
|
| MD5 |
87e28fb3db88897db27f0ec3d7955d11
|
|
| BLAKE2b-256 |
b7275e48145c00ea87e64b72bfcd4895322de40155843d1abf0aa4e9024adc16
|
Provenance
The following attestation bundles were made for bmadnotion-0.1.2.tar.gz:
Publisher:
workflow.yml on li3p/bmadnotion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bmadnotion-0.1.2.tar.gz -
Subject digest:
318b5f50ca2f84c56976f559398ee07f8d6fe7d3f501cc58422675ba1c93c164 - Sigstore transparency entry: 869239176
- Sigstore integration time:
-
Permalink:
li3p/bmadnotion@0c64be4dcf5f9f57e009be4abef74b1aee8b1e0a -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/li3p
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@0c64be4dcf5f9f57e009be4abef74b1aee8b1e0a -
Trigger Event:
push
-
Statement type:
File details
Details for the file bmadnotion-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bmadnotion-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2bf2cc4b054d856e476ca1cea99ccbe6966aa095d94ed3066e769432e51de0c
|
|
| MD5 |
50f075e8f63777899141fdd9a38e3a41
|
|
| BLAKE2b-256 |
5963fbe7a41af801bd84348c9844e92d671652229bfcd5e71f9e6755b4cb9adf
|
Provenance
The following attestation bundles were made for bmadnotion-0.1.2-py3-none-any.whl:
Publisher:
workflow.yml on li3p/bmadnotion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bmadnotion-0.1.2-py3-none-any.whl -
Subject digest:
f2bf2cc4b054d856e476ca1cea99ccbe6966aa095d94ed3066e769432e51de0c - Sigstore transparency entry: 869239179
- Sigstore integration time:
-
Permalink:
li3p/bmadnotion@0c64be4dcf5f9f57e009be4abef74b1aee8b1e0a -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/li3p
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@0c64be4dcf5f9f57e009be4abef74b1aee8b1e0a -
Trigger Event:
push
-
Statement type: