npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jiahaoshao1/notion-lifeos-fixer

v1.0.2

Published

Automatically fix database relations after duplicating LifeOS template

Readme

Notion LifeOS Relation Fixer

Automatically fix database relations after duplicating the LifeOS template.

Problem

When you duplicate a Notion template with multiple databases and relations between them, all the relation properties break because they reference the old database IDs.

This tool automatically scans your duplicated LifeOS page, finds all databases, and rebuilds the relations between them.

Installation

npx @jiahaoshao1/notion-lifeos-fixer <page_url> [api_key]

No installation needed! Just use npx to run it directly.

Usage

Step 1: Duplicate the LifeOS Template

Go to the LifeOS Template and click "Duplicate" in the top right corner.

Step 2: Get Your Notion API Key

  1. Go to Notion Integrations
  2. Click "+ New integration"
  3. Give it a name (e.g., "LifeOS Fixer")
  4. Copy the "Internal Integration Token"

Step 3: Share Your Page with the Integration

  1. Open your duplicated LifeOS page
  2. Click "Share" in the top right
  3. Click "Invite"
  4. Search for your integration name and select it

Step 4: Run the Fixer

npx @jiahaoshao1/notion-lifeos-fixer https://www.notion.so/Your-LifeOS-Page-abc123 secret_your_api_key

Or set the API key as an environment variable:

export NOTION_API_KEY=secret_your_api_key
npx @jiahaoshao1/notion-lifeos-fixer https://www.notion.so/Your-LifeOS-Page-abc123

What It Does

The fixer will:

  1. Scan your page for all child databases
  2. Identify each database by name (Task Database, Notes Database, etc.)
  3. Rebuild all relation properties according to the LifeOS schema:
    • Task → Projects, Notes
    • Notes → Projects, Areas, Resources
    • Projects → Notes, Areas, Resources
    • Resources → Projects, Notes, Areas
    • Areas → Notes, Resources
    • Make Time → (no relations)

Example Output

🚀 Starting LifeOS Relation Fixer

📄 Page ID: 2f6119f193ef80c88aaffeb3286ff632

📊 Scanning databases...
  ✓ Found: Task Database (abc123...)
  ✓ Found: Notes Database (def456...)
  ✓ Found: Projects Database (ghi789...)
  ✓ Found: Resources Database (jkl012...)
  ✓ Found: Areas Database (mno345...)
  ✓ Found: Make Time Database (pqr678...)

🔗 Updating relations...
  🔧 Task Database:
    ✓ Related to Projects → Projects Database
    ✓ Related to Notes → Notes Database
  🔧 Notes Database:
    ✓ Related to Projects → Projects Database
    ✓ Related to Areas → Areas Database
    ✓ Related Resources → Resources Database
  ...

✅ All relations fixed successfully!

Troubleshooting

"NOTION_API_KEY not found"

Make sure you either:

  • Pass the API key as the second argument
  • Set the NOTION_API_KEY environment variable

"No databases found in this page"

Make sure:

  • You're using the URL of the duplicated page (not the original template)
  • The page contains the LifeOS databases as child databases
  • You've shared the page with your integration

"Invalid Notion page URL"

The URL should look like:

  • https://www.notion.so/LifeOS-2f6119f193ef80c88aaffeb3286ff632
  • https://www.notion.so/2f6119f193ef80c88aaffeb3286ff632

License

MIT

Author

Jiahao Shao