Repository navigation
Releases
v0.1.1
fsq is a command line client for Google Firestore, built on the firestore crate: a SQL REPL with tables, query plans and index statements, and a scripting mode with JSON output. SQL needs a database of the Firestore Enterprise edition; \l, \d, SHOW INDEXES and the index commands work on both editions.
- SQL REPL with highlighting, completion of collections and fields, statements across several lines and a history. Results are shown as tables,
\xexpands each document into a block, and\x fullshows the path, type and whole value of every field, as\x full Ndoes for one row; EXPLAINandEXPLAIN ANALYZEdraw the query plan as a tree and warn when a query reads every document of the collection;CREATE INDEX,DROP INDEX,ALTER COLLECTIONandSHOW INDEXES, waiting for an index build with a spinner;fsq index plan,sync,export,list,createanddeletework on afirestore.indexes.json, the file of the Firebase CLI.planshows what a sync would change, and--pruneremoves what the file does not declare;fsq codegenand\genshow the code of the fluent API of the firestore crate for aSELECT, with a row struct typed from sample rows;\llists the collections, and\dlists the field paths of a collection with their types, how often they are present and an example value;- Export and import of documents as JSON lines, in an encoding that reads back to the same Firestore types;
- Scripting with
-eand-f, and--format jsonorjsonloutput for other tools.
Install on macOS, Linux and FreeBSD:
curl -fsSL https://raw.githubusercontent.com/abdolence/firestore-cli-rs/master/install.sh | shOn Windows (PowerShell):
irm https://raw.githubusercontent.com/abdolence/firestore-cli-rs/master/install.ps1 | iexOr from crates.io, which installs the binary fsq:
cargo install firestore-cliThe archives below are built for macOS, Linux (glibc on x86_64 and aarch64, static musl on arm), FreeBSD and Windows. The scripts verify each against the SHA-256 digest GitHub records for it.
Connect with fsq -p my-project -d my-database. fsq uses Application Default Credentials, so run gcloud auth application-default login first. See the README for the rest.
Full Changelog: https://github.com/abdolence/firestore-cli-rs/commits/v0.1.1