{"_id":"@1984vc/notion-tools","_rev":"6-0f8e078933125e677f46d3cd92da5ddf","name":"@1984vc/notion-tools","dist-tags":{"latest":"4.0.0"},"versions":{"3.0.0":{"name":"@1984vc/notion-tools","version":"3.0.0","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.0.0","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"f5f012672f0490200293fedbd11b6542b813b8a3","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.0.0.tgz","fileCount":40,"integrity":"sha512-iHfoC7tiIchG3LefpZibuezvvNUtfOqFDP87be59+HB1nfGTGAhhPKatDVSPLazDgFyhZ7oiCGZzdHWcD3TRcw==","signatures":[{"sig":"MEUCIGfzQ4+qKkzq9A5/QOXjUMoLYD+FuTpZ57tqY9MaT8jwAiEAmRn0akJMHtzkuWvVGZSZ9At+OOzAjR4W423IYqYUBFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135370},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"6388731dcf54767f64a970778ed2fedba3f9670f","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.1","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.0.0_1736437021088_0.28594911692018443","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@1984vc/notion-tools","version":"3.1.0","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.1.0","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"624aea120d8fc8f5dbf69a5e13a0998dc5e1fe54","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.1.0.tgz","fileCount":40,"integrity":"sha512-spBZUQZBJHLpL+RwW3e+/QDrS8CWbNqx+3AGLm13UP0+hX3ruWjqwiPqsPIOVvBF9FkN+f+refIeaPTry47lDg==","signatures":[{"sig":"MEYCIQDf0saQI4SbAcbkqbO1Ce9BgJFHgd2k1+L+R4HL8jIKywIhAOfemSHEr/jlmCw7kSEsA540VU1T5KB7UZTvn40D4CH3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146898},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"b036307c1b9786f223b19f848d53a6c7f5547247","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.1","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.1.0_1736449693142_0.24202842506876987","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@1984vc/notion-tools","version":"3.2.0","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.2.0","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"800c58b1a2b59d2c1636eaa219e7f681474382f3","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.2.0.tgz","fileCount":40,"integrity":"sha512-ZZNzxEhicUovE6DetNV/9lu+Wf0djCqBRUCMql5cBAGZ6ooq0di5fQqx93vaVuqfDGaydh0e75lk+nfgM1UrcQ==","signatures":[{"sig":"MEUCIFe4Mgj21JThWaSaH/KMiWnztQvmTNRwfhUvobMk8PCZAiEAxKvr3MuaKc3brM3vxPnWGAVqy0bmN3njSViW4kwQSco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147593},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"f018a83983bd00cf6fbf2eb34b308d120d153383","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.1","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.2.0_1736524656195_0.8149092809496905","host":"s3://npm-registry-packages-npm-production"}},"3.2.1":{"name":"@1984vc/notion-tools","version":"3.2.1","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.2.1","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"3279a6332f14edc50a3dd8fd69740f98a12aec40","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.2.1.tgz","fileCount":40,"integrity":"sha512-ofPwwh8zOGSgqXXfOhCKwZo1ecXHJcHQ197Y0bpCi+IRRov3tSsQKvwD/w3k2/ljn3zGnGKhsMTaJf/pRLsCmA==","signatures":[{"sig":"MEUCIQDjN7R8HqjTDKFTnpi7RGdg2oyKJ8glm9RDLmEMIiVBfgIgQAEXRCKVT/v3xpCIBcs8Z02yDRNQhiE0FK5MWj8Ffmc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147457},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"93671fdc371b4408d45e6c1aecbe552218344044","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.1","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.2.1_1736537793639_0.6008519552092129","host":"s3://npm-registry-packages-npm-production"}},"3.3.0":{"name":"@1984vc/notion-tools","version":"3.3.0","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.3.0","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"a540327f3a357d02ab05352262440ee84c3bbd6a","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.3.0.tgz","fileCount":40,"integrity":"sha512-TE8UbzIY9TUcv1jr4mF+UhMKEf+pk9sIALRe6sjCzSZAjZXuMI+bsVJMWNIBN2UeRNQq2CmwJRKE55mapMsoAQ==","signatures":[{"sig":"MEYCIQClBsmbkJFTp4lL2ov+P+nkjA7Vd1ivelFzbcgqd1mmCQIhAIVIoOi9qRNg8i7sQWINIJ2UC2xj2xgl9DrVt66yvTPj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147597},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"289dcba54a098dba87441faf639cea0d84a7e24d","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.1","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.3.0_1736545071120_0.07203126454303499","host":"s3://npm-registry-packages-npm-production"}},"3.3.1":{"name":"@1984vc/notion-tools","version":"3.3.1","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","_id":"@1984vc/notion-tools@3.3.1","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"homepage":"https://github.com/1984vc/notion-tools","bin":{"notion-tools":"dist/index.js"},"dist":{"shasum":"ac2d37ef889cd35fddf199f4aead07e0663aab8d","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-3.3.1.tgz","fileCount":40,"integrity":"sha512-VF6ezvDmnYKfX3yotfo7wd52vnfbkPGt3ZKXgCE32DSGQ6piPbq2cfoe9piYAdE4vfDdAUOxxg8XefybFZJImg==","signatures":[{"sig":"MEYCIQDCDBhFEKIlv0KNztfPqN8zD/tazQYzVMcFnhdTAisKPwIhAJIDeq+gfLWXmHOSgjBU6kEJRCPiNxi5/lXvHaq6bbqz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":147619},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"5c6f281d6bbd1f821b4191342b14bfdfc26371a0","scripts":{"cli":"tsx bin/index.ts","lint":"eslint .","test":"vitest run","build":"tsc","start":"node dist/index.js","lint:fix":"eslint . --fix","test:watch":"vitest"},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"_npmVersion":"10.8.2","description":"CLI tool to export Notion database pages to various formats","directories":{},"_nodeVersion":"20.18.2","dependencies":{"commander":"^12.1.0","notion-to-md":"^3.1.4","@notionhq/client":"^2.2.15"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","eslint":"^9.14.0","vitest":"^2.1.4","globals":"^14.0.0","@eslint/js":"^9.14.0","typescript":"^5.6.3","@types/node":"^22.9.0","@typescript-eslint/parser":"^8.14.0","@typescript-eslint/eslint-plugin":"^8.14.0"},"_npmOperationalInternal":{"tmp":"tmp/notion-tools_3.3.1_1738688187214_0.4146017106608084","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@1984vc/notion-tools","version":"4.0.0","description":"CLI tool to export Notion database pages to various formats","homepage":"https://github.com/1984vc/notion-tools","main":"dist/index.js","bin":{"notion-tools":"dist/index.js"},"type":"module","scripts":{"build":"tsc","start":"node dist/index.js","test":"vitest run","test:watch":"vitest","lint":"eslint .","lint:fix":"eslint . --fix","cli":"tsx bin/index.ts"},"keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","dependencies":{"@notionhq/client":"^2.2.15","commander":"^12.1.0","notion-to-md":"^3.1.4"},"devDependencies":{"@eslint/js":"^9.14.0","@types/jest":"^29.5.14","@types/node":"^22.9.0","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","eslint":"^9.14.0","globals":"^14.0.0","tsx":"^4.19.2","typescript":"^5.6.3","vitest":"^2.1.4"},"engines":{"node":">=14.0.0"},"publishConfig":{"access":"public"},"_id":"@1984vc/notion-tools@4.0.0","gitHead":"9f3412e9b65f92d7dd3381c630757f57a4dbab46","types":"./dist/index.d.ts","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-fen3God+46Qfn/loD5WgmanncwGpd7sIprrkhrmxMrNdttwjmhfEj0/vMMBitJZszQv/MpExAoKs3NTNjDWeEA==","shasum":"f02e0a690148f80d74636adc07817fab3050fa73","tarball":"https://registry.npmjs.org/@1984vc/notion-tools/-/notion-tools-4.0.0.tgz","fileCount":40,"unpackedSize":449094,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDyTSyE77a6WaSwgoXxO0+tKshXh6KThvbAR25Mu2X8gAIhAI3LW8m+YvPB1g9R4eJYr9UIDGdQadXV/05KfFxVeM3k"}]},"_npmUser":{"name":"mdp","email":"m@mdp.im"},"directories":{},"maintainers":[{"name":"mdp","email":"m@mdp.im"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/notion-tools_4.0.0_1738699902941_0.8257402286972886"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-09T15:37:00.980Z","modified":"2025-02-04T20:11:43.377Z","3.0.0":"2025-01-09T15:37:01.252Z","3.1.0":"2025-01-09T19:08:13.327Z","3.2.0":"2025-01-10T15:57:36.359Z","3.2.1":"2025-01-10T19:36:33.957Z","3.3.0":"2025-01-10T21:37:51.331Z","3.3.1":"2025-02-04T16:56:27.395Z","4.0.0":"2025-02-04T20:11:43.198Z"},"author":{"name":"Mark Percival","email":"mdp@1984.vc"},"license":"MIT","homepage":"https://github.com/1984vc/notion-tools","keywords":["notion","mdx","markdown","export","cli","notion-to-md"],"description":"CLI tool to export Notion database pages to various formats","maintainers":[{"name":"mdp","email":"m@mdp.im"}],"readme":"# @1984vc/notion-tools\n\n[![CI](https://github.com/1984vc/notion-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/1984vc/notion-tools/actions/workflows/ci.yml)\n\nA CLI tool to export Notion database pages to various formats\n\n## Features\n\n- Export all pages from a Notion database to Markdown or MDX files\n- Supports Hextra (Markdown) and Nextra (MDX) formats\n- Preserves page metadata in frontmatter\n- Maintains Notion content structure using notion-to-md\n- Generates clean filenames from page titles\n- Includes creation and last edited timestamps\n- Supports internal link transformations\n- Optional JSON export for raw data\n\n## Prerequisites\n\n- Node.js >= 14.0.0\n- A Notion integration token\n- Access to the Notion database you want to export\n\n## Installation\n\nYou can install this CLI tool globally using npm:\n\n```bash\nnpm install -g @1984vc/notion-tools@latest\n```\n\nOr locally in your project:\n\n```bash\nnpm add -D @1984vc/notion-tools@latest\n```\n\n## Setup\n\n1. Create a Notion integration at https://www.notion.so/my-integrations\n2. Copy the integration token\n3. Set the token as an environment variable:\n```bash\nexport NOTION_TOKEN=your_integration_token\n```\n4. Share your Notion database with the integration (click 'Share' in Notion and add your integration)\n\n## Usage\n\n### Export Formats\n\n#### Nextra (MDX)\n```bash\nnotion-tools export nextra --id <database_id> -o <output_path> [options]\n```\n\n#### Hextra (Markdown)\n```bash\nnotion-tools export hextra --id <database_id> -o <output_path> [options]\n```\n\nOptions for both formats:\n- `--id`: Required. The Notion database ID\n- `-o, --output`: Required. The output directory path\n- `--include-json`: Optional. Include raw JSON export in output directory\n- `--base-path`: Optional. Base path for internal links (e.g., /docs)\n- `--no-frontmatter`: Optional. Exclude frontmatter from files\n\nExample:\n```bash\nnotion-tools export nextra --id \"123456789abcdef\" -o \"./content/posts\" --base-path \"/docs\"\n```\n\n### Export to JSON\n\n```bash\nnotion-tools json --id <database_id> -o <output_path>\n```\n\nOptions:\n- `--id`: Required. The Notion database ID\n- `-o, --output`: Required. The output directory path for JSON file\n\nExample:\n```bash\nnotion-tools json --id \"123456789abcdef\" -o \"./content/data\"\n```\n\n### Export Raw JSON\n\n```bash\nnotion-tools raw-json --id <id> [-o <output_path>]\n```\n\nOptions:\n- `--id`: Required. The Notion database or page ID\n- `-o, --output`: Optional. Output file path (defaults to stdout)\n\nExample:\n```bash\nnotion-tools raw-json --id \"123456789abcdef\" -o \"./data/raw.json\"\n```\n\n### Finding Your Database ID\n\nThe database ID is the part of your Notion database URL after the workspace name and before the question mark:\n```\nhttps://www.notion.so/workspace-name/123456789abcdef?v=...\n                                   ^^^^^^^^^^^^^^\n                                   This is your database ID\n```\n\n## Output Format\n\nEach page is exported as a file with frontmatter metadata:\n\n```mdx\n---\ntitle: Page Title\nnotionId: page-id\ncreatedAt: 2024-01-01T00:00:00.000Z\nlastEditedAt: 2024-01-01T00:00:00.000Z\nweight: 0\n---\n\n[Your page content here]\n```\n\n## Development\n\nTo develop locally:\n\n1. Clone this repository\n2. Install dependencies: `npm install`\n3. Set up your NOTION_TOKEN environment variable\n4. Link the package locally: `npm link`\n5. Run the CLI: `notion-tools export nextra --id <database_id> -o <output_path>`\n\n### Testing and Linting\n\nRun tests:\n```bash\nnpm test\n```\n\nRun linting:\n```bash\nnpm run lint\n```\n\n## CI/CD\n\nThis project uses GitHub Actions for continuous integration and deployment:\n\n### Continuous Integration\n\nThe CI workflow runs automatically on:\n- All pull requests to the `main` branch\n- All pushes to the `main` branch\n\nIt performs:\n- Installation of dependencies\n- Code linting\n- Test suite execution\n\n### Automated Releases\n\nTo publish a new version to npm:\n\n1. Update the version in package.json:\n```bash\nnpm version patch  # for bug fixes\nnpm version minor  # for new features\nnpm version major  # for breaking changes\n```\n\n2. Push the new version tag:\n```bash\ngit push origin v*\n```\n\nThe release workflow will automatically:\n- Run tests\n- Build the package\n- Publish to npm under the @1984vc organization\n\nNote: Publishing requires an NPM_TOKEN secret to be set in the repository's GitHub secrets.\n\n## Dependencies\n\nKey dependencies:\n- @notionhq/client: ^2.2.15\n- commander: ^12.1.0\n- notion-to-md: ^3.1.1\n\n## Error Handling\n\nThe CLI will:\n- Verify the NOTION_TOKEN is set\n- Create the output directory if it doesn't exist\n- Skip and report any pages that fail to export\n- Provide progress feedback during export\n\n## License\n\nMIT\n\n## CLI Instructions\n\n### Export Formats\n\n#### Nextra (MDX)\n```bash\nnotion-tools export nextra --id <database_id> -o <output_path> [options]\n```\n\n#### Hextra (Markdown)\n```bash\nnotion-tools export hextra --id <database_id> -o <output_path> [options]\n```\n\nOptions for both formats:\n- `--id`: Required. The Notion database ID\n- `-o, --output`: Required. The output directory path\n- `--include-json`: Optional. Include raw JSON export in output directory\n- `--base-path`: Optional. Base path for internal links (e.g., /docs)\n- `--no-frontmatter`: Optional. Exclude frontmatter from files\n\nExample:\n```bash\nnotion-tools export nextra --id \"123456789abcdef\" -o \"./content/posts\" --base-path \"/docs\"\n```\n\n### Export to JSON\n\n```bash\nnotion-tools json --id <database_id> -o <output_path>\n```\n\nOptions:\n- `--id`: Required. The Notion database ID\n- `-o, --output`: Required. The output directory path for JSON file\n\nExample:\n```bash\nnotion-tools json --id \"123456789abcdef\" -o \"./content/data\"\n```\n\n### Export Raw JSON\n\n```bash\nnotion-tools raw-json --id <id> [-o <output_path>]\n```\n\nOptions:\n- `--id`: Required. The Notion database or page ID\n- `-o, --output`: Optional. Output file path (defaults to stdout)\n\nExample:\n```bash\nnotion-tools raw-json --id \"123456789abcdef\" -o \"./data/raw.json\"\n```\n\n### Finding Your Database ID\n\nThe database ID is the part of your Notion database URL after the workspace name and before the question mark:\n```\nhttps://www.notion.so/workspace-name/123456789abcdef?v=...\n                                   ^^^^^^^^^^^^^^\n                                   This is your database ID\n","readmeFilename":"README.md"}