Manage component updates and additions with preconfigured default answers.
When working with copier-based components, you often need to provide the same answers repeatedly. This feature provides three ways to streamline this:
- CLI
--dataarguments: Pass answers directly on the command line - Data file: Store default answers in a YAML file (follows copier's
data_fileconvention) - Automatic discovery: Data files are automatically discovered in priority order
Use dr component add to add a component repository to your application. This will launch an interactive wizard unless you provide answers via CLI arguments or a data file.
To add a component with specific answers:
dr component add https://github.com/datarobot-community/af-component-agent.git \
--data base_answers_file=.datarobot/answers/base.yml \
--data llm_answers_file=.datarobot/answers/llm-llm.yml \
--data use_low_code_interface=falseTo add a component using a specific data file:
dr component add https://github.com/datarobot-community/af-component-agent.git \
--data-file .datarobot/.copier-answers-defaults.yaml
### Post-add environment validation
After the CLI adds a component, it validates your `.env` file.
- If validation passes, the command continues.
- If validation fails, the CLI launches `dr dotenv edit` so you can add required variables.
- If the edit flow fails or you exit early, the component is still added and the CLI prints a warning.
This behavior helps keep your application configuration in sync when a new component introduces new required environment variables.Update a component with specific answers:
dr component update .datarobot/answers/agent-writer_agent.yml \
--data base_answers_file=.datarobot/answers/base.yml \
--data llm_answers_file=.datarobot/answers/llm-llm.yml \
--data use_low_code_interface=falseUpdate using a specific data file:
dr component update .datarobot/answers/agent-writer_agent.yml \
--data-file my-custom-defaults.yamlThis is equivalent to the copier command:
copier update -a .datarobot/answers/agent-writer_agent.yml \
--data base_answers_file=.datarobot/answers/base.yml \
--data llm_answers_file=.datarobot/answers/llm-llm.yml \
--data use_low_code_interface=falseBy default, python warnings emitted by copier are suppressed.
You can use --verbose or --debug flags to show them.
Following copier's data_file convention, the default filename is .copier-answers-defaults.yaml.
Discovery priority order:
- Explicit path via
--data-fileflag (highest priority) - Repository root:
.datarobot/.copier-answers-defaults.yaml - User config directory:
~/.config/datarobot/.copier-answers-defaults.yaml - Legacy location:
~/.config/datarobot/component-defaults.yaml(backward compatibility)
defaults:
https://github.com/datarobot-community/af-component-agent.git:
base_answers_file: .datarobot/answers/base.yml
llm_answers_file: .datarobot/answers/llm-llm.yml
use_low_code_interface: false-
When you run
dr component addordr component update, the CLI:- Reads the copier answers file to determine the component's repository URL
- Looks up defaults for that repository in
component-defaults.yaml - Applies those defaults automatically
-
CLI
--dataarguments always take precedence over configured defaults -
Any questions not covered by defaults or CLI arguments will be prompted interactively (unless you use copier's
-Aflag, which is included indr component update)
For team-wide defaults (committed to the repository):
Create .datarobot/.copier-answers-defaults.yaml in your repository root:
defaults:
https://github.com/datarobot-community/af-component-agent.git:
base_answers_file: .datarobot/answers/base.yml
llm_answers_file: .datarobot/answers/llm-llm.yml
use_low_code_interface: falseFor personal defaults (not committed):
Create ~/.config/datarobot/.copier-answers-defaults.yaml:
defaults:
https://github.com/datarobot-community/af-component-agent.git:
agent_template_framework: langgraphWith the repository data file shown above, running:
dr component add https://github.com/datarobot-community/af-component-agent.gitIs equivalent to:
dr component add https://github.com/datarobot-community/af-component-agent.git \
--data base_answers_file=.datarobot/answers/base.yml \
--data llm_answers_file=.datarobot/answers/llm-llm.yml \
--data use_low_code_interface=falseIf you want to override a default:
dr component add https://github.com/datarobot-community/af-component-agent.git \
--data use_low_code_interface=trueThis will use the configured defaults for base_answers_file and llm_answers_file, but override use_low_code_interface to true.
You can also use a different data file temporarily:
dr component add https://github.com/datarobot-community/af-component-agent.git \
--data-file /path/to/custom-defaults.yaml- Team consistency—repository-level defaults keep answers consistent across team members.
- Speed—skip repetitive prompts for common answers.
- Flexibility—override defaults per command.
- Personal customization—use local defaults without committing them.
- Compatibility—follows copier's
data_fileconvention. - Version control friendly—commit repository defaults and keep personal defaults local.
The data file and --data arguments support all copier question types:
- Strings:
key: valueor--data key=value - Booleans:
key: trueor--data use_feature=false - Integers:
key: 42or--data count=42 - Floats:
key: 3.14or--data height=1.83 - Lists (for multiselect):
key: [item1, item2]or--data items=[1, 2, 3] - Objects/Maps:
key: {nested: value}or--data config={key: value} - Null:
key: nullor--data optional=null - YAML/JSON complex types: Any valid YAML structure in the data file
The data file uses standard YAML syntax. CLI --data arguments are parsed according to the question's type defined in the copier template.