feat: enhance environment file management with gitignore-based discovery#2
Merged
aryasaatvik merged 3 commits intomainfrom Jun 11, 2025
Merged
feat: enhance environment file management with gitignore-based discovery#2aryasaatvik merged 3 commits intomainfrom
aryasaatvik merged 3 commits intomainfrom
Conversation
- Add intelligent environment file discovery based on .gitignore patterns - Support nested environment files in monorepos with recursive search - Include AI tool configurations (.claude/settings.local.json, .cursorrules, etc.) - Add flexible configuration options in .agentreerc and global config - Implement include/exclude patterns for fine-grained control - Maintain backward compatibility with legacy .env/.dev.vars copying - Add comprehensive test coverage for all new features - Create detailed documentation for environment configuration This enhancement makes agentree more intelligent about discovering and copying environment files, using .gitignore as the source of truth while supporting monorepo structures and AI tool configurations. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
…ging - Introduce a verbose flag to the create command for detailed logging during environment file discovery. - Update the EnvFileCopier to log discovered files and patterns from .gitignore. - Enhance user feedback with messages indicating the status of file discovery and copying processes. - Remove outdated test files and related code to streamline the codebase. This update improves the user experience by providing more visibility into the environment file management process.
- Update README to reflect intelligent environment file discovery based on .gitignore patterns. - Simplify and clarify the environment configuration guide, emphasizing support for monorepos and AI tool configurations. - Improve examples and best practices for using environment files and configurations. This update improves clarity and usability for users setting up their environment with agentree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR significantly enhances agentree's environment file management by implementing intelligent discovery based on
.gitignorepatterns. This addresses the need for better environment configuration support, especially for monorepos and AI tool configurations.Key Improvements
.gitignorepatterns as the source of truth for finding environment filespackages/*/.env).claude/settings.local.json,.cursorrules, and other AI configs.agentreercand global config for customizing behaviorHow It Works
.gitignorefiles in the repositoryConfiguration Example
Testing
All tests pass with comprehensive coverage:
Breaking Changes
None - the implementation maintains backward compatibility. If gitignore parsing fails or no files are discovered, it falls back to the legacy behavior of copying only
.envand.dev.vars.🤖 Generated with Claude Code