Skip to content

Ericsunsk/Pocketbase-CLI

Repository files navigation

PocketBase CLI

Node.js 20+ Remote Only JSON + Schema Latest Release Last Commit GitHub Stars

Standalone remote CLI for deployed PocketBase instances.

English | 简体中文

Overview

PocketBase CLI provides a consistent command surface for remote administration, automation, and agent-driven workflows. It wraps the PocketBase HTTP API with stable command semantics, explicit confirmation guards, and machine-readable output designed for scripts and tools.

Highlights

  • Remote-first administration for deployed PocketBase instances
  • Stable --json output for automation and integrations
  • Machine-readable schema --json command contract
  • Browser-assisted login with auth login-browser
  • Encrypted local persistence for stored auth, config, and command history
  • Explicit --yes guardrails for destructive or side-effectful operations

Quick Start

One-line install or update from GitHub:

curl -fsSL https://raw.githubusercontent.com/Ericsunsk/Pocketbase-CLI/main/scripts/install-global.sh | bash

The installer clones or updates the repo under ~/.local/share/pocketbase-cli, builds it, installs the global pocketbase-cli command, and prints a PATH hint when needed.

npm install
npm run build

node dist/bin.js config set base_url https://pb.example.com

printf 'Secret123\n' | node dist/bin.js auth login --password-stdin admin@example.com
node dist/bin.js --json info

Alternative authentication flow:

node dist/bin.js auth login-browser
# headless hosts:
node dist/bin.js auth login-browser --no-open

Base URL resolution priority is: command-line arguments > persisted config set ... values > POCKETBASE_CLI_BASE_URL > stored auth session target.

Only the remote base URL is read from the environment. Login identity and password must come from command arguments, --password-stdin, or the local browser form.

By default the CLI stores config, history, and auth state under ~/.cache/pocketbase-cli. The persisted session file is encrypted at rest and uses an adjacent .key file.

Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages