Skip to content

Add configuration file support (.bushelrc) for Bushel demoΒ #29

@leogdion

Description

@leogdion

Overview

Add support for a configuration file to avoid repeating command-line flags and manage multiple environments.

Proposed Feature

Configuration File Format

# .bushelrc (in project root or ~/.bushelrc)
[cloudkit]
container_id = "iCloud.com.brightdigit.Bushel"
key_id = "YOUR_KEY_ID"
key_file = "~/.cloudkit/bushel-private-key.pem"
environment = "development"  # or "production"

[sync]
include_betas = true
include_apple_wiki = true
dry_run = false
verbose = false

[export]
pretty_print = true
signed_only = false

Implementation

  • Use a TOML/JSON configuration parser
  • Search order: ./bushelrc β†’ ~/.bushelrc β†’ command-line flags
  • Command-line flags override config file values
  • Add --config flag to specify custom config path

Benefits

  • Easier setup for new users
  • Environment-specific configurations (dev/prod)
  • No need to remember all flags
  • Credential management in one place

Example Usage

# Create config file once
cat > .bushelrc <<EOF
[cloudkit]
container_id = "iCloud.com.brightdigit.Bushel"
key_id = "YOUR_KEY_ID"
key_file = "./private-key.pem"
EOF

# Then simple commands
bushel-images sync          # Uses .bushelrc
bushel-images sync --verbose  # Override verbose setting

Security Note

  • Add .bushelrc to .gitignore
  • Document security best practices
  • Consider environment variable expansion in config

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions