Command line interface for Papra, the document archiving platform.
npm install @papra/cliThe Papra CLI is a command-line interface tool that helps you interact with the Papra platform from your terminal.
For the moment, the CLI is only available as an NPM package.
``bashusing pnpm
pnpm i -g @papra/cli
The CLI will be installed globally, so you can use it from anywhere in your system with the
papra command.Configuration
Before using the CLI, you need to configure it with your API credentials.
$3
To initialize the configuration, run:
`bash
papra config init
`This command will prompt you for:
- Instance URL: Your Papra instance URL (e.g.,
https://api.papra.app)
- API Key: Your personal API key (can be created in your User Settings)$3
You can manage your configuration using the following commands:
-
papra config list: View your current configuration
- papra config set api-key: Set or update your API key
- papra config set api-url: Set or update your instance URL
- papra config set default-org-id: Set a default organization ID$3
Since Papra supports multiple organizations, you may need to specify the organization ID when importing documents for example. If want, you can set a default organization ID in your configuration.
`bash
papra config set default-org-id
papra documents import or
papra documents import -o
`Available Commands
$3
The
import command allows you to import a document into your Papra organization.`bash
papra documents import -o
`Getting Help
For more information about any command, you can use the
--help flag:`bash
papra --help
papra config --help
papra documents --help
``The CLI is built using the citty framework and the Papra TS SDK.