@crablr/cli
v0.3.4
Published
CLI tool for the Crablr platform that enables real-time payment monitoring and webhook forwarding for merchants and developers.
Maintainers
Readme
@crablr/cli
A command-line interface for the Crablr payment platform that enables real-time payment monitoring and webhook forwarding for merchants and developers.
Installation
npm install -g @crablr/cliQuick Start
Authenticate with your Crablr account:
crablr loginListen for payments:
crablr listen
Commands
Authentication
crablr login
Authenticate with the Crablr platform using your account credentials. Opens a browser link for secure authentication.
crablr loginPayment Monitoring
crablr listen [forwardUrl]
Listen for payment events from your shop. Optionally forward webhook events to a local development server.
# Listen only (display payments in terminal)
crablr listen
# Listen and forward to local server
crablr listen http://localhost:3000/webhook
# Listen for a specific shop (overrides default)
crablr listen --shop 1234567890abcdef
# Listen and forward for a specific shop
crablr listen http://localhost:3000/webhook --shop 1234567890abcdefOptions:
-s, --shop <shopId>- Specify which shop to listen for payments from (overrides default shop)
When listening, the CLI will display:
- Webhook secret for verification
- Forward URL (if specified)
- Real-time payment notifications with timestamps
- HTTP response status for forwarded requests
Other Commands
For a complete list of available commands and options, run:
crablr helpDevelopment
Local Development Server Integration
Perfect for local development workflows:
# Start your local server
npm run dev # Your app running on http://localhost:3000
# In another terminal, forward Crablr webhooks
crablr listen http://localhost:3000/api/webhooks/crablrTesting Webhooks
- Set up your local webhook endpoint
- Start the CLI with forwarding:
crablr listen http://localhost:3000/webhook - Make a test payment through your Crablr shop
- Verify the webhook is received and processed correctly
Troubleshooting
Common Issues
"No shop specified" error:
# Set a default shop
crablr shop:list
crablr shop:use <shopId>
# Or specify shop explicitly
crablr listen --shop <shopId>Authentication errors:
# Re-authenticate
crablr logout
crablr loginWebhook forwarding timeouts:
- Ensure your local server is running and accessible
- Check that the forward URL is correct
- Verify your endpoint responds within 10 seconds
Connection issues:
- Check your internet connection
- Verify the Crablr API service status
- Try re-authenticating
Getting Help
- Support Email: [email protected]
- GitHub Issues: Report bugs and request features
Before Contacting Support
- Try running the command with verbose output if available
- Check if the issue persists across different shops
- Verify your network connection and firewall settings
- Ensure your local development server is accessible (for webhook forwarding issues)
License
ISC
