@enerlence/suntropy-cli 0.11.2 → 0.11.3
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/dist/bin/suntropy.js +3 -3
- package/dist/bin/suntropy.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/suntropy.js
CHANGED
|
@@ -92,9 +92,9 @@ function resolveAuth(opts) {
|
|
|
92
92
|
const config = loadConfig();
|
|
93
93
|
const profile = getActiveProfile(config, opts.profile);
|
|
94
94
|
const server = opts.server || profile.server;
|
|
95
|
-
const token = opts.token || profile.token;
|
|
95
|
+
const token = opts.token || process.env.SUNTROPY_API_KEY || profile.token;
|
|
96
96
|
if (!token) {
|
|
97
|
-
throw new Error("Not authenticated. Run: suntropy auth set-key --key <jwt> or suntropy auth login");
|
|
97
|
+
throw new Error("Not authenticated. Run: suntropy auth set-key --key <jwt> or suntropy auth login, or set the SUNTROPY_API_KEY env var.");
|
|
98
98
|
}
|
|
99
99
|
return { server, token };
|
|
100
100
|
}
|
|
@@ -4598,7 +4598,7 @@ function registerCommandProfileCommand(program2) {
|
|
|
4598
4598
|
}
|
|
4599
4599
|
|
|
4600
4600
|
// src/index.ts
|
|
4601
|
-
var CLI_VERSION = true ? "0.11.
|
|
4601
|
+
var CLI_VERSION = true ? "0.11.3" : "0.0.0-dev";
|
|
4602
4602
|
function createProgram() {
|
|
4603
4603
|
const program2 = new Command3();
|
|
4604
4604
|
program2.name("suntropy").description("Agent-first CLI for Suntropy solar platform. Optimized for programmatic data manipulation and progressive exploration.").version(CLI_VERSION).option("--format <format>", "Output format: json (default), human, csv", "json").option("--fields <fields>", "Comma-separated fields to include in output").option("--server <url>", "Override API server URL").option("--token <jwt>", "Override authentication token").option("--profile <name>", "Use a specific config profile").option("--verbose", "Show HTTP request/response details on stderr").option("--quiet", "Suppress non-data output").option("--save <file>", "Save output to file (also writes to stdout)");
|