ai-cmds 0.5.0 → 0.6.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
CHANGED
|
@@ -193,7 +193,7 @@ ai-cmds set-global-envs
|
|
|
193
193
|
**Behavior:**
|
|
194
194
|
- Creates `~/.config/ai-cmds/.env` with commented-out placeholders for `OPENAI_API_KEY`, `GOOGLE_GENERATIVE_AI_API_KEY`, and `AI_CLI_LOGS_DIR`
|
|
195
195
|
- If the file already exists, reports its location without overwriting
|
|
196
|
-
- The global `.env` is loaded
|
|
196
|
+
- The global `.env` is always loaded first, then the local `.env` overrides any overlapping variables
|
|
197
197
|
|
|
198
198
|
## Review Setups
|
|
199
199
|
|
|
@@ -284,7 +284,7 @@ export default defineConfig({
|
|
|
284
284
|
});
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
By default,
|
|
287
|
+
By default, the global `~/.config/ai-cmds/.env` is loaded first (see [`set-global-envs`](#set-global-envs---global-api-key-setup)), then the local `.env` is loaded and overrides any overlapping variables. This allows you to set shared API keys globally while still customizing per-project.
|
|
288
288
|
|
|
289
289
|
### Configuration Options
|
|
290
290
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as advancedReviewChangesCommand, c as BUILT_IN_SCOPE_OPTIONS, d as createGlobalEnvFile, f as getGlobalEnvPath, i as commitCommand, l as DEFAULT_SCOPES, n as reviewPRCommand, o as reviewCodeChangesCommand, p as globalEnvExists, r as createPRCommand, s as BUILT_IN_SETUP_OPTIONS, t as setGlobalEnvsCommand, u as defineConfig } from "./set-global-envs-
|
|
1
|
+
import { a as advancedReviewChangesCommand, c as BUILT_IN_SCOPE_OPTIONS, d as createGlobalEnvFile, f as getGlobalEnvPath, i as commitCommand, l as DEFAULT_SCOPES, n as reviewPRCommand, o as reviewCodeChangesCommand, p as globalEnvExists, r as createPRCommand, s as BUILT_IN_SETUP_OPTIONS, t as setGlobalEnvsCommand, u as defineConfig } from "./set-global-envs-BnLslyV2.mjs";
|
|
2
2
|
|
|
3
3
|
export { BUILT_IN_SCOPE_OPTIONS, BUILT_IN_SETUP_OPTIONS, DEFAULT_SCOPES, advancedReviewChangesCommand, commitCommand, createGlobalEnvFile, createPRCommand, defineConfig, getGlobalEnvPath, globalEnvExists, reviewCodeChangesCommand, reviewPRCommand, setGlobalEnvsCommand };
|
package/dist/main.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as advancedReviewChangesCommand, i as commitCommand, n as reviewPRCommand, o as reviewCodeChangesCommand, r as createPRCommand, t as setGlobalEnvsCommand } from "./set-global-envs-
|
|
2
|
+
import { a as advancedReviewChangesCommand, i as commitCommand, n as reviewPRCommand, o as reviewCodeChangesCommand, r as createPRCommand, t as setGlobalEnvsCommand } from "./set-global-envs-BnLslyV2.mjs";
|
|
3
3
|
import { createCLI } from "@ls-stack/cli";
|
|
4
4
|
|
|
5
5
|
//#region src/main.ts
|
|
@@ -138,7 +138,9 @@ function loadDotEnvFiles(config, cwd) {
|
|
|
138
138
|
async function loadConfig(cwd = process.cwd()) {
|
|
139
139
|
if (cachedConfig !== void 0) return cachedConfig;
|
|
140
140
|
const configPath = join(cwd, "ai-cmds.config.ts");
|
|
141
|
-
|
|
141
|
+
const defaultEnvPath = join(cwd, ".env");
|
|
142
|
+
loadEnvFile(getGlobalEnvPath());
|
|
143
|
+
loadEnvFile(defaultEnvPath, true);
|
|
142
144
|
if (!existsSync(configPath)) {
|
|
143
145
|
cachedConfig = {};
|
|
144
146
|
return cachedConfig;
|
|
@@ -2885,14 +2887,14 @@ async function getModel(provider) {
|
|
|
2885
2887
|
if (provider === "openai") {
|
|
2886
2888
|
const { openai } = await import("@ai-sdk/openai");
|
|
2887
2889
|
return {
|
|
2888
|
-
model: openai("gpt-
|
|
2889
|
-
label: "gpt-
|
|
2890
|
+
model: openai("gpt-5-mini"),
|
|
2891
|
+
label: "gpt-5-mini"
|
|
2890
2892
|
};
|
|
2891
2893
|
}
|
|
2892
2894
|
const { google } = await import("@ai-sdk/google");
|
|
2893
2895
|
return {
|
|
2894
|
-
model: google("gemini-2.
|
|
2895
|
-
label: "gemini-2.
|
|
2896
|
+
model: google("gemini-2.5-flash"),
|
|
2897
|
+
label: "gemini-2.5-flash"
|
|
2896
2898
|
};
|
|
2897
2899
|
}
|
|
2898
2900
|
async function generatePRContent(params) {
|