CLI Documentation
The Papra CLI is a command-line interface tool that helps you interact with the Papra platform from your terminal.
Installation
Section titled “Installation”For the moment, the CLI is only available as an NPM package.
# using pnpmpnpm i -g @papra/cli
# or using npmnpm i -g @papra/cli
# or using yarnyarn add -g @papra/cli
The CLI will be installed globally, so you can use it from anywhere in your system with the papra
command.
Configuration
Section titled “Configuration”Before using the CLI, you need to configure it with your API credentials.
Initial Setup
Section titled “Initial Setup”To initialize the configuration, run:
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)
Managing Configuration
Section titled “Managing Configuration”You can manage your configuration using the following commands:
papra config list
: View your current configurationpapra config set api-key
: Set or update your API keypapra config set api-url
: Set or update your instance URLpapra config set default-org-id
: Set a default organization ID
Organization IDs
Section titled “Organization IDs”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.
papra config set default-org-id <organization-id>papra documents import <file-path>
# orpapra documents import -o <organization-id> <file-path>
Available Commands
Section titled “Available Commands”Importing documents
Section titled “Importing documents”The import
command allows you to import a document into your Papra organization.
papra documents import -o <organization-id> <file-path>
Getting Help
Section titled “Getting Help”For more information about any command, you can use the --help
flag:
papra --helppapra config --helppapra documents --help
About the CLI
Section titled “About the CLI”The CLI is built using the citty framework and the Papra TS SDK.