{"id":49718673,"url":"https://github.com/b0x42/paperless2papra","last_synced_at":"2026-05-08T22:13:59.075Z","repository":{"id":349744969,"uuid":"1203714644","full_name":"b0x42/paperless2papra","owner":"b0x42","description":"CLI migration tool to export documents from Paperless-ngx and import them into Papra","archived":false,"fork":false,"pushed_at":"2026-05-06T08:29:52.000Z","size":357,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-06T10:30:34.500Z","etag":null,"topics":["cli","document-management","migration","paperless-ngx","papra"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b0x42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T09:54:23.000Z","updated_at":"2026-05-06T08:29:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/b0x42/paperless2papra","commit_stats":null,"previous_names":["b0x42/paperless-to-papra","b0x42/paperless2papra"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/b0x42/paperless2papra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0x42%2Fpaperless2papra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0x42%2Fpaperless2papra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0x42%2Fpaperless2papra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0x42%2Fpaperless2papra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b0x42","download_url":"https://codeload.github.com/b0x42/paperless2papra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b0x42%2Fpaperless2papra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32799476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","document-management","migration","paperless-ngx","papra"],"created_at":"2026-05-08T22:13:58.420Z","updated_at":"2026-05-08T22:13:59.069Z","avatar_url":"https://github.com/b0x42.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paperless2papra\n\n[![CI](https://github.com/b0x42/paperless2papra/actions/workflows/ci.yml/badge.svg)](https://github.com/b0x42/paperless2papra/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/b0x42/paperless2papra/actions/workflows/codeql.yml/badge.svg)](https://github.com/b0x42/paperless2papra/actions/workflows/codeql.yml)\n[![License: AGPL-3.0](https://img.shields.io/github/license/b0x42/paperless2papra)](LICENSE)\n[![Latest Release](https://img.shields.io/github/v/release/b0x42/paperless2papra)](https://github.com/b0x42/paperless2papra/releases/latest)\n\nCLI migration tool to export documents from [Paperless-ngx](https://docs.paperless-ngx.com) and import them into [Papra](https://papra.app).\n\n\u003e [!TIP]\n\u003e **Try Papra risk-free.** This tool copies your documents from Paperless-ngx to Papra without touching your Paperless data. Nothing gets modified, nothing gets deleted — it's read-only on the Paperless side. If you don't like Papra, your Paperless setup is exactly as you left it.\n\n## Features\n\n- 📦 **Full export** — documents, tags, correspondents, and document types from Paperless-ngx\n- 🏷️ **Metadata preservation** — correspondents → `correspondent:` tags, document types → `type:` tags, colors preserved\n- 📅 **Date \u0026 ASN encoding** — created dates and archive serial numbers embedded in document names\n- 🔍 **OCR content transfer** — full-text search preserved in Papra\n- 👀 **Dry-run mode** — preview what would be migrated without making changes\n- 💾 **Export-only mode** — dump Paperless-ngx data to JSON\n- 🔁 **Idempotent** — safe to re-run, duplicates are skipped via SHA256\n\n## Installation\n\nRun directly with `npx` (no install needed):\n\n```bash\nnpx github:b0x42/paperless2papra migrate --help\n```\n\nOr install globally from the [latest release](https://github.com/b0x42/paperless2papra/releases/latest):\n\n```bash\nnpm install -g https://github.com/b0x42/paperless2papra/releases/download/v1.0.0/paperless2papra-1.0.0.tgz\n```\n\n## Usage\n\n### What you'll need\n\n| Value | Where to get it |\n|-------|----------------|\n| `PAPERLESS_URL` | The URL of your Paperless-ngx instance (e.g. `http://localhost:8000`) |\n| `PAPERLESS_TOKEN` | In Paperless-ngx, go to **Settings → API Auth Token** |\n| `PAPRA_URL` | The URL of your Papra instance (e.g. `http://localhost:1221`) |\n| `PAPRA_TOKEN` | In Papra, go to **API Keys** (`/api-keys`) and generate a key |\n| `PAPRA_ORG_ID` | In Papra, go to **Admin → Organizations** (`/admin/organizations`) |\n\n### Full migration\n\n```bash\npaperless2papra migrate \\\n  --paperless-url http://localhost:8000 \\\n  --paperless-token YOUR_PAPERLESS_TOKEN \\\n  --papra-url http://localhost:1221 \\\n  --papra-token YOUR_PAPRA_API_KEY \\\n  --papra-org-id YOUR_ORG_ID\n```\n\n### Dry run (preview without changes)\n\n```bash\npaperless2papra dry-run \\\n  --paperless-url http://localhost:8000 \\\n  --paperless-token YOUR_PAPERLESS_TOKEN\n```\n\n### Export only (dump to JSON)\n\n```bash\npaperless2papra export-only \\\n  --paperless-url http://localhost:8000 \\\n  --paperless-token YOUR_PAPERLESS_TOKEN \\\n  --output export.json\n```\n\n### Environment variables\n\nAll options can be provided via environment variables instead of flags:\n\n| Flag | Environment Variable |\n|------|---------------------|\n| `--paperless-url` | `PAPERLESS_URL` |\n| `--paperless-token` | `PAPERLESS_TOKEN` |\n| `--papra-url` | `PAPRA_URL` |\n| `--papra-token` | `PAPRA_TOKEN` |\n| `--papra-org-id` | `PAPRA_ORG_ID` |\n\n## How data is mapped\n\nSee [docs/design-decisions.md](docs/design-decisions.md) for full details.\n\n| Paperless-ngx | Papra |\n|---|---|\n| Document file | Document (uploaded) |\n| Document title | Document name (with date/ASN prefix) |\n| Tags | Tags (color preserved) |\n| Correspondents | Tags with `correspondent:` prefix |\n| Document types | Tags with `type:` prefix |\n| Created date | Encoded in document name: `[YYYY-MM-DD]` |\n| Archive serial number | Encoded in document name: `[ASN:n]` |\n| OCR content | Document content field |\n\n### Document name format\n\n```\n[YYYY-MM-DD] [ASN:n] Original Title.ext\n```\n\nSegments are omitted when not available.\n\n## Required Papra API permissions\n\nYour Papra API key needs these permissions:\n- `organizations:read`\n- `documents:create`, `documents:read`, `documents:update`\n- `tags:create`, `tags:read`\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run from source (no build needed)\nnpm run dev -- migrate --help\n\n# Build dist/ from src/\nnpm run build\n\n# Run tests\nnpm test\n```\n\nAfter making changes to `src/`, run `npm run build` and commit both `src/` and `dist/` — the compiled `dist/` is committed so the package can be installed directly from GitHub without a build step.\n\n## License\n\n[AGPL-3.0-or-later](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb0x42%2Fpaperless2papra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb0x42%2Fpaperless2papra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb0x42%2Fpaperless2papra/lists"}