add-config-option

star 285

Add a new configuration option to tedge_config. Use when adding a new setting to the thin-edge.io configuration in tedge.toml.

thin-edge By thin-edge schedule Updated 6/2/2026

name: add-config-option description: Add a new configuration option to tedge_config. Use when adding a new setting to the thin-edge.io configuration in tedge.toml.

Add Configuration Option

Steps

  1. Add field to define_tedge_config! macro in crates/common/tedge_config/src/tedge_toml/tedge_config.rs
  2. Choose appropriate type:
    • String — free-form text
    • AbsolutePath — filesystem path
    • ConnectUrl — URL with scheme
    • SecondsOrHumanTime — duration (e.g., 30s, 5m)
    • Custom types in crates/common/tedge_config/src/tedge_toml/models/
  3. Add #[tedge_config()] attributes:
    • default(value = "...") — default value
    • example = "..." — example for documentation
    • reader(...) — custom reader function
    • Other modifiers as needed
  4. Add doc comment above the field — this becomes user-facing help text in tedge config
  5. For custom types, add to crates/common/tedge_config/src/tedge_toml/models/
  6. Verify: Run cargo test -p tedge_config

Reference Files

Read these for patterns:

  • crates/common/tedge_config/src/tedge_toml/tedge_config.rs — the define_tedge_config! invocation with all existing options
  • crates/common/tedge_config/src/tedge_toml/models/ — custom configuration types
Install via CLI
npx skills add https://github.com/thin-edge/thin-edge.io --skill add-config-option
Repository Details
star Stars 285
call_split Forks 75
navigation Branch main
article Path SKILL.md
More from Creator