info
Display file status, verification details, and project information.
Synopsis
Section titled “Synopsis”kiln info [options]The info command provides diagnostic information about environment files, including file sizes, modification times, encryption status, and access verification.
Options
Section titled “Options”--file,-f: Show info for specific file (default: all configured files)--verify: Test decryption capability with current key
Examples
Section titled “Examples”All Files Overview
Section titled “All Files Overview”kiln info# default (.kiln.env): 2.34 KB, modified 2024-01-15 14:30:25# staging (staging.env): 1.87 KB, modified 2024-01-15 12:15:10# production (prod.env): 3.21 KB, modified 2024-01-14 16:45:30Specific File Information
Section titled “Specific File Information”kiln info --file production# production (prod.env): 3.21 KB, modified 2024-01-14 16:45:30With Verification
Section titled “With Verification”kiln info --verify# default (.kiln.env): 2.34 KB, modified 2024-01-15 14:30:25 (can decrypt)# staging (staging.env): 1.87 KB, modified 2024-01-15 12:15:10 (can decrypt)# production (prod.env): 3.21 KB, modified 2024-01-14 16:45:30 (cannot decrypt)Specific File with Verification
Section titled “Specific File with Verification”kiln info --file development --verify# development (dev.env): 1.45 KB, modified 2024-01-15 15:20:45 (can decrypt)Output Information
Section titled “Output Information”File Status Display
Section titled “File Status Display”Each file entry shows:
- File name: Logical name from configuration
- Physical path: Actual file location on disk
- File size: Size in KB with two decimal precision
- Modification time: Last modified timestamp in local time
- Verification status: Decryption capability (when
--verifyis used)
File States
Section titled “File States”File exists and accessible:
production (prod.env): 3.21 KB, modified 2024-01-14 16:45:30File not found:
staging (staging.env): file not found (will be created on first use)File exists but cannot decrypt:
production (prod.env): 3.21 KB, modified 2024-01-14 16:45:30 (cannot decrypt)File exists and can decrypt:
development (dev.env): 1.45 KB, modified 2024-01-15 15:20:45 (can decrypt)Verification Process
Section titled “Verification Process”Access Testing
Section titled “Access Testing”When --verify is enabled, the command:
- Attempts to decrypt each environment file
- Validates file format and parsing
- Reports success or failure for each file
- Does not display actual variable content
Error Conditions
Section titled “Error Conditions”- Cannot decrypt: Current key lacks access to the file
- Cannot load key: Private key file issues
- File corruption: Encrypted file is damaged or invalid format
- Configuration error: File not properly configured
Use Cases
Section titled “Use Cases”Project Health Check
Section titled “Project Health Check”# Quick overview of all environment fileskiln info# Verify all files are accessiblekiln info --verifyTroubleshooting Access Issues
Section titled “Troubleshooting Access Issues”# Check specific problematic filekiln info --file production --verify
# Compare accessible vs inaccessible fileskiln info --verify | grep "cannot decrypt"File Management
Section titled “File Management”# Check file sizes before operationskiln info | grep -E "\d+\.\d+ KB"
# Find recently modified fileskiln info | sort -k5,6Team Onboarding Verification
Section titled “Team Onboarding Verification”# New team member checks their accesskiln info --verify
# Verify access to specific environmentskiln info --file staging --verifykiln info --file production --verifyError Handling
Section titled “Error Handling”No Configuration File
Section titled “No Configuration File”kiln info# Error: configuration file 'kiln.toml' not found (use 'kiln init config' to create)Invalid File Configuration
Section titled “Invalid File Configuration”kiln info --file nonexistent# Error: configuration error: file 'nonexistent' not configured (check kiln.toml file definitions)Key Loading Issues
Section titled “Key Loading Issues”kiln info --verify# Error: cannot load identity from '~/.kiln/kiln.key': no such file or directoryPermission Problems
Section titled “Permission Problems”kiln info --file restricted# restricted (restricted.env): 1.23 KB, modified 2024-01-15 10:00:00 (cannot decrypt)Integration Patterns
Section titled “Integration Patterns”Health Check Scripts
Section titled “Health Check Scripts”#!/bin/bash# Validate environment access before deployment
required_envs=("staging" "production")failed=0
for env in "${required_envs[@]}"; do if kiln info --file "$env" --verify 2>/dev/null | grep -q "can decrypt"; then echo "✓ $env access verified" else echo "✗ $env access failed" failed=1 fidone
if [ $failed -eq 1 ]; then echo "Environment access validation failed" exit 1fiMonitoring Integration
Section titled “Monitoring Integration”# Generate metrics for monitoring systemkiln info --verify | while read line; do file=$(echo "$line" | cut -d'(' -f1 | tr -d ' ') if echo "$line" | grep -q "can decrypt"; then echo "kiln_file_accessible{file=\"$file\"} 1" else echo "kiln_file_accessible{file=\"$file\"} 0" fidoneCI/CD Pipeline Validation
Section titled “CI/CD Pipeline Validation”# Validate access in CI pipelineif ! kiln info --file production --verify >/dev/null 2>&1; then echo "ERROR: Cannot access production environment" echo "Check CI key configuration and access permissions" exit 1fiDocumentation Generation
Section titled “Documentation Generation”# Generate environment documentationecho "# Environment Files Status"echo "Generated on: $(date)"echo ""kiln info --verify | while read line; do echo "- $line"doneWorkflow Examples
Section titled “Workflow Examples”Daily Operations Check
Section titled “Daily Operations Check”# Morning environment health checkecho "Daily environment status check:"kiln info --verify
# Check for any issuesif kiln info --verify | grep -q "cannot decrypt"; then echo "⚠️ Access issues detected - check key configuration"fiPre-Deployment Validation
Section titled “Pre-Deployment Validation”# Validate access before deploymentdeployment_env="production"
echo "Validating $deployment_env environment..."if kiln info --file "$deployment_env" --verify | grep -q "can decrypt"; then echo "✓ $deployment_env access confirmed" # Proceed with deploymentelse echo "✗ Cannot access $deployment_env environment" echo "Check key configuration and access permissions" exit 1fiTeam Access Audit
Section titled “Team Access Audit”# Check which environments each team member can accessteam_keys=("alice.key" "bob.key" "charlie.key")environments=("development" "staging" "production")
echo "Team Access Matrix:"printf "%-12s" "Member"for env in "${environments[@]}"; do printf "%-12s" "$env"doneecho ""
for key in "${team_keys[@]}"; do member=$(basename "$key" .key) printf "%-12s" "$member"
for env in "${environments[@]}"; do if kiln info --file "$env" --verify --key "./keys/$key" 2>/dev/null | grep -q "can decrypt"; then printf "%-12s" "✓" else printf "%-12s" "✗" fi done echo ""doneFile Size Monitoring
Section titled “File Size Monitoring”# Monitor environment file sizesecho "Environment file sizes:"kiln info | grep -E "\d+\.\d+ KB" | while read line; do size=$(echo "$line" | grep -o '[0-9]\+\.[0-9]\+ KB') file=$(echo "$line" | cut -d'(' -f1 | tr -d ' ')
# Alert if file is unusually large (>10KB) if [ "$(echo "$size" | cut -d'.' -f1)" -gt 10 ]; then echo "⚠️ Large file detected: $file ($size)" else echo "✓ $file: $size" fidoneTroubleshooting Guide
Section titled “Troubleshooting Guide”Common Issues
Section titled “Common Issues”All files show “cannot decrypt”:
# Check key file exists and is readablels -la ~/.kiln/kiln.keykiln info --key ~/.kiln/kiln.key --verify
# Verify key formathead -n1 ~/.kiln/kiln.keySpecific file shows “cannot decrypt”:
# Check file access configurationgrep -A5 "\[files\.$filename\]" kiln.toml
# Verify you're in the allowed recipients listgrep -A10 "\[recipients\]" kiln.tomlFile shows “file not found”:
# Check file path configurationgrep "filename.*=" kiln.toml
# Create file if neededkiln set INITIAL_VAR "value" --file "$filename"Diagnostic Steps
Section titled “Diagnostic Steps”-
Check configuration:
Terminal window cat kiln.toml | grep -E "(recipients|files)" -
Verify key access:
Terminal window kiln info --verify 2>&1 | grep -E "(error|cannot)" -
Test specific operations:
Terminal window kiln export --file "$filename" >/dev/null -
Check file permissions:
Terminal window ls -la *.env
Performance Considerations
Section titled “Performance Considerations”File Scanning
Section titled “File Scanning”infocommand scans all configured files by default- Verification adds decryption overhead for each file
- Large files take longer to verify
Optimization Strategies
Section titled “Optimization Strategies”- Use
--fileto check specific files when troubleshooting - Avoid
--verifyin automated scripts unless necessary - Cache verification results for monitoring systems
Best Practices
Section titled “Best Practices”Regular Monitoring
Section titled “Regular Monitoring”- Include in daily routines to catch access issues early
- Monitor file sizes to detect configuration bloat
- Verify access after key rotations or team changes
- Document access patterns for audit purposes
Automation Integration
Section titled “Automation Integration”- Add to CI/CD pipelines for deployment validation
- Include in monitoring scripts for operational awareness
- Use in backup procedures to verify file integrity
- Integrate with alerting systems for access failures
Security Practices
Section titled “Security Practices”- Regular access verification ensures key validity
- Monitor unauthorized access attempts through failed verifications
- Track file modification patterns for security auditing
- Validate team access after organizational changes
Advanced Usage
Section titled “Advanced Usage”Custom Formatting
Section titled “Custom Formatting”# JSON output for programmatic usekiln info --verify | sed 's/: /":"/g' | sed 's/ (/","path":"/g' | sed 's/)/"/g'Automated Reporting
Section titled “Automated Reporting”# Generate weekly access report{ echo "Weekly Environment Access Report" echo "Generated: $(date)" echo "================================" kiln info --verifyIntegration with External Tools
Section titled “Integration with External Tools”# Prometheus metricskiln info | while read line; do file=$(echo "$line" | cut -d'(' -f1 | tr -d ' ') size_kb=$(echo "$line" | grep -o '[0-9]\+\.[0-9]\+') echo "kiln_file_size_kb{file=\"$file\"} $size_kb"done