lsh-framework 0.10.0 ā 0.10.1
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.
|
@@ -170,13 +170,22 @@ export async function init_secrets(program) {
|
|
|
170
170
|
program
|
|
171
171
|
.command('key')
|
|
172
172
|
.description('Generate a new encryption key')
|
|
173
|
-
.
|
|
173
|
+
.option('--export', 'Output in export format for shell evaluation')
|
|
174
|
+
.action(async (options) => {
|
|
174
175
|
const { randomBytes } = await import('crypto');
|
|
175
176
|
const key = randomBytes(32).toString('hex');
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
if (options.export) {
|
|
178
|
+
// Just output the export statement for eval
|
|
179
|
+
console.log(`export LSH_SECRETS_KEY='${key}'`);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
// Interactive output with tips
|
|
183
|
+
console.log('\nš New encryption key (add to your .env):\n');
|
|
184
|
+
console.log(`export LSH_SECRETS_KEY='${key}'\n`);
|
|
185
|
+
console.log('š” Tip: Share this key securely with your team to sync secrets.');
|
|
186
|
+
console.log(' Never commit it to git!\n');
|
|
187
|
+
console.log('š” To load immediately: eval "$(lsh key --export)"\n');
|
|
188
|
+
}
|
|
180
189
|
});
|
|
181
190
|
// Create .env file
|
|
182
191
|
program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lsh-framework",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Encrypted secrets manager with automatic rotation, team sync, and multi-environment support. Built on a powerful shell with daemon scheduling and CI/CD integration.",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"bin": {
|