@envsafes-org/cli 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. package/README.md +114 -114
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,73 +1,73 @@
1
1
  # 🔐 EnvSafe CLI
2
2
 
3
- **Gestionnaire sécurisé de variables d'environnement pour vos équipes**
3
+ **Secure environment variable manager for your teams**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@envsafes-org/cli.svg)](https://www.npmjs.com/package/@envsafes-org/cli)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
- EnvSafe CLI vous permet de gérer vos variables d'environnement de manière sécurisée avec chiffrement de bout en bout. Idéal pour les équipes qui veulent centraliser leurs secrets sans compromettre la sécurité.
8
+ EnvSafe CLI allows you to manage your environment variables securely with end-to-end encryption. Ideal for teams wanting to centralize their secrets without compromising security.
9
9
 
10
- ## 🛑 Prérequis
10
+ ## 🛑 Prerequisites
11
11
 
12
- Avant d'utiliser la CLI, vous devez créer un compte et un projet sur **[https://www.envsafe.dev](https://www.envsafe.dev)**.
12
+ Before using the CLI, you must create an account and a project on **[https://www.envsafe.dev](https://www.envsafe.dev)**.
13
13
 
14
14
  ## 📦 Installation
15
15
 
16
16
  ```bash
17
- # Installation globale (recommandé)
17
+ # Global installation (recommended)
18
18
  npm install -g @envsafes-org/cli
19
19
 
20
- # Avec yarn
20
+ # With yarn
21
21
  yarn global add @envsafes-org/cli
22
22
 
23
- # Avec pnpm
23
+ # With pnpm
24
24
  pnpm add -g @envsafes-org/cli
25
25
 
26
- # Utilisation ponctuelle sans installation
26
+ # One-time use without installation
27
27
  npx @envsafes-org/cli
28
28
  ```
29
29
 
30
- ## 🚀 Démarrage rapide
30
+ ## 🚀 Quick Start
31
31
 
32
32
  ```bash
33
- # 1. Connectez-vous avec votre token API
33
+ # 1. Log in with your API token
34
34
  envsafe login
35
35
 
36
- # 2. Listez vos projets
36
+ # 2. List your projects
37
37
  envsafe projects
38
38
 
39
- # 3. Récupérez vos variables
40
- envsafe pull mon-projet
39
+ # 3. Pull your variables
40
+ envsafe pull my-project
41
41
 
42
- # 4. Ou exécutez directement avec injection
43
- envsafe run mon-projet -- npm start
42
+ # 4. Or run directly with injection
43
+ envsafe run my-project -- npm start
44
44
  ```
45
45
 
46
- ## 📖 Commandes
46
+ ## 📖 Commands
47
47
 
48
48
  ### `envsafe login`
49
49
 
50
- Authentifiez-vous avec un token d'accès personnel (PAT).
50
+ Authenticate with a Personal Access Token (PAT).
51
51
 
52
52
  ```bash
53
- # Mode interactif
53
+ # Interactive mode
54
54
  envsafe login
55
55
 
56
- # Avec token direct (CI/CD)
56
+ # With direct token (CI/CD)
57
57
  envsafe login --token es_live_xxxxxxxxxxxxx
58
58
  ```
59
59
 
60
- **💡 Générer un token :** Rendez-vous dans votre Dashboard → Settings → API Tokens
60
+ **💡 Generate a token:** Go to your Dashboard → Settings → API Tokens
61
61
 
62
62
  ---
63
63
 
64
64
  ### `envsafe projects` (alias: `ls`)
65
65
 
66
- Listez tous les projets accessibles.
66
+ List all accessible projects.
67
67
 
68
68
  ```bash
69
69
  envsafe projects
70
- # ou
70
+ # or
71
71
  envsafe ls
72
72
  ```
73
73
 
@@ -75,73 +75,73 @@ envsafe ls
75
75
 
76
76
  ### `envsafe pull <project>`
77
77
 
78
- Téléchargez les variables d'environnement dans un fichier local.
78
+ Download environment variables to a local file.
79
79
 
80
80
  ```bash
81
- # Environnement de développement (par défaut)
82
- envsafe pull mon-projet
81
+ # Development environment (default)
82
+ envsafe pull my-project
83
83
 
84
- # Environnement spécifique
85
- envsafe pull mon-projet --env staging
86
- envsafe pull mon-projet --env production
84
+ # Specific environment
85
+ envsafe pull my-project --env staging
86
+ envsafe pull my-project --env production
87
87
 
88
- # Fichier de sortie personnalisé
89
- envsafe pull mon-projet --output .env.local
90
- envsafe pull mon-projet --env production --output .env.prod
88
+ # Custom output file
89
+ envsafe pull my-project --output .env.local
90
+ envsafe pull my-project --env production --output .env.prod
91
91
  ```
92
92
 
93
93
  **Options:**
94
- - `-e, --env <environment>` : Environnement (development, staging, production) - Défaut: `development`
95
- - `-o, --output <file>` : Fichier de sortie - Défaut: `.env`
94
+ - `-e, --env <environment>` : Environment (development, staging, production) - Default: `development`
95
+ - `-o, --output <file>` : Output file - Default: `.env`
96
96
 
97
97
  ---
98
98
 
99
99
  ### `envsafe push <project>`
100
100
 
101
- Envoyez vos variables locales vers EnvSafe (chiffrées automatiquement).
101
+ Send your local variables to EnvSafe (automatically encrypted).
102
102
 
103
103
  ```bash
104
- # Envoyer .env vers development
105
- envsafe push mon-projet
104
+ # Send .env to development
105
+ envsafe push my-project
106
106
 
107
- # Environnement et fichier spécifiques
108
- envsafe push mon-projet --env production --file .env.prod
107
+ # Specific environment and file
108
+ envsafe push my-project --env production --file .env.prod
109
109
  ```
110
110
 
111
111
  **Options:**
112
- - `-e, --env <environment>` : Environnement cible - Défaut: `development`
113
- - `-f, --file <file>` : Fichier source - Défaut: `.env`
112
+ - `-e, --env <environment>` : Target environment - Default: `development`
113
+ - `-f, --file <file>` : Source file - Default: `.env`
114
114
 
115
115
  ---
116
116
 
117
117
  ### `envsafe run <project> -- <command>`
118
118
 
119
- **⭐️ Commande recommandée** : Exécutez une commande avec les variables injectées directement, sans créer de fichier `.env` sur le disque.
119
+ **⭐️ Recommended command**: Run a command with variables injected directly, without creating a `.env` file on disk.
120
120
 
121
121
  ```bash
122
- # Développement
123
- envsafe run mon-projet -- npm start
124
- envsafe run mon-projet -- npm run dev
122
+ # Development
123
+ envsafe run my-project -- npm start
124
+ envsafe run my-project -- npm run dev
125
125
 
126
126
  # Production
127
- envsafe run mon-projet --env production -- node server.js
127
+ envsafe run my-project --env production -- node server.js
128
128
 
129
- # Autres exemples
130
- envsafe run mon-projet -- pnpm build
131
- envsafe run mon-projet -- python main.py
132
- envsafe run mon-projet -- docker-compose up
129
+ # Other examples
130
+ envsafe run my-project -- pnpm build
131
+ envsafe run my-project -- python main.py
132
+ envsafe run my-project -- docker-compose up
133
133
  ```
134
134
 
135
- **Avantages:**
136
- - ✅ Plus sécurisé (pas de fichier .env sur le disque)
137
- - ✅ Idéal pour CI/CD
138
- - ✅ Pas de risque de commit accidentel de secrets
135
+ **Advantages:**
136
+ - ✅ More secure (no .env file on disk)
137
+ - ✅ Ideal for CI/CD
138
+ - ✅ No risk of accidentally committing secrets
139
139
 
140
140
  ---
141
141
 
142
142
  ### `envsafe whoami`
143
143
 
144
- Affichez les informations du compte connecté.
144
+ Display currently logged-in account information.
145
145
 
146
146
  ```bash
147
147
  envsafe whoami
@@ -151,7 +151,7 @@ envsafe whoami
151
151
 
152
152
  ### `envsafe logout`
153
153
 
154
- Déconnectez-vous (supprime le token local).
154
+ Log out (removes local token).
155
155
 
156
156
  ```bash
157
157
  envsafe logout
@@ -161,23 +161,23 @@ envsafe logout
161
161
 
162
162
  ### `envsafe config`
163
163
 
164
- Gérez la configuration de la CLI.
164
+ Manage CLI configuration.
165
165
 
166
166
  ```bash
167
- # Afficher la configuration actuelle
167
+ # Show current configuration
168
168
  envsafe config --show
169
169
 
170
- # Changer l'URL de l'API (pour instances self-hosted)
171
- envsafe config --api-url https://votre-instance.com
170
+ # Change API URL (for self-hosted instances)
171
+ envsafe config --api-url https://your-instance.com
172
172
  ```
173
173
 
174
174
  ---
175
175
 
176
- ## 🔧 Utilisation en CI/CD
176
+ ## 🔧 CI/CD Usage
177
177
 
178
- ### Méthode recommandée : Variable d'environnement
178
+ ### Recommended Method: Environment Variable
179
179
 
180
- Définissez `ENVSAFE_TOKEN` comme secret dans votre CI/CD, puis utilisez directement les commandes sans `login`.
180
+ Set `ENVSAFE_TOKEN` as a secret in your CI/CD, then use commands directly without `login`.
181
181
 
182
182
  #### GitHub Actions
183
183
 
@@ -198,14 +198,14 @@ jobs:
198
198
  env:
199
199
  ENVSAFE_TOKEN: ${{ secrets.ENVSAFE_TOKEN }}
200
200
  run: |
201
- envsafe run mon-projet --env staging -- npm test
201
+ envsafe run my-project --env staging -- npm test
202
202
 
203
203
  - name: Deploy to production
204
204
  env:
205
205
  ENVSAFE_TOKEN: ${{ secrets.ENVSAFE_TOKEN }}
206
206
  run: |
207
- envsafe run mon-projet --env production -- npm run build
208
- envsafe run mon-projet --env production -- npm run deploy
207
+ envsafe run my-project --env production -- npm run build
208
+ envsafe run my-project --env production -- npm run deploy
209
209
  ```
210
210
 
211
211
  #### GitLab CI
@@ -215,7 +215,7 @@ deploy:
215
215
  stage: deploy
216
216
  script:
217
217
  - npm install -g @envsafes-org/cli
218
- - envsafe run mon-projet --env production -- npm run deploy
218
+ - envsafe run my-project --env production -- npm run deploy
219
219
  variables:
220
220
  ENVSAFE_TOKEN: $ENVSAFE_TOKEN_SECRET
221
221
  ```
@@ -225,118 +225,118 @@ deploy:
225
225
  ```dockerfile
226
226
  FROM node:20-alpine
227
227
 
228
- # Installer la CLI
228
+ # Install the CLI
229
229
  RUN npm install -g @envsafes-org/cli
230
230
 
231
231
  WORKDIR /app
232
232
  COPY . .
233
233
 
234
- # Injecter les variables au démarrage
235
- CMD ["envsafe", "run", "mon-projet", "--env", "production", "--", "npm", "start"]
234
+ # Inject variables at startup
235
+ CMD ["envsafe", "run", "my-project", "--env", "production", "--", "npm", "start"]
236
236
  ```
237
237
 
238
238
  ---
239
239
 
240
- ## 💡 Exemples d'utilisation
240
+ ## 💡 Usage Examples
241
241
 
242
- ### Développement local
242
+ ### Local Development
243
243
 
244
244
  ```bash
245
- # Option 1 : Fichier .env (traditionnel)
246
- envsafe pull mon-projet
245
+ # Option 1: .env file (traditional)
246
+ envsafe pull my-project
247
247
  npm run dev
248
248
 
249
- # Option 2 : Injection directe (recommandé)
250
- envsafe run mon-projet -- npm run dev
249
+ # Option 2: Direct injection (recommended)
250
+ envsafe run my-project -- npm run dev
251
251
  ```
252
252
 
253
- ### Script de déploiement
253
+ ### Deployment Script
254
254
 
255
255
  ```bash
256
256
  #!/bin/bash
257
257
  # deploy.sh
258
258
 
259
- # Charger les variables de production et déployer
260
- envsafe run mon-projet --env production -- npm run build
261
- envsafe run mon-projet --env production -- npm run deploy
259
+ # Load production variables and deploy
260
+ envsafe run my-project --env production -- npm run build
261
+ envsafe run my-project --env production -- npm run deploy
262
262
  ```
263
263
 
264
- ### Tests automatisés
264
+ ### Automated Tests
265
265
 
266
266
  ```bash
267
- # Exécuter les tests avec les variables de staging
268
- envsafe run mon-projet --env staging -- npm test
267
+ # Run tests with staging variables
268
+ envsafe run my-project --env staging -- npm test
269
269
  ```
270
270
 
271
- ### Multi-environnements
271
+ ### Multi-environments
272
272
 
273
273
  ```bash
274
- # Développement
275
- envsafe run mon-projet --env development -- npm run dev
274
+ # Development
275
+ envsafe run my-project --env development -- npm run dev
276
276
 
277
277
  # Staging
278
- envsafe run mon-projet --env staging -- npm run build
278
+ envsafe run my-project --env staging -- npm run build
279
279
 
280
280
  # Production
281
- envsafe run mon-projet --env production -- npm start
281
+ envsafe run my-project --env production -- npm start
282
282
  ```
283
283
 
284
284
  ---
285
285
 
286
- ## 🔐 Sécurité
286
+ ## 🔐 Security
287
287
 
288
- EnvSafe utilise une architecture de chiffrement de bout en bout :
288
+ EnvSafe uses end-to-end encryption architecture:
289
289
 
290
- - **Chiffrement des variables** : AES-256-GCM
291
- - **Gestion des clés** : RSA-2048 avec chiffrement asymétrique
292
- - **Transport** : TLS 1.3
293
- - **Zero Knowledge** : Vos clés privées ne quittent jamais votre machine
290
+ - **Variable Encryption**: AES-256-GCM
291
+ - **Key Management**: RSA-2048 with asymmetric encryption
292
+ - **Transport**: TLS 1.3
293
+ - **Zero Knowledge**: Your private keys never leave your machine
294
294
 
295
- ### Bonnes pratiques
295
+ ### Best Practices
296
296
 
297
- **À faire :**
298
- - Utilisez `ENVSAFE_TOKEN` en CI/CD
299
- - Configurez des dates d'expiration pour vos tokens
300
- - Privilégiez `envsafe run` pour éviter les fichiers .env
301
- - Révoquez immédiatement les tokens compromis
297
+ **Do:**
298
+ - Use `ENVSAFE_TOKEN` in CI/CD
299
+ - Set expiration dates for your tokens
300
+ - Prefer `envsafe run` to avoid .env files
301
+ - Immediately revoke compromised tokens
302
302
 
303
- **À éviter :**
304
- - Ne commitez jamais vos tokens dans Git
305
- - N'utilisez pas `--token` en ligne de commande (visible dans l'historique)
306
- - Ne partagez pas vos tokens par email/Slack
303
+ **Don't:**
304
+ - Never commit your tokens to Git
305
+ - Do not use `--token` in the command line (visible in history)
306
+ - Do not share your tokens via email/Slack
307
307
 
308
308
  ---
309
309
 
310
- ## 🌍 Variables d'environnement
310
+ ## 🌍 Environment Variables
311
311
 
312
- | Variable | Description | Exemple |
312
+ | Variable | Description | Example |
313
313
  |----------|-------------|---------|
314
- | `ENVSAFE_TOKEN` | Token d'authentification (recommandé en CI/CD) | `es_live_xxx...` |
315
- | `ENVSAFE_API_URL` | URL de l'API (pour instances self-hosted) | `https://api.example.com` |
314
+ | `ENVSAFE_TOKEN` | Authentication Token (recommended in CI/CD) | `es_live_xxx...` |
315
+ | `ENVSAFE_API_URL` | API URL (for self-hosted instances) | `https://api.example.com` |
316
316
 
317
317
  ---
318
318
 
319
- ## 📚 Documentation complète
319
+ ## 📚 Complete Documentation
320
320
 
321
- Pour plus d'informations, consultez la [documentation officielle](https://www.envsafe.dev/docs).
321
+ For more information, check out the [official documentation](https://www.envsafe.dev/docs).
322
322
 
323
323
  ---
324
324
 
325
- ## 🐛 Signaler un bug
325
+ ## 🐛 Report a Bug
326
326
 
327
- Si vous rencontrez un problème, [ouvrez une issue](https://github.com/Ifiboys/envsafe-cli/issues).
327
+ If you encounter an issue, [open an issue](https://github.com/Ifiboys/envsafe-cli/issues).
328
328
 
329
329
  ---
330
330
 
331
- ## 📄 Licence
331
+ ## 📄 License
332
332
 
333
333
  MIT © EnvSafe Team
334
334
 
335
335
  ---
336
336
 
337
- ## 🤝 Contribuer
337
+ ## 🤝 Contributing
338
338
 
339
- Les contributions sont les bienvenues ! Consultez notre [guide de contribution](CONTRIBUTING.md).
339
+ Contributions are welcome! Check out our [contribution guide](CONTRIBUTING.md).
340
340
 
341
341
  ---
342
342
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envsafes-org/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "CLI pour EnvSafe - Gestionnaire sécurisé de variables d'environnement",
5
5
  "main": "dist/index.js",
6
6
  "bin": {