CLI for setting up Fireconduit in your GCP project
npm install fireconduitCLI for setting up Fireconduit in your GCP project. Stream your Firestore data to BigQuery in real-time.
``bashRun directly with npx (recommended)
npx fireconduit
Prerequisites
- 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
`bash
1. Run the setup wizard
npx fireconduit init2. Follow the prompts to configure your project
3. Deploy the infrastructure
cd fireconduit
terraform init
terraform apply
`Commands
$3
Interactive setup wizard that generates Terraform configuration for deploying Fireconduit to your GCP project.
`bash
npx fireconduit init
`The 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/$3
Generate a BigQuery schema configuration by sampling documents from a Firestore collection.
`bash
npx fireconduit schema -c [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:
`bash
Sample 100 documents and print schema to stdout
npx fireconduit schema -c usersSample 500 documents and save as YAML
npx fireconduit schema -c orders -s 500 -f yaml -o schema.yamlUse a specific GCP project
npx fireconduit schema -c products -p my-project-id -o schema.json
`$3
Validate a schema configuration file.
`bash
npx fireconduit validate
`Example:
`bash
npx fireconduit validate schema.json
`$3
Diagnose common setup issues and verify your configuration.
`bash
npx fireconduit doctor
`The 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
$3
| Variable | Description | Default |
|----------|-------------|---------|
|
FIRECONDUIT_API_URL | Fireconduit API endpoint | https://api.fireconduit.dev |
| GOOGLE_APPLICATION_CREDENTIALS | Path to GCP service account key | ADC |$3
After running
init, the following files are created in ./fireconduit/:`
fireconduit/
├── main.tf # Terraform configuration
├── terraform.tfvars # Your configuration values
└── variables.tf # Variable definitions
`Authentication
The CLI uses Google Cloud Application Default Credentials (ADC). Authenticate using one of these methods:
`bash
Option 1: User credentials (development)
gcloud auth application-default loginOption 2: Service account (CI/CD)
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
`Troubleshooting
$3
Check your internet connection and verify the API endpoint is accessible.
$3
Verify your API key in the Fireconduit dashboard at Settings > API Key.
$3
Ensure your GCP account has the required permissions:
-
roles/datastore.viewer (for schema generation)
- roles/editor` or equivalent (for infrastructure deployment)Install Terraform from terraform.io.
Apache-2.0