@envpilot/cli 0.1.1 → 1.1.0
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.
- package/README.md +13 -13
- package/dist/index.js +19 -6
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -40,19 +40,19 @@ envpilot push
|
|
|
40
40
|
|
|
41
41
|
## Commands
|
|
42
42
|
|
|
43
|
-
| Command
|
|
44
|
-
|
|
45
|
-
| `envpilot login`
|
|
46
|
-
| `envpilot logout`
|
|
47
|
-
| `envpilot init`
|
|
48
|
-
| `envpilot pull`
|
|
49
|
-
| `envpilot push`
|
|
50
|
-
| `envpilot list orgs`
|
|
51
|
-
| `envpilot list projects`
|
|
52
|
-
| `envpilot list variables` | List variables in the active project
|
|
53
|
-
| `envpilot switch`
|
|
54
|
-
| `envpilot config`
|
|
55
|
-
| `envpilot whoami`
|
|
43
|
+
| Command | Description |
|
|
44
|
+
| ------------------------- | --------------------------------------------------- |
|
|
45
|
+
| `envpilot login` | Authenticate with your Envpilot account |
|
|
46
|
+
| `envpilot logout` | Log out and clear stored credentials |
|
|
47
|
+
| `envpilot init` | Link the current directory to an Envpilot project |
|
|
48
|
+
| `envpilot pull` | Pull environment variables into a local `.env` file |
|
|
49
|
+
| `envpilot push` | Push local `.env` changes to Envpilot |
|
|
50
|
+
| `envpilot list orgs` | List your organizations |
|
|
51
|
+
| `envpilot list projects` | List projects in the active organization |
|
|
52
|
+
| `envpilot list variables` | List variables in the active project |
|
|
53
|
+
| `envpilot switch` | Switch the active project |
|
|
54
|
+
| `envpilot config` | View or update CLI configuration |
|
|
55
|
+
| `envpilot whoami` | Show the currently authenticated user |
|
|
56
56
|
|
|
57
57
|
## Role-Based Access
|
|
58
58
|
|
package/dist/index.js
CHANGED
|
@@ -403,11 +403,14 @@ var APIClient = class {
|
|
|
403
403
|
/**
|
|
404
404
|
* List variables in a project
|
|
405
405
|
*/
|
|
406
|
-
async listVariables(projectId, environment) {
|
|
406
|
+
async listVariables(projectId, environment, organizationId) {
|
|
407
407
|
const params = { projectId };
|
|
408
408
|
if (environment) {
|
|
409
409
|
params.environment = environment;
|
|
410
410
|
}
|
|
411
|
+
if (organizationId) {
|
|
412
|
+
params.organizationId = organizationId;
|
|
413
|
+
}
|
|
411
414
|
const response = await this.get(
|
|
412
415
|
"/api/cli/variables",
|
|
413
416
|
params
|
|
@@ -1067,7 +1070,10 @@ var pullCommand = new Command3("pull").description("Download environment variabl
|
|
|
1067
1070
|
async () => {
|
|
1068
1071
|
const response = await api.get("/api/cli/variables", {
|
|
1069
1072
|
projectId: projectConfig.projectId,
|
|
1070
|
-
environment
|
|
1073
|
+
environment,
|
|
1074
|
+
...projectConfig.organizationId && {
|
|
1075
|
+
organizationId: projectConfig.organizationId
|
|
1076
|
+
}
|
|
1071
1077
|
});
|
|
1072
1078
|
metaProjectRole = response.meta?.projectRole;
|
|
1073
1079
|
return response.data || [];
|
|
@@ -1284,10 +1290,14 @@ var pushCommand = new Command4("push").description("Upload local .env file to cl
|
|
|
1284
1290
|
const remoteVariables = await withSpinner(
|
|
1285
1291
|
"Fetching current variables...",
|
|
1286
1292
|
async () => {
|
|
1287
|
-
const
|
|
1293
|
+
const params = {
|
|
1288
1294
|
projectId: projectConfig.projectId,
|
|
1289
1295
|
environment
|
|
1290
|
-
}
|
|
1296
|
+
};
|
|
1297
|
+
if (projectConfig.organizationId) {
|
|
1298
|
+
params.organizationId = projectConfig.organizationId;
|
|
1299
|
+
}
|
|
1300
|
+
const response = await api.get("/api/cli/variables", params);
|
|
1291
1301
|
return response.data || [];
|
|
1292
1302
|
}
|
|
1293
1303
|
);
|
|
@@ -1355,7 +1365,10 @@ var pushCommand = new Command4("push").description("Upload local .env file to cl
|
|
|
1355
1365
|
key,
|
|
1356
1366
|
value
|
|
1357
1367
|
})),
|
|
1358
|
-
mode
|
|
1368
|
+
mode,
|
|
1369
|
+
...projectConfig.organizationId && {
|
|
1370
|
+
organizationId: projectConfig.organizationId
|
|
1371
|
+
}
|
|
1359
1372
|
});
|
|
1360
1373
|
return response.data;
|
|
1361
1374
|
}
|
|
@@ -2030,7 +2043,7 @@ var logoutCommand = new Command8("logout").description("Log out from Envpilot").
|
|
|
2030
2043
|
|
|
2031
2044
|
// src/index.ts
|
|
2032
2045
|
var program = new Command9();
|
|
2033
|
-
program.name("envpilot").description("Envpilot CLI - Sync, secure, and share environment variables").version("
|
|
2046
|
+
program.name("envpilot").description("Envpilot CLI - Sync, secure, and share environment variables").version("1.0.0");
|
|
2034
2047
|
program.addCommand(loginCommand);
|
|
2035
2048
|
program.addCommand(logoutCommand);
|
|
2036
2049
|
program.addCommand(initCommand);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envpilot/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "CLI
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Envpilot CLI — sync and manage environment variables from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"envpilot": "./dist/index.js"
|
|
@@ -51,11 +51,14 @@
|
|
|
51
51
|
"dotenv",
|
|
52
52
|
"secrets"
|
|
53
53
|
],
|
|
54
|
-
"author": "",
|
|
54
|
+
"author": "Envpilot <hello@envpilot.dev> (https://www.envpilot.dev)",
|
|
55
55
|
"license": "UNLICENSED",
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
58
58
|
"url": "https://github.com/rafay99-epic/envpilot.dev"
|
|
59
59
|
},
|
|
60
|
-
"homepage": "https://www.envpilot.dev"
|
|
60
|
+
"homepage": "https://www.envpilot.dev",
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/rafay99-epic/envpilot.dev/issues"
|
|
63
|
+
}
|
|
61
64
|
}
|