-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Currently, many settings in Guppy need to be passed via command-line flags, which can be repetitive and cumbersome for users who frequently use the same settings. There's no way to persist user preferences or default configurations.
Problem
Users need to:
- Repeatedly type the same flags for common operations
- Remember various flag combinations for different scenarios
- Manually set up the same configuration across different environments
- Pass space DID and proof paths explicitly for each command
Proposed Solution
Add support for a configuration file (e.g., .guppy.yaml or .guppy.toml) that allows users to:
- Set default values for common flags
- Configure environment-specific settings
- Store frequently used space DIDs
- Define custom profiles for different use cases
Implementation Details
1. Configuration File Location
Primary locations (in order of precedence):
- Current directory:
./.guppy.yaml - User's home directory:
~/.guppy/config.yaml - System-wide:
/etc/guppy/config.yaml
2. Configuration Structure
# Example .guppy.yaml
default:
space: "did:key:default_space_did"
proof_path: "~/.guppy/proofs"
json_output: false
verbose: false
spaces:
production:
did: "did:key:prod_space_did"
proof_path: "/path/to/prod/proofs"
development:
did: "did:key:dev_space_did"
proof_path: "/path/to/dev/proofs"
upload:
default_shard_size: 1073741824 # 1GB
wrap_single_files: true
include_hidden: false
profiles:
prod:
space: "production"
verbose: true
json_output: true
dev:
space: "development"
verbose: true
wrap_single_files: false3. Command Line Integration
# Use specific profile
guppy --profile prod up file.txt
# Override config settings
guppy --space different:did up --no-wrap file.txt4. Configuration Management Commands
Add new commands for managing configuration:
# Initialize config file
guppy config init
# Set a configuration value
guppy config set upload.default_shard_size 2GB
# Get a configuration value
guppy config get upload.default_shard_size
# List all settings
guppy config list
# Add a new profile
guppy config profile create devMetadata
Metadata
Assignees
Labels
No labels