Skip to main content
Fireconduit

CLI Reference

Command-line tools for Fireconduit setup and schema generation

The Fireconduit CLI helps you deploy required infrastructure and generate schema configurations from your Firestore collections.

Installation

The CLI is available as an npm package. Run commands directly with npx:

npx fireconduit <command>

Or install globally:

npm install -g fireconduit

Commands

init

Interactive setup wizard that generates Terraform configuration files for deploying Fireconduit infrastructure to your GCP project.

npx fireconduit init

The wizard will:

  1. Check prerequisites (Terraform, gcloud CLI, authentication)
  2. Prompt for your GCP project ID
  3. Prompt for your preferred region
  4. Prompt for your Fireconduit API key (from the dashboard)
  5. Generate Terraform files in a ./.fireconduit directory

After running init, follow the next steps to deploy:

cd .fireconduit
terraform init
terraform apply

schema

Generate a schema configuration by sampling documents from a Firestore collection. This is useful for understanding your data structure before creating a pipeline.

npx fireconduit schema -c <collection> [options]

Options:

OptionShortDescriptionDefault
--collection-cFirestore collection path (required)
--sample-sNumber of documents to sample100
--output-oOutput file pathstdout
--format-fOutput format (json or yaml)json
--project-pGCP project IDADC default

Examples:

# Sample 100 documents from 'users' collection, output to stdout
npx fireconduit schema -c users

# Sample 500 documents and save to file
npx fireconduit schema -c orders -s 500 -o schema.json

# Output as YAML
npx fireconduit schema -c products -f yaml -o schema.yaml

# Use a specific GCP project
npx fireconduit schema -c users -p my-project-123

The generated schema shows all fields found across sampled documents, their inferred BigQuery types, and frequency information.

validate

Validate a schema configuration file against the Fireconduit schema spec.

npx fireconduit validate <file>

Example:

npx fireconduit validate schema.json

This checks that your schema file is properly formatted and can be used with Fireconduit pipelines.

doctor

Diagnose common setup issues. Run this if you’re having problems with your Fireconduit deployment.

npx fireconduit doctor

The doctor command checks:

  • Terraform installation
  • gcloud CLI installation and authentication
  • Application Default Credentials (ADC)
  • Current GCP project configuration
  • Existing Fireconduit setup (terraform.tfvars, deployed function)
  • API key validity

Prerequisites

The CLI requires:

  • Node.js 18+
  • Terraform — for the init command
  • gcloud CLI — authenticated with your GCP account
  • Application Default Credentials — run gcloud auth application-default login

Authentication

The CLI uses Google Cloud Application Default Credentials (ADC) to connect to Firestore. Before running commands that access Firestore (like schema), ensure you’re authenticated:

# Login to gcloud
gcloud auth login

# Set up ADC
gcloud auth application-default login

# Optionally set default project
gcloud config set project my-project-123