{"id":27917352,"url":"https://github.com/trapcodeio/envfinder","last_synced_at":"2026-03-03T14:37:33.647Z","repository":{"id":284909418,"uuid":"956452622","full_name":"trapcodeio/envfinder","owner":"trapcodeio","description":"Recursive env finder built by Claude Ai","archived":false,"fork":false,"pushed_at":"2025-03-28T09:38:05.000Z","size":5,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T07:12:48.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trapcodeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-28T09:27:01.000Z","updated_at":"2025-03-28T11:18:03.000Z","dependencies_parsed_at":"2025-03-28T10:45:02.585Z","dependency_job_id":null,"html_url":"https://github.com/trapcodeio/envfinder","commit_stats":null,"previous_names":["trapcodeio/envfinder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fenvfinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fenvfinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fenvfinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fenvfinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapcodeio","download_url":"https://codeload.github.com/trapcodeio/envfinder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252730691,"owners_count":21795449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-06T17:05:21.196Z","updated_at":"2026-03-03T14:37:28.600Z","avatar_url":"https://github.com/trapcodeio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EnvFinder 🔍\n\nA powerful Go utility that locates and collects `.env` files while preserving directory structures.\n\n## Why?\nNeeded to back up all my `.env` files from various projects. I wanted a tool that could recursively search through directories, find all `.env` files, and copy them to a backup location while maintaining the original directory structure.\nIn order to be fast I consulted my code buddy Claude AI (Claude 3.7 Sonnet) to help me build this tool.\n\n**FIST COMMIT** is the original code written by Claude AI.\n\n**Claude Chat Link**: [Claude Chat - Golang script to find .env files](https://claude.ai/share/6df512ca-ce7b-49ff-818b-ad345ef03d0f)\n\n## 🌟 Features\n\n- **Recursive Search**: Thoroughly scans directories and subdirectories\n- **Smart Exclusions**: Automatically skips common directories like `node_modules`, `.git`, etc.\n- **Path Preservation**: Maintains original directory structure when copying files\n- **Comprehensive Reporting**: Provides detailed output of found and copied files\n\n## 🚀 Installation\n\n```bash\n# Clone the repository (if using git)\ngit clone https://github.com/trapcodeio/envfinder.git\ncd envfinder\n\n# Build the executable\ngo build -o envfinder envfinder.go\n```\n\n## 📋 Usage\n\n```bash\n# Basic usage (searches current directory, copies to ./envs)\n./envfinder\n\n# Search a specific directory\n./envfinder -path /path/to/project\n\n# Specify a custom output directory\n./envfinder -output /path/to/backup/envs\n\n# Combine options\n./envfinder -path /path/to/project -output /path/to/backup/envs\n```\n\n## 🔍 How It Works\n\nEnvFinder walks through your specified directory tree, looking for files that match `.env*` patterns (including variants like `.env.local` or `.env.production`).\n\nWhen a matching file is found:\n1. The tool records its location\n2. Creates a mirrored directory structure in the output folder\n3. Copies the file to its corresponding location\n4. Preserves the original file permissions\n\n### Example\n\nIf EnvFinder finds a file at:\n```\n/home/user/projects/awesome-app/backend/config/.env.production\n```\n\nIt will copy it to:\n```\n./envs/home/user/projects/awesome-app/backend/config/.env.production\n```\n\n## 🛡️ Excluded Directories\n\nEnvFinder automatically skips these directories to improve performance:\n\n- `node_modules`\n- `.git`\n- `vendor`\n- `dist`\n- `build`\n- `.vscode`\n- `.idea`\n- `__pycache__`\n- `venv`\n- `.env` (directories, not files)\n- `bin`\n- `obj`\n- `target`\n- `coverage`\n- `logs`\n- `tmp`/`temp`\n- `cache`/`.cache`\n- `public/assets`\n- `public/dist`\n- `public/build`\n\n## 📊 Output Example\n\n```\nFound .env file: /home/user/projects/app1/backend/.env\nCopied to: ./envs/home/user/projects/app1/backend/.env\nFound .env file: /home/user/projects/app1/frontend/.env.local\nCopied to: ./envs/home/user/projects/app1/frontend/.env.local\nFound .env file: /home/user/projects/app2/api/.env.production\nCopied to: ./envs/home/user/projects/app2/api/.env.production\n\n--- Summary ---\nFound 3 .env files:\n1. /home/user/projects/app1/backend/.env\n2. /home/user/projects/app1/frontend/.env.local\n3. /home/user/projects/app2/api/.env.production\n\nSuccessfully copied 3 .env files to ./envs:\n1. ./envs/home/user/projects/app1/backend/.env\n2. ./envs/home/user/projects/app1/frontend/.env.local\n3. ./envs/home/user/projects/app2/api/.env.production\n```\n\n## ⚙️ Technical Details\n\n- Written in Go for maximum performance and cross-platform compatibility\n- Uses the standard library (`filepath.Walk`) for efficient directory traversal\n- Handles file operations carefully to preserve permissions\n\n## 🤖 Created by Claude AI\n\nThis tool was developed with the assistance of Claude AI (Claude 3.7 Sonnet), showcasing how AI can help create practical utilities for developers. The AI helped design:\n\n- The core file discovery algorithm\n- Smart directory exclusion logic\n- Path preservation functionality\n- The user-friendly CLI interface\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n---\n\n*If you find this tool useful, consider starring the repository and sharing it with your fellow developers!*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fenvfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapcodeio%2Fenvfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fenvfinder/lists"}