{"id":15007573,"url":"https://github.com/y3owk1n/cpenv","last_synced_at":"2026-03-03T22:31:46.819Z","repository":{"id":217708450,"uuid":"744464879","full_name":"y3owk1n/cpenv","owner":"y3owk1n","description":"Seamlessly copy and synchronize .env files across projects with ease.","archived":false,"fork":false,"pushed_at":"2025-05-18T06:35:30.000Z","size":1484,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T10:38:02.477Z","etag":null,"topics":["cli","env","environment-variables","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/y3owk1n.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2024-01-17T11:00:21.000Z","updated_at":"2025-05-18T06:35:32.000Z","dependencies_parsed_at":"2025-05-16T07:39:02.283Z","dependency_job_id":null,"html_url":"https://github.com/y3owk1n/cpenv","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":"0.22857142857142854","last_synced_commit":"edf9f47c78692102fb1394df406a6dc6ec140475"},"previous_names":["y3owk1n/env-cli"],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/y3owk1n/cpenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y3owk1n%2Fcpenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y3owk1n%2Fcpenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y3owk1n%2Fcpenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y3owk1n%2Fcpenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y3owk1n","download_url":"https://codeload.github.com/y3owk1n/cpenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y3owk1n%2Fcpenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30064305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","env","environment-variables","nodejs"],"created_at":"2024-09-24T19:11:38.791Z","updated_at":"2026-03-03T22:31:46.789Z","avatar_url":"https://github.com/y3owk1n.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local .env copy CLI\n\n![GitHub Tag](https://img.shields.io/github/v/tag/y3owk1n/cpenv)\n![GitHub License](https://img.shields.io/github/license/y3owk1n/cpenv)\n\nEnvCopy CLI is a powerful command-line tool that simplifies the process of copying environment files for different projects. With just a few commands, you can effortlessly manage and replicate environment configurations across your projects.\n\nThis is useful when it comes to working within git worktrees, and you need the same .env(s) across multiple worktrees. Also sometimes when you need to run commands like `git reset --hard; and git clean -dfx`, you can always get your .env file back easily.\n\n## Simple Project Demo\n\n\u003chttps://github.com/y3owk1n/cpenv/assets/62775956/a61b0944-1507-4291-a81f-2fd4d198a572\u003e\n\n## Monorepo Project Demo\n\n\u003chttps://github.com/y3owk1n/cpenv/assets/62775956/d36b733d-a222-46ff-befe-bac8b6fd73ea\u003e\n\n\u003c!--toc:start--\u003e\n\n- [Prerequisites](#prerequisites)\n- [Features](#features)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Options](#options)\n  - [Examples](#examples)\n- [Troubleshooting](#troubleshooting)\n- [Contributions](#contributions)\n- [License](#license)\n\u003c!--toc:end--\u003e\n\n## Prerequisites\n\nBefore using EnvCopy CLI, ensure you have the following prerequisites:\n\n1. Running `cpenv config init` for the first time will prompt you to setup your `env-files` folder.\n\n- You can set it to any folder you like, but the default is `~/.env-files`. I personally set it to an icloud drive path.\n\n- The config file will be at `$HOME/.config/cpenv/cpenv.yaml`\n\n2. Organize your projects within your chosen directory. Each project should have its own subdirectory.\n\n```plaintext\n  ~/.env-files\n  ├── single-env-project\n  │   ├── .env\n  ├── multi-env-project\n  │   ├── .env\n  │   ├── apps\n  │   │   ├── web\n  │   │   │   ├── .env\n  │   │   ├── api\n  │   │   │   ├── .env\n  └── other-projects...\n```\n\n## Features\n\n- **Automatic Project Setup:** Automatically setup the `env-files` folder if it doesn't exist through simple prompts.\n\n- **Interactive Project Selection:** Easily choose the project for which you want to copy environment files using a user-friendly interactive prompt or specify it directly through command-line options.\n\n- **Backup Env(s) To Vault:** Back up your project env files to vault and ignore `*.template` and `*.example`.\n\n## Getting Started\n\n### Installation\n\n#### Install with `install.sh`\n\nYou can install **cpenv** with a single command that downloads and executes our installation script. The script automatically detects your operating system and architecture and installs the appropriate binary.\n\n\u003e [!warning]\n\u003e Always review remote scripts before execution. Before running any script from the internet, inspect its contents to ensure its safety.\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/y3owk1n/cpenv/main/install.sh | bash\n```\n\nWe have also included an `uninstall script` if you would like to uninstall it\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/y3owk1n/cpenv/main/uninstall.sh | bash\n```\n\n#### Install via brew\n\n```bash\nbrew tap y3owk1n/tap\nbrew install y3owk1n/tap/cpenv\n```\n\n#### Building From Source\n\nMake sure you have Go (v1.23 or later) installed. Then run:\n\n```bash\ngit clone https://github.com/y3owk1n/nvs.git\ncd nvs\nmkdir -p build\n\n# Build for darwin-arm64\nenv GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/y3owk1n/cpenv/cmd.Version=local-build\" -trimpath -o ./build/cpenv-darwin-arm64 ./main.go\n\n# Build for darwin-amd64\nenv GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/y3owk1n/cpenv/cmd.Version=local-build\" -trimpath -o ./build/cpenv-darwin-amd64 ./main.go\n\n# Build for linux-arm64\nenv GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/y3owk1n/cpenv/cmd.Version=local-build\" -trimpath -o ./build/cpenv-linux-arm64 ./main.go\n\n# Build for linux-amd64\nenv GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/y3owk1n/cpenv/cmd.Version=local-build\" -trimpath -o ./build/cpenv-linux-amd64 ./main.go\n\n# Build for windows-amd64\nenv GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags \"-s -w -X github.com/y3owk1n/cpenv/cmd.Version=local-build\" -trimpath -o ./build/cpenv-windows64.exe ./main.go\n```\n\nMove the binary to your PATH or run it directly.\n\n### Usage\n\nGo to your project directory and run the following command in your terminal:\n\n```bash\ncpenv config init -\u003e initialize configurations for vault\ncpenv config edit -\u003e edit configurations for vault\ncpenv copy -\u003e start copy interactive flow\ncpenv backup -\u003e start backup interactive flow\ncpenv vault -\u003e open your vault in finder\n```\n\nThis will launch the interactive mode, guiding you through project selection, file copying and backups.\n\n### Options\n\n#### For root\n\n- -h, --help: Display help for command\n- -v, --version: Display current version\n\n#### For `cpenv copy`\n\n- No options for now\n\n#### For `cpenv backup`\n\n- No options for now\n\n#### For `cpenv config`\n\n- No options for now\n\n#### For `cpenv vault`\n\n- No options for now\n\n## Troubleshooting\n\nIf you encounter any issues or errors, please refer to the ~~troubleshooting section in the wiki~~ (Not ready yet).\n\n## Contributions\n\nFeel free to contribute by opening issues, suggesting enhancements, or submitting pull requests. We value your feedback and ideas to enhance the capabilities of `cpenv` further!\n\n## License\n\nThis project is licensed under the MIT License. Feel free to use, modify, and distribute it as you see fit.\n\nHappy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy3owk1n%2Fcpenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy3owk1n%2Fcpenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy3owk1n%2Fcpenv/lists"}