{"id":17913050,"url":"https://github.com/endorama/devenv","last_synced_at":"2025-03-23T22:35:24.890Z","repository":{"id":56569695,"uuid":"123843251","full_name":"endorama/devenv","owner":"endorama","description":"Manage different shell environments securely with ease","archived":false,"fork":false,"pushed_at":"2020-10-31T00:12:02.000Z","size":164,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T00:14:47.470Z","etag":null,"topics":["development","devenv","environment","gpg","hacktoberfest","profile","security","security-posture","ssh-agent","ssh-key"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endorama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-05T00:35:58.000Z","updated_at":"2020-10-31T00:12:04.000Z","dependencies_parsed_at":"2022-08-15T21:10:20.808Z","dependency_job_id":null,"html_url":"https://github.com/endorama/devenv","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorama%2Fdevenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorama%2Fdevenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorama%2Fdevenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endorama%2Fdevenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endorama","download_url":"https://codeload.github.com/endorama/devenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245180577,"owners_count":20573692,"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":["development","devenv","environment","gpg","hacktoberfest","profile","security","security-posture","ssh-agent","ssh-key"],"created_at":"2024-10-28T19:49:38.150Z","updated_at":"2025-03-23T22:35:24.494Z","avatar_url":"https://github.com/endorama.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/endorama/devenv?status.svg)](https://godoc.org/github.com/endorama/devenv)\n\n# DevEnv\n\n\u003e A sandbox for your different profiles\n\nWhat if you could *sandbox* credentials?  \nWhat if you could avoid *simple* mistakes?  \nWhat if you could backup them *safely*?  \n\nFor every professional working on the web, credential compromise is a ever present risk.\n\nWe all have, as developers or operators, a set of emails, credentials, tokens, keys \nthat are strictly related to an \"environment\": be it your personal life, your company,\na specific project, a specific \"identity\".\n\nWe all should keep a baseline security posture towards those \"environments\".  \nBut security is hard: making errors is easy and require deep knowledge. Every \nstep you take poses a risk (this is true for long time pro, even truer for juniors).\n\nDevEnv aims to help you keeping those environment protected, by being **simple, customizable and \nsecure by default**.\n\n*NB*: No tool can prevent security breaches, and this one make no exception. But\ntools can make more usable some common patterns that would be a burden to do manually\nand error prone.\n\n## **TOC**\n\n* [Why](#why)\n* [Installation](#installation)\n* [How it works](#how-it-workds)\n* [Why is secure?](#why-is-secure)\n* [Profiles](#profiles)\n* [Plugins](#plugins)\n* [Credits](#credits)\n\n## Why\n\nThe problem: I started working as a freelance, and with consultancies comes clients.\nFor sane security, I didn't want (or is not possible) to reuse the same credentials\nfor every client: ssh key, AWS credentials, GitHub/GitLab/Bitbucket tokens,\nare the most common things changing between different clients.\n\nAs I hadn't find any way to properly manage this, I started building a series\nof helper bash scripts to load/unload the shell environment in order to provide\nthe specific tools I was needing when workign for a particular client.\n\nI think I created it in 2015, after tons of use `bash` went short and I decided to \nrewrite it, in Go. mainly I wanted to add possibility for everyone to contribute\nplugins, and bash does not help you with this.\n\n## Installation\n\n### From Source\n\nClone this repository, lookup current Golang development version in `.tool-versions`\nand compile it.\n\nOptionally, checkout the release tag.\n\n### Go Get\n\nIf you fancy golang and have it setup, you can `go get` this repository:\n\n```\ngo get -u https://github.com/endorama/devenv\n```\n\n### Homebrew/Linuxbrew\n\nYou can install latest stable release using Homebrew (both macOS and Linux):\n\n```\nbrew install devenv\n```\n\n### Manual\n\nGo to the [Release](https://github.com/endorama/devenv/releases) page and grab latest version.\n\n## Old version (Bash)\n\nThe old bash version is in branch `v0`, and latest releases is `0.2.1`.\n\n## How it works\n\n`devenv` takes a set of files inside a folder and via a plugin system produce 2 output files:\n- a shell loader: this file contains profile setup instruction and then `exec` the speficied\n  shell; useful for long running interactive sessions\n- a shell runner: this files contains profile setup instruction and the `exec` the specified\n  command; useful for one off commands\n\nThis 2 files will be used by `shell` and `run` commands, but may be used as is, as both are valid\n`bash` files. This is a major advantage of `devenv`: even if the cli breaks, you're dealing only with\nBASH files, easy enough to be modified manually. An hidden advantage are easier backups.\n\n## Why is secure?\n\n`devenv` aims to reduce security risks by improving your security posture. It uses sane and secure \ndefaults, reducing toil in manual operations.\n\nHow do you backup your SSH key? How do \n\nCurrently `devenv` is not complete, and is not the best solution. You are still required to know and\nperform some steps knowing how to posture yourself securely, but with the growth is expected to \nencompass more and more best practices, removing the burden from the user.\n\n## Key Concepts\n\n### Evironments\n\nEven if the tool is called `devenv`, no reference to `environments` are present in the documentation.  \nEnvironments has been widely used by a multitide of softwares, so we will use `profiles` instead.\n\n### Profiles\n\nProfiles are set of credentials you want to isolate between each other. Each profile may contain\nits credentials allowing you to load them on demand, otherwise hidden from your system.\n\n### Plugins\n\n`devenv` is build around a plugin system to enhance its capabilities. Each plugin is responsible\nto manage configurations, creating files for a profiles and producing the shell code to be \nintegrated in the shell loader and runner files.\n\nPlugins lives in this codebase (for simplicity, may be split at later time) and are availble under\n[`internal/plugins`](https://github.com/endorama/devenv/tree/master/internal/plugins).  \nEach plugin is a separate go package implementing the `Pluggable` interface.\n\nEach plugin may implement one or more of the optional interfaces for extending its capabilities:\n\n- `Configurable`\n- `Generator`\n- `Setuppable`\n\nAdditional details about pluing interfaces may be found in the docs.\n\n*Available plugins*:\n\n-\t[aws](https://github.com/endorama/devenv/blob/master/internal/plugins/aws.go)\n- [bin](https://github.com/endorama/devenv/blob/master/internal/plugins/bin.go)\n- [email](https://github.com/endorama/devenv/blob/master/internal/plugins/email.go)\n- [envs](https://github.com/endorama/devenv/blob/master/internal/plugins/envs.go)\n- [shell-history](https://github.com/endorama/devenv/blob/master/internal/plugins/shell-history.go)\n- [ssh](https://github.com/endorama/devenv/blob/master/internal/plugins/ssh.go)\n\n## License\n\nCopyright 2019-2020 - Edoardo Tenani ([@endorama][github])\n\nLicensed under Mozilla Public License 2.0.\n\nA copy is available in [LICENSE](./LICENSE).  \nAn [online copy](https://choosealicense.com/licenses/mpl-2.0/) is available.\n\n## Credits\n\nDevEnv CLI interface is heavily inspired by the beautiful cli interface of [rbenv][rbenv].\n\nIt's `0.x` version was based on the awesome [37's Signals sub][sub] utility.\n\nI had some mighty beta testers, that tried, debugged and broke my bash scripts:\n- [@matjack1](https://github.com/matjack1)\n\nTo whom goes my THANK YOU! ^^\n\n\n[rbenv]: https://github.com/rbenv/rbenv\n[sub]: https://github.com/basecamp/sub\n[github]:  https://github.com/endorama\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendorama%2Fdevenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendorama%2Fdevenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendorama%2Fdevenv/lists"}