@optiqcode/cli 1.3.0 → 1.5.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.
@@ -3,7 +3,7 @@ import axios from 'axios';
3
3
  import chalk from 'chalk';
4
4
  import ora from 'ora';
5
5
  import { getConfig, saveConfig, clearConfig } from '../utils/config.js';
6
- const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'http://localhost:3002/api';
6
+ const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'https://api.optiqcode.com/api';
7
7
  export async function login() {
8
8
  // Test comment: verifying incremental indexing works correctly
9
9
  console.log(chalk.blue('šŸ” Login to Optiq\n'));
@@ -6,7 +6,7 @@ import path from 'path';
6
6
  import fs from 'fs/promises';
7
7
  import { getConfig } from '../utils/config.js';
8
8
  import { isValidDirectory, getGitIgnorePatterns, shouldIgnoreFile } from '../utils/files.js';
9
- const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'http://localhost:3002/api';
9
+ const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'https://api.optiqcode.com/api';
10
10
  export async function index(options) {
11
11
  const config = await getConfig();
12
12
  if (!config) {
@@ -6,7 +6,7 @@ import path from 'path';
6
6
  import fs from 'fs/promises';
7
7
  import { getConfig } from '../utils/config.js';
8
8
  import { isValidDirectory, getGitIgnorePatterns, shouldIgnoreFile } from '../utils/files.js';
9
- const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'http://localhost:3002/api';
9
+ const API_URL = process.env.OPTIQ_BACKEND_URL ? `${process.env.OPTIQ_BACKEND_URL}/api` : 'https://api.optiqcode.com/api';
10
10
  export async function watch(options) {
11
11
  const config = await getConfig();
12
12
  if (!config) {
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import fs from 'fs/promises';
9
9
  import logUpdate from 'log-update';
10
10
  import { getConfig, saveConfig } from './utils/config.js';
11
11
  import { isValidDirectory, getGitIgnorePatterns, shouldIgnoreFile } from './utils/files.js';
12
- const BACKEND_URL = process.env.OPTIQ_BACKEND_URL || 'http://localhost:3002';
12
+ const BACKEND_URL = process.env.OPTIQ_BACKEND_URL || 'https://api.optiqcode.com';
13
13
  async function showBanner() {
14
14
  console.clear();
15
15
  console.log(chalk.white.bold(`
@@ -144,6 +144,7 @@ async function main() {
144
144
  choices: [
145
145
  { title: 'šŸ‘€ Watch and auto-index changes', value: 'watch' },
146
146
  { title: 'šŸ“¦ Index once', value: 'index' },
147
+ { title: 'šŸ”‘ Show API Key', value: 'show-api-key' },
147
148
  { title: '🚪 Logout', value: 'logout' },
148
149
  { title: 'āŒ Exit', value: 'exit' },
149
150
  ],
@@ -152,6 +153,13 @@ async function main() {
152
153
  console.log(chalk.gray('\nGoodbye!'));
153
154
  process.exit(0);
154
155
  }
156
+ if (action === 'show-api-key') {
157
+ console.log(chalk.white('\nšŸ”‘ Your Context Engine API Key:\n'));
158
+ console.log(chalk.white.bold(config.apiKey || 'No API key found'));
159
+ console.log(chalk.gray('\nUse this key to configure the Optiq MCP server or make API calls.'));
160
+ console.log(chalk.gray('Keep this key secret and never share it publicly.\n'));
161
+ process.exit(0);
162
+ }
155
163
  if (action === 'logout') {
156
164
  const { clearConfig } = await import('./utils/config.js');
157
165
  await clearConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optiqcode/cli",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "CLI tool for Optiq - automatic code indexing and context engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",