Skip to main content

NotionFS

Local-first sync for Notion. Work with pages as markdown files.

PyPI version CI License


Features

Feature Description
Bidirectional Sync Push local changes to Notion, pull remote changes down
Markdown Native Edit pages as .md files with full formatting support
Frontmatter Properties Database properties sync via YAML frontmatter
Conflict Detection Smart detection with multiple resolution strategies
Watch Mode Continuous sync with file watching and remote polling
Offline First Work without internet, sync when ready

Installation

pip install notionfs

Quick Start

# Set your Notion API token
export NOTION_TOKEN="secret_..."

# Initialize a workspace (interactive page selection)
notionfs clone

# Or from a URL directly
notionfs clone https://www.notion.so/My-Page-abc123...

# Sync your changes
notionfs pull    # Download from Notion
notionfs push    # Upload to Notion
notionfs sync    # Bidirectional sync

Commands

Command Description
notionfs clone [URL] Clone a Notion page or database to local workspace
notionfs pull Download remote changes from Notion
notionfs push Upload local changes to Notion
notionfs sync Bidirectional sync (pull then push)
notionfs status Show pending changes and conflicts
notionfs watch Continuous sync with file watching
notionfs resolve <file> Resolve sync conflicts
notionfs auth [token] Manage Notion API token
notionfs list List initialized workspaces

Workspace Structure

my-workspace/
├── .notionfs/
│   ├── config.toml       # Workspace config
│   └── state.db          # Sync state
├── Page Title.md         # Leaf page
├── Parent Page/          # Page with children -> directory
│   ├── _index.md         # Parent page content
│   └── Child Page.md
└── Database Name/        # Database -> directory
    ├── Entry 1.md
    └── Entry 2.md

Markdown Format

Pages are markdown with YAML frontmatter for database properties:

---
Status: In Progress
Tags:
  - work
  - important
Due Date: 2024-03-15
---

# Meeting Notes

Your content here.

- Bullet points
- [ ] Todo items
- [x] Completed items

> Quotes work too

Conflict Resolution

# Check for conflicts
notionfs status

# Resolve conflicts
notionfs resolve "Page.md" --keep-local   # Your version wins
notionfs resolve "Page.md" --keep-remote  # Notion version wins
notionfs resolve "Page.md" --keep-both    # Keep both versions

Watch Mode

# Continuous sync (2s local debounce, 30s remote poll)
notionfs watch

# Custom intervals
notionfs watch -d 1 -i 60    # 1s debounce, 60s poll

Configuration

Token lookup order:

  1. NOTION_TOKEN environment variable
  2. ~/.notionfs/config.toml file
# Save token permanently
notionfs auth secret_...

Tips & Tricks

# Search across all notes
grep -r "TODO" .

# Batch edit
find . -name "*.md" -exec sed -i 's/old/new/g' {} \;
notionfs push

# Git integration (version history for your notes)
git init && echo ".notionfs/" >> .gitignore

Troubleshooting

# Debug mode
notionfs --debug pull
notionfs --debug push

# Page not accessible?
# -> Add your integration via page menu -> Connections

License

MIT

Metadata

Release files for notionfs 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notionfs 0.4.0
File Size Uploaded Provenance Actions
notionfs-0.4.0.tar.gz 183.5 kB With provenance Details for notionfs-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for notionfs 0.4.0
File Interpreter ABI Platform Actions
notionfs-0.4.0-py3-none-any.whl Python 3 none any Details for notionfs-0.4.0-py3-none-any.whl

Total release size: 245.0 kB

Release files / notionfs-0.4.0.tar.gz

Download URL notionfs-0.4.0.tar.gz
Size 183.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cff727fd0056052682b64fdbad01d2fda9be639dc4caab8d90be087f7210ebae
BLAKE2b-256 checksum
How to use checksums
05c6de77794bd3f264b56c19cd3f1891ea335198ad9475210bc273bf2955cae0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.

Transparency log

Release files / notionfs-0.4.0-py3-none-any.whl

Download URL notionfs-0.4.0-py3-none-any.whl
Size 61.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d6c675d55e8386db4249f5b5302967b26339229aa5200eb0264d54d44036ade
BLAKE2b-256 checksum
How to use checksums
c62e13221f1b35c7c03202a4d9887df3ed631c2591bf50dfda9ac847e4ca31bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.

Transparency log

Security for notionfs 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for notionfs-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page