fireconduit
v0.2.4
Published
CLI for setting up Fireconduit in your GCP project
Maintainers
Readme
Fireconduit CLI
CLI for setting up Fireconduit in your GCP project. Stream your Firestore data to BigQuery in real-time.
Installation
# Run directly with npx (recommended)
npx fireconduit <command>
# Or install globally
npm install -g fireconduitPrerequisites
- Node.js 22 or later
- gcloud CLI installed and authenticated
- Terraform 1.0+ (for infrastructure deployment)
- A GCP project with Firestore enabled
- A Fireconduit API key from fireconduit.dev
Quick Start
# 1. Run the setup wizard
npx fireconduit init
# 2. Follow the prompts to configure your project
# 3. Deploy the infrastructure
cd fireconduit
terraform init
terraform applyCommands
init
Interactive setup wizard that generates Terraform configuration for deploying Fireconduit to your GCP project.
npx fireconduit initThe wizard will:
- Check prerequisites (Terraform, gcloud CLI, authentication)
- Prompt for your GCP project ID and region
- Validate your Fireconduit API key
- Generate Terraform configuration files in
./fireconduit/
schema
Generate a BigQuery schema configuration by sampling documents from a Firestore collection.
npx fireconduit schema -c <collection> [options]Options:
| Option | Short | Description | Default |
|--------|-------|-------------|---------|
| --collection | -c | Firestore collection path (required) | - |
| --sample | -s | Number of documents to sample | 100 |
| --output | -o | Output file path | stdout |
| --format | -f | Output format (json or yaml) | json |
| --project | -p | GCP project ID | ADC default |
Examples:
# Sample 100 documents and print schema to stdout
npx fireconduit schema -c users
# Sample 500 documents and save as YAML
npx fireconduit schema -c orders -s 500 -f yaml -o schema.yaml
# Use a specific GCP project
npx fireconduit schema -c products -p my-project-id -o schema.jsonvalidate
Validate a schema configuration file.
npx fireconduit validate <file>Example:
npx fireconduit validate schema.jsondoctor
Diagnose common setup issues and verify your configuration.
npx fireconduit doctorThe doctor command checks:
- Terraform installation
- gcloud CLI installation and authentication
- Application Default Credentials (ADC)
- GCP project configuration
- Fireconduit setup (terraform.tfvars, API key validity)
- Deployed function status (if applicable)
Configuration
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| FIRECONDUIT_API_URL | Fireconduit API endpoint | https://api.fireconduit.dev |
| GOOGLE_APPLICATION_CREDENTIALS | Path to GCP service account key | ADC |
Generated Files
After running init, the following files are created in ./fireconduit/:
fireconduit/
├── main.tf # Terraform configuration
├── terraform.tfvars # Your configuration values
└── variables.tf # Variable definitionsAuthentication
The CLI uses Google Cloud Application Default Credentials (ADC). Authenticate using one of these methods:
# Option 1: User credentials (development)
gcloud auth application-default login
# Option 2: Service account (CI/CD)
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.jsonTroubleshooting
"Could not connect to Fireconduit API"
Check your internet connection and verify the API endpoint is accessible.
"Invalid API key"
Verify your API key in the Fireconduit dashboard at Settings > API Key.
"Permission denied" errors
Ensure your GCP account has the required permissions:
roles/datastore.viewer(for schema generation)roles/editoror equivalent (for infrastructure deployment)
"Terraform not found"
Install Terraform from terraform.io.
License
Apache-2.0
