Skip to content

Project enhancements!

Choose a tag to compare

@natanmedeiros natanmedeiros released this 18 Jan 00:11
· 15 commits to main since this release
780b98b

[1.1.0] - 2026-01-17

⚠️ Breaking Changes

Default File Paths Changed

Config and cache files now use a directory structure:

Config path:

  • Old: ~/.dya.yaml
  • New: ~/.dya/dya.yaml

Cache path:

  • Old: ~/.dya.json
  • New: ~/.dya/dya.json

If you have existing files, move them manually to the new directory or they will be recreated.

Verbosity Configuration Changed

The verbose boolean config has been replaced with verbosity string:

  • Old: verbose: true or verbose: false
  • New: verbosity: silent|default|verbose|trace
# Before
config:
  verbose: true

# After
config:
  verbosity: verbose

Backward compatibility: verbose: true → verbosity: verbose, but the validator will warn about deprecation.

✨ New Features

Cache Encryption

Cache files are now encrypted using AES-256-GCM with a machine-specific key:

  • Data is tied to the machine where cache was created
  • Automatic migration: plain JSON is encrypted on first save
  • Export with --dya-dump for backup or migration

Verbosity Levels

Four verbosity levels for different use cases:

Level Description
silent No "Running:" hint, no dividers — minimal output
default Standard output with "Running:" and dividers
verbose All default + variable resolution logs, cache modifications
trace All verbose + method timing with input/output (buffered in interactive mode)

Trace Mode logs method timing and input/output for:

  • Startup: ConfigLoader.load, ConfigValidator.validate, CacheManager.load
  • Execution: DataResolver.resolve_one, DataResolver._execute_dynamic_source, VariableResolver.resolve_app_vars
config:
  verbosity: trace  # For debugging

Interactive Mode Cache Management

Management flags now work in interactive mode:

dya> --dya-clear-cache
dya> --dya-set-locals key value
dya> --dya-dump

Note: --dya-config and --dya-cache are NOT supported in interactive mode.

Indexed Access for Dicts and Dynamic Dicts

Direct position selection in data sources using bracket syntax:

# Default (position 0)
command: echo $${db_servers.host}

# Explicit index access
command: echo $${db_servers[0].host} $${db_servers[1].host} $${db_servers[2].host}

Access any position in your dict/dynamic_dict data directly without list mode selection.

New Helper System

Completely redesigned help output with two modes:

  • Auto Helper (helper_type: auto): Structured format with Description, Usage, Args, and Options/Subcommands sections
  • Custom Helper (helper_type: custom): Raw concatenated helper text for custom formatting

Dynamic Usage Display: Usage section now shows the full matched command path with optional args and subcommands in bracket notation:

deep-cmd [-v | --verbose | -c | --config] [level1 [-f | --force] | status [-a | --all]]

Array Aliases for Arguments

Define multiple aliases for the same argument:

args:
  - alias: ["-o ${file}", "--output ${file}"]
    command: -o ${file}
    helper: Output file path
  - alias: ["-v", "--verbose"]
    command: --verbose
    helper: Verbose mode

Both -o and --output trigger the same argument. Displayed as -o, --output ${file} in help.

🔧 Improvements

Enhanced Validator

  • Deprecated Config Detection: Warns about old verbose: true/false usage
  • Variable Reference Validation: Checks all dict/dynamic_dict variables are defined
  • Position Validation: Validates indexed access syntax $${source[N].key}
  • Key Validation: Ensures referenced keys exist in data sources
  • Array Alias Validation: Verifies consistent variable structure across alias arrays

📚 Documentation