@2kw/ai 7.4.0-dev.1 → 7.4.0-dev.4

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 CHANGED
@@ -75,8 +75,8 @@ Explicit API keys always take priority over a stored browser session
75
75
  ```
76
76
 
77
77
  Note: `config get apiKey --json` returns a masked value — stored secrets do
78
- not round-trip through stdout. Scripts needing the raw key should use
79
- `AI_2KW_API_KEY` or read the config file (path shown by `config list`).
78
+ not round-trip through stdout by default. Scripts needing the raw key pass
79
+ `--reveal` (`config get apiKey --reveal`) or use `AI_2KW_API_KEY`.
80
80
 
81
81
  ## Contexts
82
82
 
@@ -86,14 +86,15 @@ export function makeConfigCommand() {
86
86
  .command("get")
87
87
  .description("Get a configuration value")
88
88
  .argument("<key>", `Config key (${ALLOWED_KEYS.join(", ")})`)
89
- .action((key, _opts, command) => {
89
+ .option("--reveal", "Print the API key unmasked (for scripts that need the key itself)")
90
+ .action((key, opts, command) => {
90
91
  const validKey = validateKey(key);
91
92
  const ctx = getActiveContext();
92
93
  const raw = ctx?.[validKey];
93
94
  // A stored "" apiKey stays "" (shown as "(not set)"); only a real key is masked.
94
95
  const value = raw === undefined
95
96
  ? undefined
96
- : validKey === "apiKey" && typeof raw === "string"
97
+ : validKey === "apiKey" && typeof raw === "string" && !opts.reveal
97
98
  ? raw && maskApiKey(raw)
98
99
  : String(raw);
99
100
  if (isJsonOutput(command)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai",
3
- "version": "7.4.0-dev.1",
3
+ "version": "7.4.0-dev.4",
4
4
  "description": "CLI for 2kw.ai — schema-driven document extraction, an OpenAI-compatible EU LLM gateway, transcription, prompts, datasets, and experiments from your terminal or agentic workflows. Ships as 2kw, backbone, and bb.",
5
5
  "keywords": [
6
6
  "cli",