Skip to content

Artisan Commands

CommandDescription
huckle:listList all nodes
huckle:show {path}Show node details
huckle:exportExport as environment variables
huckle:syncSync exports to .env file
huckle:lintValidate configuration
huckle:connect {path} {connection}Execute connection command
huckle:diff {env1} {env2}Compare environments
huckle:expiringList expiring nodes
huckle:hcl2json {input} [output]Convert HCL to JSON
huckle:json2hcl {input} [output]Convert JSON to HCL

List all nodes with their paths, environments, and tags:

Terminal window
php artisan huckle:list
# Filter by single environment
php artisan huckle:list --environment=production
# Filter by multiple environments (OR logic)
php artisan huckle:list --environment=local --environment=sandbox --environment=staging
# Filter by tag
php artisan huckle:list --tag=postgres

Display detailed information about a specific node:

Terminal window
php artisan huckle:show database.production.main
# Reveal sensitive values
php artisan huckle:show database.production.main --reveal

Export nodes as environment variables:

Terminal window
# Export specific node
php artisan huckle:export database.production.main
# Export all nodes
php artisan huckle:export --all

Sync exported values to your .env file:

Terminal window
php artisan huckle:sync
# Sync to specific file
php artisan huckle:sync --file=.env.production

Validate your nodes configuration:

Terminal window
php artisan huckle:lint
# With expiry and rotation checks
php artisan huckle:lint --check-expiry --check-rotation --check-permissions
# Show environment variables table
php artisan huckle:lint --table
# Filter table by partition/environment/provider/country
php artisan huckle:lint --table --partition=FI --environment=production
php artisan huckle:lint --table --provider=stripe --country=SE

Execute a connection command defined in a node:

Terminal window
php artisan huckle:connect database.production.main psql

Compare nodes between environments:

Terminal window
php artisan huckle:diff production staging

List nodes that are expiring soon:

Terminal window
# Default: 30 days
php artisan huckle:expiring
# Custom threshold
php artisan huckle:expiring --days=7

Convert HCL file to JSON:

Terminal window
# Output to stdout
php artisan huckle:hcl2json nodes.hcl
# Output to file
php artisan huckle:hcl2json nodes.hcl nodes.json

Convert JSON file to HCL:

Terminal window
# Output to stdout
php artisan huckle:json2hcl nodes.json
# Output to file
php artisan huckle:json2hcl nodes.json nodes.hcl