Documentation Index
Fetch the complete documentation index at: https://docs.spike.ac/llms.txt
Use this file to discover all available pages before exploring further.
The @spike-forms/cli package lets you manage forms, deploy configurations, and view submissions from your terminal.
Installation
npm install -g @spike-forms/cli
Authentication
Login to your Spike account:
This opens a browser for authentication and stores your credentials locally.
spike logout # Clear stored credentials
spike whoami # Show current user
Commands
# List all forms
spike forms list
# Create a new form
spike forms create "Contact Form"
# Get form details
spike forms get <form-id>
# Delete a form
spike forms delete <form-id>
Submissions
# List recent submissions
spike submissions list <form-id>
# Get submission details
spike submissions get <form-id> <submission-id>
# Export submissions to CSV
spike submissions export <form-id> --format csv > submissions.csv
Deploy
Deploy form configurations from a spike.json file:
spike.json
Define forms and settings in a configuration file:
{
"forms": {
"contact": {
"name": "Contact Form",
"notificationEmail": "team@example.com",
"redirectUrl": "/thanks",
"allowedDomains": ["example.com"],
"webhookUrl": "https://api.example.com/webhook",
"integrations": {
"slack": {
"webhookUrl": "$SLACK_WEBHOOK_URL"
}
}
},
"newsletter": {
"name": "Newsletter Signup",
"integrations": {
"mailchimp": {
"apiKey": "$MAILCHIMP_API_KEY",
"listId": "abc123"
}
}
}
}
}
Environment Variables
Use $VAR_NAME syntax for secrets:
{
"forms": {
"contact": {
"webhookUrl": "$WEBHOOK_URL"
}
}
}
Set variables in your environment or .env file.
Initialize Project
Create a new spike.json:
This creates a starter configuration file in your project.
Global Options
--help # Show help
--version # Show version
--json # Output as JSON
--quiet # Suppress output
Examples
CI/CD Deployment
.github/workflows/deploy.yml
- name: Deploy Spike Forms
env:
SPIKE_API_KEY: ${{ secrets.SPIKE_API_KEY }}
run: npx @spike-forms/cli deploy
Export to Google Sheets
spike submissions export FORM_ID --format csv | \
gcloud sheets import --spreadsheet-id=SHEET_ID