@moduna/qcp 0.1.2 → 0.1.3-alpha.1
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 +3 -3
- package/dist/index.js +11 -11
- package/dist/qcp.js +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,9 +174,9 @@ qcp ask "question" --yes # Skip approval prompts
|
|
|
174
174
|
|
|
175
175
|
| Provider | Default Model | API Key |
|
|
176
176
|
|---|---|---|
|
|
177
|
-
| **Gemini** (default) | `gemini-
|
|
178
|
-
| **OpenAI** | `gpt-
|
|
179
|
-
| **Anthropic** | `claude-opus-4-
|
|
177
|
+
| **Gemini** (default) | `gemini-3.5-flash` | [Google AI Studio](https://aistudio.google.com/app/apikey) |
|
|
178
|
+
| **OpenAI** | `gpt-5.5` | [OpenAI Platform](https://platform.openai.com/api-keys) |
|
|
179
|
+
| **Anthropic** | `claude-opus-4-8` | [Anthropic Console](https://console.anthropic.com) |
|
|
180
180
|
| **Ollama** | `qwen3` | No key needed (local) |
|
|
181
181
|
|
|
182
182
|
---
|
package/dist/index.js
CHANGED
|
@@ -2333,8 +2333,8 @@ function printError(message, detail) {
|
|
|
2333
2333
|
console.error(source_default.red(`
|
|
2334
2334
|
✗ Error: `) + source_default.white(message));
|
|
2335
2335
|
if (detail) {
|
|
2336
|
-
console.error(source_default.dim(
|
|
2337
|
-
`)));
|
|
2336
|
+
console.error(source_default.dim(` ${detail.replace(/\n/g, `
|
|
2337
|
+
`)}`));
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
function printSuccess(message) {
|
|
@@ -2360,7 +2360,7 @@ function printDoctorCheck(name, status, value2) {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
function printSection(title) {
|
|
2362
2362
|
console.log(`
|
|
2363
|
-
|
|
2363
|
+
${source_default.bold.white(`${title}:`)}`);
|
|
2364
2364
|
}
|
|
2365
2365
|
var import_cli_table3;
|
|
2366
2366
|
var init_output = __esm(() => {
|
|
@@ -2373,7 +2373,7 @@ var package_default;
|
|
|
2373
2373
|
var init_package = __esm(() => {
|
|
2374
2374
|
package_default = {
|
|
2375
2375
|
name: "@moduna/qcp",
|
|
2376
|
-
version: "0.1.
|
|
2376
|
+
version: "0.1.3-alpha.1",
|
|
2377
2377
|
description: "AI-powered CLI for querying PostgreSQL in natural language",
|
|
2378
2378
|
type: "module",
|
|
2379
2379
|
bin: {
|
|
@@ -44815,7 +44815,7 @@ var init_src = __esm(() => {
|
|
|
44815
44815
|
});
|
|
44816
44816
|
|
|
44817
44817
|
// src/schema/index.ts
|
|
44818
|
-
import { existsSync as existsSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
44818
|
+
import { existsSync as existsSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
44819
44819
|
async function scanSchema(databaseUrl) {
|
|
44820
44820
|
const db = src_default(databaseUrl, {
|
|
44821
44821
|
max: 2,
|
|
@@ -60131,7 +60131,7 @@ var init_index_node = __esm(() => {
|
|
|
60131
60131
|
});
|
|
60132
60132
|
|
|
60133
60133
|
// src/telemetry/index.ts
|
|
60134
|
-
import { arch, platform } from "os";
|
|
60134
|
+
import { arch, platform } from "node:os";
|
|
60135
60135
|
function initTelemetry(config2) {
|
|
60136
60136
|
_config = config2;
|
|
60137
60137
|
if (!config2.telemetry)
|
|
@@ -60404,8 +60404,8 @@ var exports_init = {};
|
|
|
60404
60404
|
__export(exports_init, {
|
|
60405
60405
|
initCommand: () => initCommand
|
|
60406
60406
|
});
|
|
60407
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
60408
|
-
import { isatty } from "tty";
|
|
60407
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
60408
|
+
import { isatty } from "node:tty";
|
|
60409
60409
|
async function initCommand() {
|
|
60410
60410
|
printBanner();
|
|
60411
60411
|
ensureConfigDir();
|
|
@@ -60464,7 +60464,7 @@ async function initCommand() {
|
|
|
60464
60464
|
}
|
|
60465
60465
|
const gitignorePath = ".gitignore";
|
|
60466
60466
|
if (existsSync3(gitignorePath)) {
|
|
60467
|
-
const { default: fs6 } = await import("fs");
|
|
60467
|
+
const { default: fs6 } = await import("node:fs");
|
|
60468
60468
|
const existing = fs6.readFileSync(gitignorePath, "utf-8");
|
|
60469
60469
|
if (!existing.includes(".qcp/")) {
|
|
60470
60470
|
printWarning("Consider adding .qcp/ to your .gitignore to avoid committing schema data.");
|
|
@@ -79881,7 +79881,7 @@ async function chatCommand(options = {}) {
|
|
|
79881
79881
|
try {
|
|
79882
79882
|
schema = loadSchema();
|
|
79883
79883
|
schemaSpinner.succeed(`Schema loaded · ${schema.databaseName} · ${schema.tableCount} tables`);
|
|
79884
|
-
} catch (
|
|
79884
|
+
} catch (_2) {
|
|
79885
79885
|
schemaSpinner.fail("Schema not found. Run: qcp schema scan");
|
|
79886
79886
|
await shutdownTelemetry();
|
|
79887
79887
|
process.exit(1);
|
|
@@ -80169,7 +80169,7 @@ async function explainCommand(question, options = {}) {
|
|
|
80169
80169
|
printInfo("This query would be rejected before execution.");
|
|
80170
80170
|
} else {
|
|
80171
80171
|
console.log();
|
|
80172
|
-
printInfo(
|
|
80172
|
+
printInfo(`Run \`qcp ask "${question}"\` to execute this query`);
|
|
80173
80173
|
}
|
|
80174
80174
|
log3("info", "Explain completed", { question });
|
|
80175
80175
|
await shutdownTelemetry();
|
package/dist/qcp.js
CHANGED
|
@@ -2333,8 +2333,8 @@ function printError(message, detail) {
|
|
|
2333
2333
|
console.error(source_default.red(`
|
|
2334
2334
|
✗ Error: `) + source_default.white(message));
|
|
2335
2335
|
if (detail) {
|
|
2336
|
-
console.error(source_default.dim(
|
|
2337
|
-
`)));
|
|
2336
|
+
console.error(source_default.dim(` ${detail.replace(/\n/g, `
|
|
2337
|
+
`)}`));
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
function printSuccess(message) {
|
|
@@ -2360,7 +2360,7 @@ function printDoctorCheck(name, status, value2) {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
function printSection(title) {
|
|
2362
2362
|
console.log(`
|
|
2363
|
-
|
|
2363
|
+
${source_default.bold.white(`${title}:`)}`);
|
|
2364
2364
|
}
|
|
2365
2365
|
var import_cli_table3;
|
|
2366
2366
|
var init_output = __esm(() => {
|
|
@@ -2373,7 +2373,7 @@ var package_default;
|
|
|
2373
2373
|
var init_package = __esm(() => {
|
|
2374
2374
|
package_default = {
|
|
2375
2375
|
name: "@moduna/qcp",
|
|
2376
|
-
version: "0.1.
|
|
2376
|
+
version: "0.1.3-alpha.1",
|
|
2377
2377
|
description: "AI-powered CLI for querying PostgreSQL in natural language",
|
|
2378
2378
|
type: "module",
|
|
2379
2379
|
bin: {
|
|
@@ -44815,7 +44815,7 @@ var init_src = __esm(() => {
|
|
|
44815
44815
|
});
|
|
44816
44816
|
|
|
44817
44817
|
// src/schema/index.ts
|
|
44818
|
-
import { existsSync as existsSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
44818
|
+
import { existsSync as existsSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
44819
44819
|
async function scanSchema(databaseUrl) {
|
|
44820
44820
|
const db = src_default(databaseUrl, {
|
|
44821
44821
|
max: 2,
|
|
@@ -60131,7 +60131,7 @@ var init_index_node = __esm(() => {
|
|
|
60131
60131
|
});
|
|
60132
60132
|
|
|
60133
60133
|
// src/telemetry/index.ts
|
|
60134
|
-
import { arch, platform } from "os";
|
|
60134
|
+
import { arch, platform } from "node:os";
|
|
60135
60135
|
function initTelemetry(config2) {
|
|
60136
60136
|
_config = config2;
|
|
60137
60137
|
if (!config2.telemetry)
|
|
@@ -60404,8 +60404,8 @@ var exports_init = {};
|
|
|
60404
60404
|
__export(exports_init, {
|
|
60405
60405
|
initCommand: () => initCommand
|
|
60406
60406
|
});
|
|
60407
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
60408
|
-
import { isatty } from "tty";
|
|
60407
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
60408
|
+
import { isatty } from "node:tty";
|
|
60409
60409
|
async function initCommand() {
|
|
60410
60410
|
printBanner();
|
|
60411
60411
|
ensureConfigDir();
|
|
@@ -60464,7 +60464,7 @@ async function initCommand() {
|
|
|
60464
60464
|
}
|
|
60465
60465
|
const gitignorePath = ".gitignore";
|
|
60466
60466
|
if (existsSync3(gitignorePath)) {
|
|
60467
|
-
const { default: fs6 } = await import("fs");
|
|
60467
|
+
const { default: fs6 } = await import("node:fs");
|
|
60468
60468
|
const existing = fs6.readFileSync(gitignorePath, "utf-8");
|
|
60469
60469
|
if (!existing.includes(".qcp/")) {
|
|
60470
60470
|
printWarning("Consider adding .qcp/ to your .gitignore to avoid committing schema data.");
|
|
@@ -79881,7 +79881,7 @@ async function chatCommand(options = {}) {
|
|
|
79881
79881
|
try {
|
|
79882
79882
|
schema = loadSchema();
|
|
79883
79883
|
schemaSpinner.succeed(`Schema loaded · ${schema.databaseName} · ${schema.tableCount} tables`);
|
|
79884
|
-
} catch (
|
|
79884
|
+
} catch (_2) {
|
|
79885
79885
|
schemaSpinner.fail("Schema not found. Run: qcp schema scan");
|
|
79886
79886
|
await shutdownTelemetry();
|
|
79887
79887
|
process.exit(1);
|
|
@@ -80169,7 +80169,7 @@ async function explainCommand(question, options = {}) {
|
|
|
80169
80169
|
printInfo("This query would be rejected before execution.");
|
|
80170
80170
|
} else {
|
|
80171
80171
|
console.log();
|
|
80172
|
-
printInfo(
|
|
80172
|
+
printInfo(`Run \`qcp ask "${question}"\` to execute this query`);
|
|
80173
80173
|
}
|
|
80174
80174
|
log3("info", "Explain completed", { question });
|
|
80175
80175
|
await shutdownTelemetry();
|