Skip to content

Add per-project configuration file support#38

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-local-yolo-configuration
Draft

Add per-project configuration file support#38
Copilot wants to merge 4 commits intomainfrom
copilot/add-local-yolo-configuration

Conversation

Copy link

Copilot AI commented Feb 5, 2026

Adds .git/yolo/config for per-project default options, primarily to avoid repeating volume mounts and other podman options.

Implementation

  • Config location: .git/yolo/config (survives git clean, shared across worktrees)
  • Format: Key=value with array support for multiple entries
  • Supported keys:
    • PODMAN_VOLUME - volume mounts
    • PODMAN_OPTION - arbitrary podman flags
    • CLAUDE_ARG - arguments passed to claude
    • ANONYMIZED_PATHS, USE_NVIDIA, WORKTREE_MODE - default flags
  • Override behavior: CLI args always take precedence; --no-config bypasses entirely

Example

# .git/yolo/config
PODMAN_VOLUME=~/datasets:/datasets:Z
PODMAN_VOLUME=~/models:/models:Z
PODMAN_OPTION=--env=DEBUG=1
CLAUDE_ARG=--verbose
USE_NVIDIA=1

Then yolo automatically applies these options, while yolo --no-config -v /custom:/custom:Z ignores config and uses CLI args only.

Technical Notes

  • find_git_dir() traverses up to find .git directory, handles worktree .git files pointing to .git/worktrees/<name>
  • Config merge happens after -- separator logic to correctly route podman vs claude args
  • Tilde expansion via bash parameter substitution
Original prompt

This section details on the original issue you should resolve

<issue_title>Allow for local to the project yolo configuration</issue_title>
<issue_description>I think the safest place is smth like .git/yolo/config.whatever so does not get destroyed by git clean and could be found in worktrees since they would all lead to this .git. Primarily it is to

  • specify CLI options to reuse such as -v bind mounts for podman. Per project I want to expose additional mount points

but likely we could expand to other useful per project options, and potentially to be passed inside to claude itself, not podman -- so we need to separate two levels there.</issue_description>

<agent_instructions>figure out what would be the best way/format for that config . </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 5, 2026 14:06
- Add .git/yolo/config file support for per-project settings
- Support PODMAN_VOLUME, PODMAN_OPTION, CLAUDE_ARG configuration keys
- Support default flags: ANONYMIZED_PATHS, USE_NVIDIA, WORKTREE_MODE
- Add --no-config flag to ignore config file
- Add config.example file with documentation
- Update README.md with configuration instructions
- Config file location in .git/yolo/ survives git clean and works with worktrees

Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
- Separate config podman args from CLI args before separator logic
- Append config claude args instead of overwriting them
- Ensure config options are passed to podman, not claude
- Fix handling when no -- separator is present

Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
- Add information about .git/yolo/config in setup output
- Guide users to copy config.example for project defaults

Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Copilot AI changed the title [WIP] Add configuration for local yolo settings Add per-project configuration file support Feb 5, 2026
Copilot AI requested a review from yarikoptic February 5, 2026 14:12
@yarikoptic
Copy link
Member

I think this is overcomplicated. Couldn't it be just some bash file to source which would define those options as e.g. bash arrays to be expanded in the command line invocation??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for local to the project yolo configuration

2 participants