Skip to content

nbckk9/fayastore-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fayastore CLI

A command-line interface and terminal user interface (TUI) tool to query and manage Firestore data.

Features

  • CLI Commands: Full CRUD operations, queries with filters, batch operations, and export/import
  • Interactive TUI: Browse collections, view documents, and manage data visually
  • Flexible Authentication: Support for both service account JSON files and Application Default Credentials

Installation

# Using UV (recommended)
uv pip install -e .

# Or using pip
pip install -e .

Configuration

Configure your Firestore connection:

# Using service account
fayastore config --project my-project --credentials /path/to/service-account.json

# Using Application Default Credentials (gcloud auth)
fayastore config --project my-project

Or set environment variables:

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
export FIRESTORE_PROJECT=my-project

CLI Usage

Get a document

fayastore get users/abc123

List documents in a collection

fayastore list users --limit 10

Create a document

fayastore create users --id abc123 --data '{"name": "John", "age": 30}'

Update a document

fayastore update users/abc123 --data '{"age": 31}'

Delete a document

fayastore delete users/abc123

Query with filters

fayastore query users --where "age>25" --where "status=active" --order "name:asc" --limit 10

Count documents

fayastore count users --where "status=active"

Export collection to JSON

fayastore export users -o users.json

Import JSON to collection

fayastore import users -i data.json

Batch operations

fayastore batch operations.json

TUI Mode

Launch the interactive terminal user interface:

fayastore tui

Keyboard Shortcuts

Key Action
q Quit
r Refresh
n New document
e Edit selected
d Delete selected
/ Search/filter
? Help

License

MIT

About

Custom Firestore CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages