{"record":{"id":"d315012ea4966092","repo":"jackwener/OpenCLI","slug":"antigravity-state-keys-no-keys-match-flt","errorCode":null,"errorMessage":"antigravity state-keys: No keys match \"${flt}\".","messagePattern":"antigravity state-keys: No keys match \"(.+?)\"\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/antigravity/storage.js","lineNumber":213,"sourceCode":"    site: 'antigravity',\n    name: 'state-keys',\n    access: 'read',\n    description: 'List keys in Antigravity\\'s globalStorage state.vscdb (VSCode-style). Pass --workspace <id> to query a per-workspace DB. Works while Antigravity is closed.',\n    domain: 'localhost',\n    strategy: Strategy.LOCAL,\n    browser: false,\n    args: [\n        { name: 'filter', required: false, help: 'Case-insensitive substring filter over keys' },\n        { name: 'workspace', required: false, help: 'Workspace id (from workspaces-list) to query per-workspace DB' },\n        { name: 'limit', type: 'int', required: false, default: 200, help: 'Max rows to return' },\n    ],\n    columns: STORAGE_COLUMNS,\n    func: async (args) => {\n        const db = resolveStateDb(args);\n        const keys = listKeys(db);\n        const flt = args?.filter ? String(args.filter).toLowerCase() : null;\n        const filtered = flt ? keys.filter((k) => k.toLowerCase().includes(flt)) : keys;\n        if (!filtered.length) throw new EmptyResultError('antigravity state-keys', flt ? `No keys match \"${flt}\".` : 'No keys.');\n        const limit = Number.isInteger(args?.limit) && args.limit > 0 ? args.limit : 200;\n        return filtered.slice(0, limit).map((k, i) => ({ Index: i + 1, Key: k }));\n    },\n});\n\n// ====== FS-side: state-get ======\ncli({\n    site: 'antigravity',\n    name: 'state-get',\n    access: 'read',\n    description: 'Read one value from Antigravity\\'s state.vscdb. Pass --workspace <id> for per-workspace.',\n    domain: 'localhost',\n    strategy: Strategy.LOCAL,\n    browser: false,\n    args: [\n        { name: 'key', positional: true, required: true, help: 'Storage key name' },\n        { name: 'workspace', required: false, help: 'Workspace id (from workspaces-list) to query per-workspace DB' },\n        { name: 'max-bytes', type: 'int', required: false, default: 8000, help: 'Truncate value to this many chars' },","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/antigravity/storage.js#L195-L231","documentation":"state-keys resolved the state.vscdb (global or per-workspace), listed all ItemTable keys via sqlite3, applied the case-insensitive --filter, and found zero matches — so EmptyResultError is thrown. The message distinguishes a filtered miss ('No keys match \"<flt>\"') from a genuinely empty DB ('No keys.').","triggerScenarios":"`opencli antigravity state-keys --filter workbench.x` where no ItemTable key contains that substring, or filtering a per-workspace DB (--workspace) whose key set differs from the global DB's.","commonSituations":"Filtering with the full key while keys carry different prefixes/casing, querying a fresh workspace DB that has almost no keys, or expecting settings.json values (use settings-read) when they are not stored in ItemTable.","solutions":["Run without --filter to see every key, then narrow.","Shorten the filter to a small distinctive substring (e.g. 'history').","Drop --workspace to search the global DB, or add it to search the workspace DB — the key sets differ.","If looking for user settings, use `opencli antigravity settings-read` instead."],"exampleFix":"// before\nopencli antigravity state-keys --filter history.recentlyOpenedPathsList\n// after\nopencli antigravity state-keys --filter history","handlingStrategy":"fallback","validationCode":"// Confirm the filter substring exists in the unfiltered key list first\nconst all = execSync('opencli antigravity state-keys', {encoding:'utf8'});\nconst flt = 'history';\nif (!all.toLowerCase().includes(flt.toLowerCase())) console.warn(`filter \"${flt}\" matches nothing; falling back to full list`);","typeGuard":"function filterMatchesAnyKey(keys, filter) {\n  return Array.isArray(keys) && keys.some((k) => k.toLowerCase().includes(String(filter).toLowerCase()));\n}","tryCatchPattern":"try {\n  run(`opencli antigravity state-keys --filter ${flt}`);\n} catch (e) {\n  if (/No keys match/.test(e.message)) {\n    run('opencli antigravity state-keys'); // unfiltered fallback\n  } else throw e;\n}","preventionTips":["Discover the full key list before narrowing with --filter.","Use short distinctive substrings, not full dotted key names.","Remember workspace DBs (—workspace) have a different, smaller key set than the global DB.","User settings live in settings.json — use settings-read, not state-keys."],"tags":["empty-result","filter","sqlite","antigravity"],"backgroundTag":"no-results-for-filter","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}