envshield 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,220 @@
1
+ Metadata-Version: 2.4
2
+ Name: envshield
3
+ Version: 1.2.0
4
+ Summary: EnvShield: A CLI for secure local environment management and secret prevention.
5
+ Home-page: https://github.com/rabbilyasar/envshield
6
+ Author: Rabbil Yasar Sajal
7
+ Author-email: rabbilyasar@gmail.com
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Natural Language :: English
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Security
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: PyYAML<7.0,>=6.0
26
+ Requires-Dist: rich<15.0,>=13.0
27
+ Requires-Dist: questionary<3.0,>=2.0
28
+ Requires-Dist: typer[all]<1.0,>=0.9
29
+ Dynamic: author
30
+ Dynamic: author-email
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # EnvShield 🛡️
40
+
41
+ **Your Environment's First Line of Defense.**
42
+
43
+ Tired of the chaos of local development? Manually copying `.env` files, hunting for secrets on Slack, and constantly worrying if you just committed an API key? This messy workflow isn't just frustrating—it's a security risk waiting to happen.
44
+
45
+ **EnvShield brings order and security to your local environment.** It's a command-line tool that automates the entire setup process, making it simple, repeatable, and safe.
46
+
47
+ ---
48
+
49
+ ### **Table of Contents**
50
+
51
+ 1. [The Problem: The Silent Threat of Secret Leaks](#the-problem-the-silent-threat-of-secret-leaks)
52
+ 2. [Your Proactive Security Net](#your-proactive-security-net)
53
+ 3. [Streamlining Your Workflow](#streamlining-your-workflow)
54
+ 4. [Installation](#installation)
55
+ 5. [Core Concepts](#core-concepts)
56
+ 6. [Feature Guide & Demos](#feature-guide--demos)
57
+ - [`envshield init` - The Project Starter](#envshield-init---the-project-starter)
58
+ - [`envshield onboard` - The New Developer's Best Friend](#envshield-onboard---the-new-developers-best-friend)
59
+ - [`envshield list` & `use` - Daily Context Switching](#envshield-list--use---daily-context-switching)
60
+ - [`envshield template` - Preventing Configuration Drift](#envshield-template---preventing-configuration-drift)
61
+ - [`envshield scan` & `install-hook` - The Security Guard](#envshield-scan--install-hook---the-security-guard)
62
+ 7. [The `envshield.yml` File Explained](#the-envshieldyml-file-explained)
63
+ 8. [The Future of EnvShield: Roadmap](#the-future-of-envshield-roadmap)
64
+
65
+ ---
66
+
67
+ ## **The Problem: The Silent Threat of Secret Leaks**
68
+
69
+ Managing secrets and environment variables is more than just an inconvenience; it's a massive security vulnerability.
70
+
71
+ **The Stakes Are High:**
72
+
73
+ - **A Constant Barrage:** Security researchers find that **over 1,000 unique, hardcoded secrets** are leaked to public GitHub repositories _every single day_.
74
+ - **The Cost of a Mistake:** According to IBM's 2024 "Cost of a Data Breach" report, the average cost of a data breach is **$4.45 million**. A single leaked credential can be the starting point for a catastrophic attack.
75
+
76
+ **The Old Way is Broken:** Manually managing `.env` files, copying templates, and sharing secrets over Slack is a recipe for disaster. It's not a matter of _if_ a secret will be leaked, but _when_.
77
+
78
+ ---
79
+
80
+ ## **Your Proactive Security Net**
81
+
82
+ EnvShield is more than just a workflow tool; it's your first line of defense against accidental secret leaks.
83
+
84
+ ### **Never Commit a Secret Again: `envshield scan` & `install-hook`**
85
+
86
+ **How it improves development:** It makes it virtually impossible to accidentally commit a plaintext secret. This single feature provides immense peace of mind and protects your company from potentially devastating security breaches.
87
+
88
+ ---
89
+
90
+ ## **Streamlining Your Workflow**
91
+
92
+ Beyond security, EnvShield eliminates the daily friction of managing complex environments.
93
+
94
+ ### **The "Before & After"**
95
+
96
+ **Before EnvShield:** A new developer spends half a day hunting for secrets, manually copying files, and debugging a broken setup.
97
+
98
+ **With EnvShield:** A new developer runs one command, `envshield onboard dev`, follows a guided wizard, and has a fully configured, running application in minutes.
99
+
100
+ ---
101
+
102
+ ## **Installation**
103
+
104
+ To install EnvShield, you will need a Python environment (version 3.10+).
105
+
106
+ ```bash
107
+ # Install from PyPI (once published)
108
+ pip install envshield
109
+
110
+ # Or, directly from GitHub
111
+ pip install git+[https://github.com/rabbilyasar/envshield.git](https://github.com/rabbilyasar/envshield.git)
112
+ ```
113
+
114
+ Verify the installation
115
+
116
+ ```
117
+ envshield --help
118
+ ```
119
+
120
+ ## Core Concepts
121
+
122
+ - **Profiles**: A named "state" for your environment (e.g., `local-dev`, `test`).
123
+ - **Links**: A profile is defined by a set of `links`. A link tells EnvShield to take a `source` file and make it available as a `target` file via a symlink.
124
+ - **Templates**: A `template` is a version-controlled "master blueprint" for a configuration file.
125
+
126
+ ## Feature Guide & Demos
127
+
128
+ `envshield init` - **The Project Starter**
129
+
130
+ This interactive wizard creates your initial `envshield.yml` file.
131
+
132
+ `envshield onboard` - **The New Developer's Best Friend**
133
+
134
+ A single command that takes a new developer from a fresh `git clone` to a fully configured, running application by creating files, prompting for secrets, and running setup scripts.
135
+
136
+ `envshield list` & `use` - **Daily Context Switching**
137
+
138
+ Your day-to-day commands for managing your environment. `list` shows your options, and `use` activates one.
139
+
140
+ `envshield template` - **Preventing Configuration Drift**
141
+
142
+ Commands (`check` and `sync`) to keep your project's "master blueprint" up-to-date.
143
+
144
+ `envshield scan` & `install-hook` - **The Security Guard**
145
+
146
+ - `envshield scan`: Scans files for secrets.
147
+
148
+ - `envshield install-hook`: Installs a Git pre-commit hook to automatically scan staged files before every commit, blocking the commit if secrets are found.
149
+
150
+ ## The `envshield.yml` File Explained
151
+
152
+ This file is the heart of your configuration. It's designed to be simple enough for a small project but powerful enough for a complex monorepo.
153
+
154
+ **For a Simple Project**
155
+
156
+ If you just use a single `.env` file, your configuration is clean and minimal.
157
+
158
+ ```yaml
159
+ project_name: my-cool-api
160
+ profiles:
161
+ dev:
162
+ description: 'For local development.'
163
+ links:
164
+ - source: .env.dev
165
+ target: .env
166
+ template: .env.template
167
+ ```
168
+
169
+ **For a Complex Project**
170
+ This is where EnvShield's power shines. The `links` system allows you to manage multiple, distinct configuration files under a single profile, each with its own template.
171
+
172
+ ```yaml
173
+ project_name: rocket_launcher
174
+ profiles:
175
+ local-dev:
176
+ description: 'Standard local development with Docker.'
177
+ links:
178
+ - source: config/env_config.dev.py
179
+ target: config/env_config.py
180
+ template: config/env_config.local.py
181
+ - source: .env.local-dev
182
+ target: .env
183
+ template: .env.template
184
+ - source: python.env.local-dev
185
+ target: python.env
186
+ template: python.env.template
187
+ onboarding_prompts:
188
+ - SECRET_KEY
189
+ post_onboard_script: './tools/ctl.sh pre-deploy'
190
+ secret_scanning:
191
+ exclude_files:
192
+ - 'node_modules/*'
193
+ ```
194
+
195
+ ## The Future of EnvShield: Roadmap
196
+
197
+ Phase 1 provides a complete solution for local environment management. The future of EnvShield is focused on enhancing security, team collaboration, and intelligence.
198
+
199
+ **Phase 2: The Secure Team Enabler**
200
+ _This is where our paid "Team" tier begins, offering features for professional teams._
201
+
202
+ - **Encrypted Files**: Safely commit encrypted secret files to your repository. `envshield use` will transparently decrypt them.
203
+
204
+ - **Secure P2P Secret Sharing**: Securely share secrets with teammates directly from the command line, eliminating the need for insecure channels like Slack.
205
+
206
+ - **The Global Vault**: Securely store and sync your personal, cross-project secrets (like your `GITHUB_TOKEN`) to a private GitHub repo, so you only have to enter them once.
207
+
208
+ - `envshield doctor`: A comprehensive health check command.
209
+
210
+ **Phase 3: The Intelligent Ecosystem**
211
+
212
+ _This is where we build our "Enterprise" tier and make EnvShield an indispensable part of the development lifecycle._
213
+
214
+ - **Shell & Git Integration**: Automatically load/unload environments as you `cd`.
215
+
216
+ - **Deployment Bridge** (`export`): Export configurations for Docker, Kubernetes, etc.
217
+
218
+ - **Deep IDE Integration**: Get real-time feedback directly in your code editor.
219
+
220
+ We welcome feedback and contributions to make EnvShield the best tool it can be!
@@ -0,0 +1,182 @@
1
+ # EnvShield 🛡️
2
+
3
+ **Your Environment's First Line of Defense.**
4
+
5
+ Tired of the chaos of local development? Manually copying `.env` files, hunting for secrets on Slack, and constantly worrying if you just committed an API key? This messy workflow isn't just frustrating—it's a security risk waiting to happen.
6
+
7
+ **EnvShield brings order and security to your local environment.** It's a command-line tool that automates the entire setup process, making it simple, repeatable, and safe.
8
+
9
+ ---
10
+
11
+ ### **Table of Contents**
12
+
13
+ 1. [The Problem: The Silent Threat of Secret Leaks](#the-problem-the-silent-threat-of-secret-leaks)
14
+ 2. [Your Proactive Security Net](#your-proactive-security-net)
15
+ 3. [Streamlining Your Workflow](#streamlining-your-workflow)
16
+ 4. [Installation](#installation)
17
+ 5. [Core Concepts](#core-concepts)
18
+ 6. [Feature Guide & Demos](#feature-guide--demos)
19
+ - [`envshield init` - The Project Starter](#envshield-init---the-project-starter)
20
+ - [`envshield onboard` - The New Developer's Best Friend](#envshield-onboard---the-new-developers-best-friend)
21
+ - [`envshield list` & `use` - Daily Context Switching](#envshield-list--use---daily-context-switching)
22
+ - [`envshield template` - Preventing Configuration Drift](#envshield-template---preventing-configuration-drift)
23
+ - [`envshield scan` & `install-hook` - The Security Guard](#envshield-scan--install-hook---the-security-guard)
24
+ 7. [The `envshield.yml` File Explained](#the-envshieldyml-file-explained)
25
+ 8. [The Future of EnvShield: Roadmap](#the-future-of-envshield-roadmap)
26
+
27
+ ---
28
+
29
+ ## **The Problem: The Silent Threat of Secret Leaks**
30
+
31
+ Managing secrets and environment variables is more than just an inconvenience; it's a massive security vulnerability.
32
+
33
+ **The Stakes Are High:**
34
+
35
+ - **A Constant Barrage:** Security researchers find that **over 1,000 unique, hardcoded secrets** are leaked to public GitHub repositories _every single day_.
36
+ - **The Cost of a Mistake:** According to IBM's 2024 "Cost of a Data Breach" report, the average cost of a data breach is **$4.45 million**. A single leaked credential can be the starting point for a catastrophic attack.
37
+
38
+ **The Old Way is Broken:** Manually managing `.env` files, copying templates, and sharing secrets over Slack is a recipe for disaster. It's not a matter of _if_ a secret will be leaked, but _when_.
39
+
40
+ ---
41
+
42
+ ## **Your Proactive Security Net**
43
+
44
+ EnvShield is more than just a workflow tool; it's your first line of defense against accidental secret leaks.
45
+
46
+ ### **Never Commit a Secret Again: `envshield scan` & `install-hook`**
47
+
48
+ **How it improves development:** It makes it virtually impossible to accidentally commit a plaintext secret. This single feature provides immense peace of mind and protects your company from potentially devastating security breaches.
49
+
50
+ ---
51
+
52
+ ## **Streamlining Your Workflow**
53
+
54
+ Beyond security, EnvShield eliminates the daily friction of managing complex environments.
55
+
56
+ ### **The "Before & After"**
57
+
58
+ **Before EnvShield:** A new developer spends half a day hunting for secrets, manually copying files, and debugging a broken setup.
59
+
60
+ **With EnvShield:** A new developer runs one command, `envshield onboard dev`, follows a guided wizard, and has a fully configured, running application in minutes.
61
+
62
+ ---
63
+
64
+ ## **Installation**
65
+
66
+ To install EnvShield, you will need a Python environment (version 3.10+).
67
+
68
+ ```bash
69
+ # Install from PyPI (once published)
70
+ pip install envshield
71
+
72
+ # Or, directly from GitHub
73
+ pip install git+[https://github.com/rabbilyasar/envshield.git](https://github.com/rabbilyasar/envshield.git)
74
+ ```
75
+
76
+ Verify the installation
77
+
78
+ ```
79
+ envshield --help
80
+ ```
81
+
82
+ ## Core Concepts
83
+
84
+ - **Profiles**: A named "state" for your environment (e.g., `local-dev`, `test`).
85
+ - **Links**: A profile is defined by a set of `links`. A link tells EnvShield to take a `source` file and make it available as a `target` file via a symlink.
86
+ - **Templates**: A `template` is a version-controlled "master blueprint" for a configuration file.
87
+
88
+ ## Feature Guide & Demos
89
+
90
+ `envshield init` - **The Project Starter**
91
+
92
+ This interactive wizard creates your initial `envshield.yml` file.
93
+
94
+ `envshield onboard` - **The New Developer's Best Friend**
95
+
96
+ A single command that takes a new developer from a fresh `git clone` to a fully configured, running application by creating files, prompting for secrets, and running setup scripts.
97
+
98
+ `envshield list` & `use` - **Daily Context Switching**
99
+
100
+ Your day-to-day commands for managing your environment. `list` shows your options, and `use` activates one.
101
+
102
+ `envshield template` - **Preventing Configuration Drift**
103
+
104
+ Commands (`check` and `sync`) to keep your project's "master blueprint" up-to-date.
105
+
106
+ `envshield scan` & `install-hook` - **The Security Guard**
107
+
108
+ - `envshield scan`: Scans files for secrets.
109
+
110
+ - `envshield install-hook`: Installs a Git pre-commit hook to automatically scan staged files before every commit, blocking the commit if secrets are found.
111
+
112
+ ## The `envshield.yml` File Explained
113
+
114
+ This file is the heart of your configuration. It's designed to be simple enough for a small project but powerful enough for a complex monorepo.
115
+
116
+ **For a Simple Project**
117
+
118
+ If you just use a single `.env` file, your configuration is clean and minimal.
119
+
120
+ ```yaml
121
+ project_name: my-cool-api
122
+ profiles:
123
+ dev:
124
+ description: 'For local development.'
125
+ links:
126
+ - source: .env.dev
127
+ target: .env
128
+ template: .env.template
129
+ ```
130
+
131
+ **For a Complex Project**
132
+ This is where EnvShield's power shines. The `links` system allows you to manage multiple, distinct configuration files under a single profile, each with its own template.
133
+
134
+ ```yaml
135
+ project_name: rocket_launcher
136
+ profiles:
137
+ local-dev:
138
+ description: 'Standard local development with Docker.'
139
+ links:
140
+ - source: config/env_config.dev.py
141
+ target: config/env_config.py
142
+ template: config/env_config.local.py
143
+ - source: .env.local-dev
144
+ target: .env
145
+ template: .env.template
146
+ - source: python.env.local-dev
147
+ target: python.env
148
+ template: python.env.template
149
+ onboarding_prompts:
150
+ - SECRET_KEY
151
+ post_onboard_script: './tools/ctl.sh pre-deploy'
152
+ secret_scanning:
153
+ exclude_files:
154
+ - 'node_modules/*'
155
+ ```
156
+
157
+ ## The Future of EnvShield: Roadmap
158
+
159
+ Phase 1 provides a complete solution for local environment management. The future of EnvShield is focused on enhancing security, team collaboration, and intelligence.
160
+
161
+ **Phase 2: The Secure Team Enabler**
162
+ _This is where our paid "Team" tier begins, offering features for professional teams._
163
+
164
+ - **Encrypted Files**: Safely commit encrypted secret files to your repository. `envshield use` will transparently decrypt them.
165
+
166
+ - **Secure P2P Secret Sharing**: Securely share secrets with teammates directly from the command line, eliminating the need for insecure channels like Slack.
167
+
168
+ - **The Global Vault**: Securely store and sync your personal, cross-project secrets (like your `GITHUB_TOKEN`) to a private GitHub repo, so you only have to enter them once.
169
+
170
+ - `envshield doctor`: A comprehensive health check command.
171
+
172
+ **Phase 3: The Intelligent Ecosystem**
173
+
174
+ _This is where we build our "Enterprise" tier and make EnvShield an indispensable part of the development lifecycle._
175
+
176
+ - **Shell & Git Integration**: Automatically load/unload environments as you `cd`.
177
+
178
+ - **Deployment Bridge** (`export`): Export configurations for Docker, Kubernetes, etc.
179
+
180
+ - **Deep IDE Integration**: Get real-time feedback directly in your code editor.
181
+
182
+ We welcome feedback and contributions to make EnvShield the best tool it can be!
@@ -0,0 +1 @@
1
+ __version__ = "1.2.0"
@@ -0,0 +1,7 @@
1
+ from .cli import app
2
+
3
+ def main():
4
+ app()
5
+
6
+ if __name__ == "__main__":
7
+ main()