{"id":34057073,"url":"https://github.com/papermerge/papermerge-cli","last_synced_at":"2026-04-08T17:31:04.397Z","repository":{"id":64369390,"uuid":"562367571","full_name":"papermerge/papermerge-cli","owner":"papermerge","description":"Papermerge DMS command line utility","archived":false,"fork":false,"pushed_at":"2024-02-22T06:05:07.000Z","size":109,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T22:46:58.271Z","etag":null,"topics":["archive","command-line-tool","dms","document-management-system","ocr","papermerge","pdf","records-management","scanned-documents"],"latest_commit_sha":null,"homepage":"https://docs.papermerge.io/Command%20Line%20Utilities/cli.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/papermerge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-06T05:42:11.000Z","updated_at":"2025-01-09T20:52:07.000Z","dependencies_parsed_at":"2023-12-22T08:24:44.199Z","dependency_job_id":"88653881-560a-45b8-b662-e279cbeec9cc","html_url":"https://github.com/papermerge/papermerge-cli","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/papermerge/papermerge-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papermerge%2Fpapermerge-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papermerge%2Fpapermerge-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papermerge%2Fpapermerge-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papermerge%2Fpapermerge-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/papermerge","download_url":"https://codeload.github.com/papermerge/papermerge-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/papermerge%2Fpapermerge-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31566682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["archive","command-line-tool","dms","document-management-system","ocr","papermerge","pdf","records-management","scanned-documents"],"created_at":"2025-12-14T03:16:24.784Z","updated_at":"2026-04-08T17:31:04.385Z","avatar_url":"https://github.com/papermerge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/papermerge/papermerge-cli/actions/workflows/tests.yml/badge.svg)](https://github.com/papermerge/papermerge-cli/actions/workflows/tests.yml)\n\n# Papermerge Cli\n\nCommand line utility which uses REST API to interact with your Papermerge DMS\ninstance. You can use `papermerge-cli`, for example, to recursively import local folder to\nyour Papermerge DMS instance.\n\n## Requirements\n\nIn order to use `papermerge-cli` you need to have python installed.\nYou need [python](https://www.python.org/) version \u003e= 3.10.\n\n## Install\n\n    $ pip install papermerge-cli\n\n[pip](https://pypi.org/project/pip/) is package installer for python - it usually comes with python\ninterpreter. In order to install `pip` on Ubuntu use following command:\n\n    $ sudo apt install python3-pip\n\n\n## REST API/CLI Version Compatibility\n\nREST API column - is version of Papermerge REST API server. This value\nyou can get from:\n\n    $ papermerge-cli server-version\n\nCLI column - is version of papermege-cli command line utility. This value\nyou can get from:\n\n    $ papermerge-cli --version\n\n\n| REST API | CLI  |\n|----------|------|\n| =3.0     | =0.7 |\n| =2.1     | = 0.3.3|\n\n## Usage\n\nGet you REST API authentication token from your instance:\n\n    $ papermerge-cli --host=https://mydms.some-vps.com auth\n\nOr you can provide host as environment variable:\n\n    $ export PAPERMERGE_CLI__HOST=https://mydms.some-vps.com\n    $ papermerge-cli auth\n\nPapermerge Cli will prompt you for username and password. On successfull\nauthentication your REST API token will be displayed - now you can use\nthis token for all subsequent authentications.\n\nUse token for authentication by exporting token as `PAPERMERGE_CLI__TOKEN`\nenvironment variable:\n\n    $ export PAPERMERGE_CLI__TOKEN=mytoken\n\n### list\n\nNow, with `PAPERMERGE_CLI__HOST` and `PAPERMERGE_CLI__TOKEN` environment\nvariables set you can use list content of you home folder:\n\n    $ papermerge-cli list\n\nIn order to list content of specific folder (including inbox folder):\n\n    $ papermerge-cli list --parent-uuid=UUID-of-the-folder\n\n### me\n\nIn order to see current user details (current user UUID, home folder UUID, inbox\nfolder UUID, username etc):\n\n    $ papermerge-cli me\n\n### pref-list\n\nList all preferences:\n\n    $ papermerge-cli pref-list\n\nList specific section of the preferences\n\n    $ papermerge-cli pref-list --section=ocr\n\nShow value of preference `trigger` from section `ocr`:\n\n    $ papermerge-cli pref-list --section=ocr --name=trigger\n\n### pref-update\n\nUpdate value of the preference `trigger` from section `ocr`:\n\n    $ papermerge-cli pref-update --section=ocr --name=trigger --value=auto\n\n### import\n\nRecursively imports folder from local filesystem. For example, in order\nto import recursively all documents from local folder:\n\n    $ papermerge-cli import /path/to/local/folder/\n\nYou can also import one single document\n\n    $ papermerge-cli import /path/to/some/document.pdf\n\nIf you want the local copy the uploaded documents **to be deleted** after\nsuccessful import - add `--delete` flag:\n\n    $ papermerge-cli import --delete /path/to/folder/\n\nPLEASE BE CAREFUL WITH `--delete` FLAG AS IT WILL IRREVERSIBLE DELETE THE LOCAL\nCOPY OF THE UPLOADED DOCUMENT!\n\nChoose to skip OCR of imported documents with `--skip-ocr` flag:\n\n    $ papermerge-cli import --skip-ocr /path/to/folder/\n\nSkip OCR flag can be used with folders (will apply to all docs in the folder)\nor with individual documents.\n`--skip-ocr` flag will work only with Papermerge REST API \u003e= v3.1\n\n### search\n\nSearch for node (document or folder) by text or by tags:\n\n    $ papermerge-cli search -q apotheke\n\nReturns all documents (or folders with such title) containing OCRed\ntext 'apotheke'.\n\nYou can search by tags only:\n\n    $ papermerge-cli search --tags important\n\nWill search for all documents (and folders) which were tagged with\ntag 'important' When multiple tags are provided, by default, will search for\nnodes with all mentioned tags:\n\n    $ papermerge-cli search --tags important,letters  # returns nodes with both tags important AND letters\n\nIn case you want to search for nodes with ANY of the provided tags, use\n`tags-op` parameter:\n\n    $ papermerge-cli search --tags important,letters --tags-op any\n\nFinally, `tags` and `q` may be combined:\n\n    $ papermerge-cli search --tags important -q apartment\n\n### download\n\nDownloads a folder or a document:\n\n    $ papermerge-cli download --uuid \u003cdocument or folder uuid\u003e\n\nIn case uuid is the ID of specific folder - a zip file will be downloaded; zip\nfile will contain all nodes insides specified folder.\n\nYou can use `--uuid` multiple times:\n\n    $ papermerge-cli download --uuid \u003cuuid of doc1\u003e --uuid \u003cuuid of doc2\u003e --uuid \u003cuuid of folder 1\u003e\n\nIf you want to download content to specific file on your file-system, use `-f`\noption:\n\n    $ papermerge-cli download --uuid \u003cdoc-uuid\u003e -f /path/to/file-system/document.pdf\n\nor in case of uuid is a folder:\n\n    $ papermerge-cli download --uuid \u003cfolder-uuid\u003e  -f /path/to/file-system/folder.zip\n\nYou can also specify the format/type of the downloaded archive (e.g. in case node is either a folder):\n\n     $ papermerge-cli download --uuid \u003cfolder-uuid\u003e  -f /path/to/file-system/folder.targz -t targz\n\n\n## Version Compatiblity\n\n\n| CLI Version | REST API version | Remarks|\n|-------------|------------------|--------|\n| 0.7.0       | 3.0.x            ||\n| 0.7.1       | 3.0.x            ||\n| 0.8.0       | 3.1.x            | Skip OCR feature introduced|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapermerge%2Fpapermerge-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpapermerge%2Fpapermerge-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpapermerge%2Fpapermerge-cli/lists"}