@envmanager-cli/cli 0.1.5 → 0.1.6
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 +12 -1
- package/dist/bin/envmanager.js +4 -4
- package/dist/bin/envmanager.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ envmanager diff
|
|
|
44
44
|
| `template` | Manage .env templates |
|
|
45
45
|
| `validate` | Validate against schema |
|
|
46
46
|
| `completion` | Generate shell completion script |
|
|
47
|
+
| `debug` | Collect diagnostic info for troubleshooting |
|
|
47
48
|
|
|
48
49
|
## Shell Completion
|
|
49
50
|
|
|
@@ -91,9 +92,19 @@ envmanager pull --project 1 --environment development
|
|
|
91
92
|
envmanager pull --project my-api --environment production
|
|
92
93
|
```
|
|
93
94
|
|
|
95
|
+
### Default Environment
|
|
96
|
+
|
|
97
|
+
When `-e` / `--environment` is omitted, it defaults to `development`. You can override the default in `envmanager.json`:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"environment": "staging"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
94
105
|
### Multiple Organizations
|
|
95
106
|
|
|
96
|
-
If you belong to multiple organizations,
|
|
107
|
+
If you belong to multiple organizations, the CLI auto-detects the organization from your project when possible. Use `--org` to specify explicitly if needed:
|
|
97
108
|
|
|
98
109
|
```bash
|
|
99
110
|
envmanager pull --org "My Company" --project 1 --environment staging
|
package/dist/bin/envmanager.js
CHANGED
|
@@ -1287,7 +1287,7 @@ var diffCommand = new Command6("diff").description("Show differences between loc
|
|
|
1287
1287
|
import { Command as Command7 } from "commander";
|
|
1288
1288
|
import chalk8 from "chalk";
|
|
1289
1289
|
import ora6 from "ora";
|
|
1290
|
-
var listCommand = new Command7("list").description("List projects, environments, or variables").argument("[resource]", "Resource to list: projects, environments, variables", "projects").option("--org <name>", "Organization name (required if you belong to multiple)").option("-p, --project <name-or-id>", "Project name or ID (for environments/variables)").option("-e, --environment <name>",
|
|
1290
|
+
var listCommand = new Command7("list").description("List projects, environments, or variables").argument("[resource]", "Resource to list: projects, environments, variables", "projects").option("--org <name>", "Organization name (required if you belong to multiple)").option("-p, --project <name-or-id>", "Project name or ID (for environments/variables)").option("-e, --environment <name>", 'Environment name (default: "development")').option("-v, --verbose", "Show IDs").action(async (resource, options) => {
|
|
1291
1291
|
const spinner = ora6("Connecting...").start();
|
|
1292
1292
|
try {
|
|
1293
1293
|
const config = loadConfig();
|
|
@@ -2234,7 +2234,7 @@ import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, existsS
|
|
|
2234
2234
|
import { resolve as resolve6 } from "path";
|
|
2235
2235
|
import { parse as parseDotenv4 } from "dotenv";
|
|
2236
2236
|
var templateCommand = new Command11("template").description("Manage environment templates");
|
|
2237
|
-
templateCommand.command("generate").description("Generate .env file from template and EnvManager values").option("-t, --template <file>", "Template file (default: .env.template or .env.template.yaml)").option("-o, --output <file>", "Output file (default: .env)").option("-e, --environment <name>",
|
|
2237
|
+
templateCommand.command("generate").description("Generate .env file from template and EnvManager values").option("-t, --template <file>", "Template file (default: .env.template or .env.template.yaml)").option("-o, --output <file>", "Output file (default: .env)").option("-e, --environment <name>", 'Environment name (default: "development")').option("-p, --project <id>", "Project ID (default: from config)").option("-f, --force", "Overwrite existing output file").action(async (options) => {
|
|
2238
2238
|
const spinner = ora9("Generating .env from template...").start();
|
|
2239
2239
|
try {
|
|
2240
2240
|
const config = loadConfig();
|
|
@@ -2336,7 +2336,7 @@ File ${outputPath} already exists. Use --force to overwrite.`));
|
|
|
2336
2336
|
process.exit(1);
|
|
2337
2337
|
}
|
|
2338
2338
|
});
|
|
2339
|
-
templateCommand.command("sync").description("Compare template with EnvManager and report differences").option("-t, --template <file>", "Template file (default: .env.template or .env.template.yaml)").option("-e, --environment <name>",
|
|
2339
|
+
templateCommand.command("sync").description("Compare template with EnvManager and report differences").option("-t, --template <file>", "Template file (default: .env.template or .env.template.yaml)").option("-e, --environment <name>", 'Environment name (default: "development")').option("-p, --project <id>", "Project ID (default: from config)").action(async (options) => {
|
|
2340
2340
|
const spinner = ora9("Comparing template with EnvManager...").start();
|
|
2341
2341
|
try {
|
|
2342
2342
|
const config = loadConfig();
|
|
@@ -2652,7 +2652,7 @@ function jsonToSchema(json) {
|
|
|
2652
2652
|
}
|
|
2653
2653
|
|
|
2654
2654
|
// src/commands/validate.ts
|
|
2655
|
-
var validateCommand = new Command12("validate").description("Validate local .env file against schema from EnvManager or local file").option("-e, --environment <name>",
|
|
2655
|
+
var validateCommand = new Command12("validate").description("Validate local .env file against schema from EnvManager or local file").option("-e, --environment <name>", 'Environment name (default: "development")').option("-p, --project <id>", "Project ID (default: from config)").option("--org <name>", "Organization name (required if you belong to multiple)").option("-i, --input <file>", "Input .env file (default: .env)").option("-s, --schema <file>", "Local schema JSON file (skip fetching from EnvManager)").option("--strict", "Fail on warnings (extra variables not in schema)").action(async (options) => {
|
|
2656
2656
|
const spinner = ora10("Validating environment...").start();
|
|
2657
2657
|
try {
|
|
2658
2658
|
const config = loadConfig();
|