mixgram 1.2.0 → 1.2.2

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.
Files changed (2) hide show
  1. package/bin/mixgram.js +22 -0
  2. package/package.json +1 -1
package/bin/mixgram.js CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { run } from '../src/mcp/server.js';
9
9
  import { loadConfig } from '../src/config.js';
10
+ import { closeDb } from '../src/db/sqlite.js';
10
11
  import { createToolHandlers } from '../src/mcp/tools.js';
11
12
  import { getToolByName, listToolNames, parseToolArgs, formatToolHelp } from '../src/mcp/cli-adapter.js';
12
13
  import fs from 'fs';
@@ -217,6 +218,7 @@ Usage: mixgram <command> [options]
217
218
  Commands:
218
219
  mcp [options] Run the MCP server (stdio). Use this in your client config.
219
220
  setup <client> Register Mixgram with an MCP client.
221
+ flushdb Delete the SQLite database file (and WAL/shm).
220
222
  help [tool] Show help; with optional tool name, show options for that tool.
221
223
  -v, --version Print version from package and exit.
222
224
  <tool> [options] Run an MCP tool by name. Tools:
@@ -263,6 +265,26 @@ async function main() {
263
265
  return;
264
266
  }
265
267
 
268
+ if (SUBCOMMAND === 'flushdb') {
269
+ const { overrides, baseDir, projectBaseDir } = loadCliConfig();
270
+ const config = loadConfig(overrides, baseDir, projectBaseDir);
271
+ const dbPath = config.sqlitePath;
272
+ closeDb();
273
+ const removed = [];
274
+ for (const p of [dbPath, dbPath + '-wal', dbPath + '-shm']) {
275
+ if (fs.existsSync(p)) {
276
+ fs.unlinkSync(p);
277
+ removed.push(p);
278
+ }
279
+ }
280
+ if (removed.length) {
281
+ console.log('Removed:', removed.join(', '));
282
+ } else {
283
+ console.log('No database file at', dbPath);
284
+ }
285
+ return;
286
+ }
287
+
266
288
  if (SUBCOMMAND === 'setup') {
267
289
  if (!ARG) {
268
290
  console.error('Usage: mixgram setup <cursor|gemini-cli|codex>');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mixgram",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "MCP memory server with Markdown source of truth and SQLite FTS5.",
5
5
  "keywords": [
6
6
  "mcp",