Skip to content

Ericsunsk/Pocketbase-CLI

Repository files navigation

PocketBase

PocketBase CLI

Remote-first command-line client for deployed PocketBase instances.

Node.js 20+ Latest Release MIT License GitHub Stars

English  |  简体中文


Features

  • Remote-only — manage deployed PocketBase over its HTTP API, no local binary required
  • Structured output — stable --json envelope with meta, result, error, http, pagination
  • Agent-friendly — machine-readable schema --json for LLM agents and tool integrations
  • Browser login — local loopback form via auth login, with --no-open for headless environments
  • Encrypted state — auth tokens, config, and command history encrypted at rest
  • Safety rails — destructive operations require explicit --yes confirmation

Install

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

Requires Node.js 20+, git, and npm. Installs the global pocketbase-cli command.

Other installation methods

From source:

git clone https://github.com/Ericsunsk/Pocketbase-CLI.git
cd Pocketbase-CLI
npm install && npm run build

Uninstall:

npm uninstall -g pocketbase-cli --prefix "$(npm prefix -g)" && rm -rf ~/.local/share/pocketbase-cli ~/.cache/pocketbase-cli

Quick Start

# Connect to your PocketBase instance
pocketbase-cli config set base_url https://pb.example.com

# Authenticate (opens browser login form)
pocketbase-cli auth login

# Verify connection
pocketbase-cli preflight --require-auth

# Start working
pocketbase-cli --json info
pocketbase-cli records list users --all
pocketbase-cli collections list

Commands

Group Subcommands
auth login logout status whoami refresh
collections list get create update ensure delete truncate import scaffolds
records list get create update delete find upsert delete-by-filter + auth flows
files token url
backups list create upload delete download restore
settings get patch test-s3 test-email apple-client-secret
logs list get stats
crons list run
batch run
raw <METHOD> <PATH> with optional --with-auth
utilities info schema preflight config history undo redo repl

Documentation

English Guide Full usage and configuration reference
中文指南 完整使用和配置参考
Features Feature and behavior reference
Development Contributor and build guide
Changelog Release notes

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages