obsidian-quickswitcher-cli 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jorrit200
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,92 @@
1
- # Temporary Holding Version
1
+ # obsidian-quickswitcher-cli (`qsp`)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Run [Quick Switcher++](https://github.com/darlal/obsidian-switcher-plus) queries against a running [Obsidian](https://obsidian.md) instance from the terminal or from Node, and open the results. It uses Quick Switcher++'s own query syntax and ranking: `#` headings, `@` symbols, `>` commands, and so on. Without Quick Switcher++, `--switcher core` uses Obsidian's built-in Quick Switcher instead. Though I highly recommend installing Quick Switcher++, instead of using that option. [darlal](https://github.com/darlal) did amazing work with this plugin, and much of the value of this project is lost when using the built in switcher.
4
+
5
+ ```
6
+ $ qsp --vault notes "#roadmap"
7
+ 0 file Roadmap Projects/Roadmap.md
8
+ 1 heading Roadmap 2027 (H2) Planning.md
9
+
10
+ $ qsp --vault notes --json "#roadmap" # JSON instead
11
+ $ qsp --vault notes open "#roadmap" 1 # open result 1 in Obsidian
12
+ ```
13
+
14
+ ```ts
15
+ import { query, open } from "obsidian-quickswitcher-cli";
16
+
17
+ const results = await query("#roadmap", { vault: "notes" });
18
+ await open("#roadmap", 1, { vault: "notes" });
19
+ ```
20
+
21
+ ## Requirements
22
+
23
+ - Obsidian ≥1.12, running, with its command line interface enabled in the settings.
24
+ - The Quick Switcher++ plugin installed **and enabled** in the vault, unless you use `--switcher core`.
25
+ - Node ≥20.
26
+
27
+ Tested on Linux with Obsidian 1.15.1 and Quick Switcher++ 6.2.0. macOS and Windows are supported in the code but untested.
28
+
29
+ > **Undocumented internals.** Obsidian has no public API for other processes, and Quick Switcher++ has no API at all. qsp talks to Obsidian's CLI socket directly, falling back to the official `obsidian` command if that fails, and drives Quick Switcher++'s own (hidden) switcher. Updates to either can break it. See [docs/DESIGN.md](docs/DESIGN.md).
30
+
31
+ ## Install
32
+
33
+ ```
34
+ npm install -g obsidian-quickswitcher-cli
35
+ ```
36
+
37
+ Or from a clone: `npm install`, then `node dist/bin.js`.
38
+
39
+ ## CLI
40
+
41
+ ```
42
+ qsp [options] <query> list results
43
+ qsp open [options] <query> [n] open result n (default 0)
44
+
45
+ --vault <name> vault name (required unless $QSP_VAULT is set)
46
+ --json JSON output
47
+ --limit <n> max results (default 50)
48
+ --switcher <s> plus (Quick Switcher++) | core (Obsidian's Quick Switcher)
49
+ (default $QSP_SWITCHER, else plus)
50
+ --transport <t> auto | socket | cli (default auto)
51
+ -h, --help show this help
52
+ ```
53
+
54
+ A vault is always required. Without one, Obsidian would pick a vault from the working directory, or open one.
55
+
56
+ `--switcher core` (or `QSP_SWITCHER=core`) queries Obsidian's built-in Quick Switcher, which works whether or not its core plugin is enabled. Its results have the same shape and layout. They're just what that switcher finds: files, aliases, unresolved links and bookmarks, with no headings, symbols or commands. qsp never falls back to it on its own: with the default `plus`, a missing Quick Switcher++ is an error (exit 3).
57
+
58
+ Results go to stdout. Logs and errors go to stderr, so `--json` output is always parseable. Several words form one query (`qsp foo bar` = `qsp "foo bar"`), and `qsp -- open` queries the text "open". `open` doesn't focus the Obsidian window.
59
+
60
+ | exit code | meaning |
61
+ |---|---|
62
+ | 0 | success, including zero results |
63
+ | 1 | usage error, no vault configured, or invalid `$QSP_SWITCHER` |
64
+ | 2 | Obsidian unreachable, or Obsidian reported an error (e.g. unknown vault) |
65
+ | 3 | Quick Switcher++ not installed or not enabled (`plus` switcher) |
66
+ | 4 | `open` index out of range |
67
+
68
+ ## Library
69
+
70
+ ```ts
71
+ query(q: string, opts?: Options): Promise<Result[]>
72
+ open(q: string, n?: number, opts?: Options): Promise<Result> // runs the query and opens result n
73
+
74
+ type Result = { index: number; type: string; title: string; note: string; path: string; level: number | null };
75
+ ```
76
+
77
+ Options: `vault` (default `$QSP_VAULT`), `switcher` (`"plus" | "core"`, default `$QSP_SWITCHER`, then `"plus"`), `limit`, `transport` (`"auto" | "socket" | "cli"`), `log` (receives fallback messages, default `console.error`), `timeoutMs` (default 10000), `socketPath` (default `$QSP_SOCKET`, then Obsidian's location), and `evaluate` (replaces the transport, e.g. in tests).
78
+
79
+ Errors: `RangeError` (no vault, invalid arguments or switcher), `ObsidianUnavailableError`, `ObsidianError`, `QspNotInstalledError` (`.installed` is true when the plugin is only disabled), and `IndexOutOfRangeError`.
80
+
81
+ ## Development
82
+
83
+ ```
84
+ npm test # type check + unit tests, no Obsidian needed (Node ≥22.18)
85
+ QSP_VAULT=<vault> npm run measure # latency against a running Obsidian instance
86
+ ```
87
+
88
+ Requirements: [docs/REQUIREMENTS.md](docs/REQUIREMENTS.md). Design: [docs/DESIGN.md](docs/DESIGN.md).
89
+
90
+ ## License
91
+
92
+ MIT. Not affiliated with Obsidian or Quick Switcher++. Quick Switcher++ is by [darlal](https://github.com/darlal).
package/dist/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "./cli.js";
3
+ const code = await main(process.argv.slice(2), {
4
+ stdout: (s) => process.stdout.write(s),
5
+ stderr: (s) => process.stderr.write(s),
6
+ color: !!process.stdout.isTTY && !process.env.NO_COLOR,
7
+ });
8
+ process.exitCode = code;
@@ -0,0 +1,16 @@
1
+ export declare const QSP_PLUGIN_ID = "darlal-switcher-plus";
2
+ /** "plus": Quick Switcher++ (default). "core": Obsidian's built-in Quick Switcher. */
3
+ export type SwitcherKind = "plus" | "core";
4
+ export type BridgeRequest = {
5
+ switcher?: SwitcherKind;
6
+ } & ({
7
+ action: "query";
8
+ query: string;
9
+ limit: number;
10
+ } | {
11
+ action: "open";
12
+ query: string;
13
+ index: number;
14
+ });
15
+ /** Build the code for one request. Values are inserted only as JSON literals, in a single pass. */
16
+ export declare function bridgeCode(req: BridgeRequest): string;
package/dist/bridge.js ADDED
@@ -0,0 +1,126 @@
1
+ // JavaScript evaluated inside Obsidian (via `obsidian eval`), ported from docs/reference-bridge.ts.
2
+ //
3
+ // One payload handles both actions, so `open` re-runs the query and chooses result n in the same eval
4
+ // (stateless: no "result n of the last query" kept in Obsidian between calls).
5
+ // The payload always returns a JSON string: { results } | { result } | { error, ... }.
6
+ export const QSP_PLUGIN_ID = "darlal-switcher-plus";
7
+ const BRIDGE = String.raw `
8
+ (async () => {
9
+ const ACTION = __ACTION__;
10
+ const QUERY = __QUERY__;
11
+ const INDEX = __INDEX__;
12
+ const LIMIT = __LIMIT__;
13
+ const PLUGIN_ID = __PLUGIN_ID__;
14
+ const SWITCHER = __SWITCHER__;
15
+
16
+ const state = (window.__obsidianQuickswitcherCli ??= { plugin: null, modal: null, creating: null, core: null });
17
+ const CoreModal = app.internalPlugins.getPluginById("switcher")?.instance?.QuickSwitcherModal;
18
+ if (!CoreModal) throw new Error("core Quick Switcher modal not found");
19
+
20
+ let modal;
21
+ if (SWITCHER === "core") {
22
+ // The core switcher's modal works hidden without opening it, even with the core plugin disabled.
23
+ // Recreated when the class changes (Obsidian reloaded the plugin).
24
+ if (state.core?.constructor !== CoreModal) {
25
+ state.core = new CoreModal(app, app.internalPlugins.getPluginById("switcher").instance.options ?? {});
26
+ }
27
+ modal = state.core;
28
+ } else {
29
+ // Hard requirement: Quick Switcher++ installed and enabled (plugins[] only holds enabled plugins).
30
+ const plugin = app.plugins.plugins[PLUGIN_ID];
31
+ if (!plugin) return JSON.stringify({ error: "QSP_NOT_INSTALLED", installed: !!app.plugins.manifests?.[PLUGIN_ID] });
32
+
33
+ if (state.plugin !== plugin) {
34
+ // First call, or the plugin was reloaded: the cached modal belongs to an old instance.
35
+ state.plugin = plugin;
36
+ state.modal = null;
37
+ state.creating = null;
38
+ }
39
+
40
+ // Capture a Quick Switcher++ modal without showing it, once; reuse it across calls.
41
+ if (!state.modal) {
42
+ state.creating ??= (async () => {
43
+ let captured = null;
44
+ const origOpen = CoreModal.prototype.open;
45
+ CoreModal.prototype.open = function () { captured = this; };
46
+ try {
47
+ await app.commands.executeCommandById(PLUGIN_ID + ":switcher-plus:open");
48
+ } finally {
49
+ CoreModal.prototype.open = origOpen;
50
+ }
51
+ if (!captured) throw new Error("could not create a Quick Switcher++ modal");
52
+ captured.exMode.onOpen();
53
+ return captured;
54
+ })();
55
+ try {
56
+ state.modal = await state.creating;
57
+ } finally {
58
+ state.creating = null;
59
+ }
60
+ }
61
+ modal = state.modal;
62
+ }
63
+
64
+ modal.inputEl.value = QUERY;
65
+ const before = modal.chooser.values;
66
+ try {
67
+ modal.updateSuggestions();
68
+ // QS++ headings mode debounces its suggestions (250 ms); flush it.
69
+ modal.exMode?.debouncedGetSuggestions?.run?.();
70
+ } catch (e) {
71
+ // QS++ can throw while rendering a suggestion into the (hidden) list, after the values were set, e.g.
72
+ // for a recent file outside the vault whose parent is null. Only rethrow if no new values were set,
73
+ // so a previous query's values are never returned.
74
+ if (modal.chooser.values === before) throw e;
75
+ }
76
+ // With no matches the core switcher leaves a null "create new note" placeholder: not a result.
77
+ const values = (modal.chooser.values || []).filter(Boolean);
78
+
79
+ const text = (el, sel) => el.querySelector(sel)?.textContent?.trim() ?? "";
80
+ const describe = (v, i) => {
81
+ const el = document.createElement("div");
82
+ try { modal.renderSuggestion(v, el); } catch (e) {}
83
+ const path = v.file?.path ?? "";
84
+ let title = text(el, ".suggestion-title") || el.textContent.trim() || v.file?.basename || "";
85
+ let note = text(el, ".suggestion-note");
86
+ // The core switcher titles a nested file "Folder/name"; QS++ shows "name" with note "Folder/". Match QS++.
87
+ const slash = path.lastIndexOf("/");
88
+ if (SWITCHER === "core" && !note && slash > 0 && title === path.replace(/\.[^./]+$/, "")) {
89
+ note = path.slice(0, slash + 1);
90
+ title = title.slice(slash + 1);
91
+ }
92
+ return {
93
+ index: i,
94
+ type: String(v.type ?? ""),
95
+ title,
96
+ note,
97
+ path,
98
+ level: typeof v.item?.level === "number" ? v.item.level : null,
99
+ };
100
+ };
101
+
102
+ if (ACTION === "open") {
103
+ const v = values[INDEX];
104
+ if (!v) return JSON.stringify({ error: "INDEX_OUT_OF_RANGE", index: INDEX, count: values.length });
105
+ const result = describe(v, INDEX);
106
+ await modal.onChooseSuggestion(v, new KeyboardEvent("keydown", { key: "Enter" }));
107
+ return JSON.stringify({ result });
108
+ }
109
+
110
+ return JSON.stringify({ results: values.slice(0, LIMIT).map(describe) });
111
+ })()
112
+ `;
113
+ /** Build the code for one request. Values are inserted only as JSON literals, in a single pass. */
114
+ export function bridgeCode(req) {
115
+ const values = {
116
+ ACTION: req.action,
117
+ QUERY: req.query,
118
+ INDEX: req.action === "open" ? req.index : 0,
119
+ LIMIT: req.action === "query" ? req.limit : 0,
120
+ PLUGIN_ID: QSP_PLUGIN_ID,
121
+ SWITCHER: req.switcher ?? "plus",
122
+ };
123
+ // One regex pass with a function replacer: "$&" in the query isn't expanded, and a query containing
124
+ // "__INDEX__" can't be mistaken for a later placeholder.
125
+ return BRIDGE.replace(/__(ACTION|QUERY|INDEX|LIMIT|PLUGIN_ID|SWITCHER)__/g, (_m, key) => JSON.stringify(values[key]));
126
+ }
package/dist/cli.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import { open, query, type Options, type Result } from "./index.ts";
2
+ export declare const EXIT: {
3
+ readonly OK: 0;
4
+ readonly USAGE: 1;
5
+ readonly UNAVAILABLE: 2;
6
+ readonly QSP_NOT_INSTALLED: 3;
7
+ readonly INDEX_OUT_OF_RANGE: 4;
8
+ };
9
+ export declare const USAGE = "usage:\n qsp [options] <query> list results\n qsp open [options] <query> [n] open result n (default 0)\n\noptions:\n --vault <name> vault name (required unless $QSP_VAULT is set)\n --json JSON output\n --limit <n> max results (default 50)\n --switcher <s> plus (Quick Switcher++) | core (Obsidian's Quick Switcher)\n (default $QSP_SWITCHER, else plus)\n --transport <t> auto | socket | cli (default auto)\n -h, --help show this help\n\nexit codes: 0 ok (also for zero results), 1 usage error, 2 Obsidian unreachable or\nreported an error, 3 Quick Switcher++ not installed or disabled, 4 index out of range";
10
+ export type Io = {
11
+ stdout: (s: string) => void;
12
+ stderr: (s: string) => void;
13
+ /** Use colours on stdout (TTY and NO_COLOR unset). */
14
+ color: boolean;
15
+ };
16
+ export type Command = {
17
+ kind: "help";
18
+ } | {
19
+ kind: "query";
20
+ query: string;
21
+ json: boolean;
22
+ opts: Options;
23
+ } | {
24
+ kind: "open";
25
+ query: string;
26
+ index: number;
27
+ json: boolean;
28
+ opts: Options;
29
+ };
30
+ export declare class UsageError extends Error {
31
+ }
32
+ /** Parse CLI arguments (without node and script path). Throws UsageError. */
33
+ export declare function parseCommand(args: string[]): Command;
34
+ /** Short human label for a QS++ suggestion type ("headingsList" -> "heading"). */
35
+ export declare function typeLabel(type: string): string;
36
+ /** One aligned line per result: index, type, title, note (or path). */
37
+ export declare function formatResults(results: Result[], color?: boolean): string;
38
+ export declare function formatOpened(r: Result): string;
39
+ /** Run the CLI. Returns the exit code. Results go to stdout; logs and errors only to stderr. */
40
+ export declare function main(args: string[], io: Io, lib?: {
41
+ query: typeof query;
42
+ open: typeof open;
43
+ }): Promise<number>;
package/dist/cli.js ADDED
@@ -0,0 +1,188 @@
1
+ import { parseArgs } from "node:util";
2
+ import { IndexOutOfRangeError, ObsidianError, ObsidianUnavailableError, QspNotInstalledError } from "./errors.js";
3
+ import { DEFAULT_LIMIT, open, query, SWITCHERS } from "./index.js";
4
+ export const EXIT = { OK: 0, USAGE: 1, UNAVAILABLE: 2, QSP_NOT_INSTALLED: 3, INDEX_OUT_OF_RANGE: 4 };
5
+ export const USAGE = `usage:
6
+ qsp [options] <query> list results
7
+ qsp open [options] <query> [n] open result n (default 0)
8
+
9
+ options:
10
+ --vault <name> vault name (required unless $QSP_VAULT is set)
11
+ --json JSON output
12
+ --limit <n> max results (default ${DEFAULT_LIMIT})
13
+ --switcher <s> plus (Quick Switcher++) | core (Obsidian's Quick Switcher)
14
+ (default $QSP_SWITCHER, else plus)
15
+ --transport <t> auto | socket | cli (default auto)
16
+ -h, --help show this help
17
+
18
+ exit codes: 0 ok (also for zero results), 1 usage error, 2 Obsidian unreachable or
19
+ reported an error, 3 Quick Switcher++ not installed or disabled, 4 index out of range`;
20
+ export class UsageError extends Error {
21
+ }
22
+ const TRANSPORTS = ["auto", "socket", "cli"];
23
+ function parseIntArg(name, s, min) {
24
+ if (!/^\d+$/.test(s) || Number(s) < min)
25
+ throw new UsageError(`${name} must be an integer >= ${min}, got "${s}"`);
26
+ return Number(s);
27
+ }
28
+ /** Parse CLI arguments (without node and script path). Throws UsageError. */
29
+ export function parseCommand(args) {
30
+ let parsed;
31
+ try {
32
+ parsed = parseArgs({
33
+ args,
34
+ allowPositionals: true,
35
+ strict: true,
36
+ tokens: true,
37
+ options: {
38
+ vault: { type: "string" },
39
+ json: { type: "boolean" },
40
+ limit: { type: "string" },
41
+ transport: { type: "string" },
42
+ switcher: { type: "string" },
43
+ help: { type: "boolean", short: "h" },
44
+ },
45
+ });
46
+ }
47
+ catch (e) {
48
+ throw new UsageError(e.message);
49
+ }
50
+ const { values, tokens } = parsed;
51
+ if (values.help)
52
+ return { kind: "help" };
53
+ // "open" is the subcommand only as the first positional before any "--" (so `qsp -- open` queries "open").
54
+ const positionals = [];
55
+ let afterTerminator = false;
56
+ for (const t of tokens) {
57
+ if (t.kind === "option-terminator")
58
+ afterTerminator = true;
59
+ else if (t.kind === "positional")
60
+ positionals.push({ value: t.value, afterTerminator });
61
+ }
62
+ const isOpen = positionals.length > 0 && positionals[0].value === "open" && !positionals[0].afterTerminator;
63
+ const rest = (isOpen ? positionals.slice(1) : positionals).map((p) => p.value);
64
+ const opts = {};
65
+ if (values.vault !== undefined) {
66
+ if (!values.vault)
67
+ throw new UsageError("--vault must not be empty");
68
+ opts.vault = values.vault;
69
+ }
70
+ if (values.transport !== undefined) {
71
+ if (!TRANSPORTS.includes(values.transport)) {
72
+ throw new UsageError(`--transport must be one of ${TRANSPORTS.join(", ")}, got "${values.transport}"`);
73
+ }
74
+ opts.transport = values.transport;
75
+ }
76
+ if (values.switcher !== undefined) {
77
+ if (!SWITCHERS.includes(values.switcher)) {
78
+ throw new UsageError(`--switcher must be one of ${SWITCHERS.join(", ")}, got "${values.switcher}"`);
79
+ }
80
+ opts.switcher = values.switcher;
81
+ }
82
+ if (values.limit !== undefined) {
83
+ if (isOpen)
84
+ throw new UsageError("--limit only applies to listing results");
85
+ opts.limit = parseIntArg("--limit", values.limit, 1);
86
+ }
87
+ const json = !!values.json;
88
+ if (!isOpen) {
89
+ if (rest.length === 0)
90
+ throw new UsageError("missing <query>");
91
+ return { kind: "query", query: rest.join(" "), json, opts };
92
+ }
93
+ if (rest.length === 0)
94
+ throw new UsageError("missing <query> for open");
95
+ let index = 0;
96
+ if (rest.length >= 2) {
97
+ index = parseIntArg("n", rest.pop(), 0);
98
+ }
99
+ return { kind: "open", query: rest.join(" "), index, json, opts };
100
+ }
101
+ /** Short human label for a QS++ suggestion type ("headingsList" -> "heading"). */
102
+ export function typeLabel(type) {
103
+ const base = type.replace(/List$/, "");
104
+ return { headings: "heading", bookmarks: "bookmark", relatedItems: "related" }[base] ?? base;
105
+ }
106
+ function displayTitle(r) {
107
+ return r.level != null ? `${r.title} (H${r.level})` : r.title;
108
+ }
109
+ const MAX_TITLE_WIDTH = 48;
110
+ /** One aligned line per result: index, type, title, note (or path). */
111
+ export function formatResults(results, color = false) {
112
+ if (results.length === 0)
113
+ return "";
114
+ const rows = results.map((r) => [String(r.index), typeLabel(r.type), displayTitle(r), r.note || r.path]);
115
+ const widths = [0, 1, 2].map((c) => Math.max(...rows.map((row) => row[c].length)));
116
+ // Don't let one very long title push every row's note far right; longer titles just overflow.
117
+ widths[2] = Math.min(widths[2], MAX_TITLE_WIDTH);
118
+ const paint = (code, s) => (color && s ? `\x1b[${code}m${s}\x1b[0m` : s);
119
+ return (rows
120
+ .map(([i, type, title, note]) => {
121
+ const cols = [
122
+ paint("2", i.padStart(widths[0])),
123
+ paint("36", type.padEnd(widths[1])),
124
+ note ? title.padEnd(widths[2]) : title,
125
+ ];
126
+ if (note)
127
+ cols.push(paint("2", note));
128
+ return cols.join(" ").trimEnd();
129
+ })
130
+ .join("\n") + "\n");
131
+ }
132
+ export function formatOpened(r) {
133
+ const where = r.path && r.path !== r.title ? ` ${r.path}` : "";
134
+ return `opened ${typeLabel(r.type)} ${displayTitle(r)}${where}\n`;
135
+ }
136
+ function exitCodeFor(e) {
137
+ if (e instanceof QspNotInstalledError)
138
+ return EXIT.QSP_NOT_INSTALLED;
139
+ if (e instanceof IndexOutOfRangeError)
140
+ return EXIT.INDEX_OUT_OF_RANGE;
141
+ if (e instanceof ObsidianUnavailableError || e instanceof ObsidianError)
142
+ return EXIT.UNAVAILABLE;
143
+ if (e instanceof UsageError || e instanceof RangeError)
144
+ return EXIT.USAGE;
145
+ return EXIT.UNAVAILABLE;
146
+ }
147
+ /** Run the CLI. Returns the exit code. Results go to stdout; logs and errors only to stderr. */
148
+ export async function main(args, io, lib = { query, open }) {
149
+ let cmd;
150
+ try {
151
+ cmd = parseCommand(args);
152
+ }
153
+ catch (e) {
154
+ io.stderr(`qsp: ${e.message}\n\n${USAGE}\n`);
155
+ return EXIT.USAGE;
156
+ }
157
+ if (cmd.kind === "help") {
158
+ io.stdout(USAGE + "\n");
159
+ return EXIT.OK;
160
+ }
161
+ const opts = { ...cmd.opts, log: (msg) => io.stderr(msg + "\n") };
162
+ try {
163
+ if (cmd.kind === "query") {
164
+ const results = await lib.query(cmd.query, opts);
165
+ if (cmd.json)
166
+ io.stdout(JSON.stringify(results, null, 2) + "\n");
167
+ else if (results.length === 0)
168
+ io.stderr("qsp: no results\n");
169
+ else
170
+ io.stdout(formatResults(results, io.color));
171
+ }
172
+ else {
173
+ const result = await lib.open(cmd.query, cmd.index, opts);
174
+ io.stdout(cmd.json ? JSON.stringify(result, null, 2) + "\n" : formatOpened(result));
175
+ }
176
+ return EXIT.OK;
177
+ }
178
+ catch (e) {
179
+ const code = exitCodeFor(e);
180
+ const msg = e instanceof Error ? e.message : String(e);
181
+ io.stderr(`qsp: ${msg}\n`);
182
+ if (code === EXIT.QSP_NOT_INSTALLED) {
183
+ io.stderr("qsp: install and enable Quick Switcher++ (Settings → Community plugins), " +
184
+ "or use Obsidian's own Quick Switcher with --switcher core or QSP_SWITCHER=core\n");
185
+ }
186
+ return code;
187
+ }
188
+ }
@@ -0,0 +1,28 @@
1
+ /** Quick Switcher++ (`darlal-switcher-plus`) is not installed, or installed but not enabled. */
2
+ export declare class QspNotInstalledError extends Error {
3
+ readonly code = "QSP_NOT_INSTALLED";
4
+ /** true if the plugin is installed but disabled. */
5
+ readonly installed: boolean;
6
+ constructor(installed?: boolean);
7
+ }
8
+ /** Obsidian could not be reached: the socket and the `obsidian` command both failed. */
9
+ export declare class ObsidianUnavailableError extends Error {
10
+ readonly code = "OBSIDIAN_UNAVAILABLE";
11
+ constructor(message: string, options?: {
12
+ cause?: unknown;
13
+ });
14
+ }
15
+ /** Obsidian was reached but reported an error (eval error, unknown vault, unexpected output). */
16
+ export declare class ObsidianError extends Error {
17
+ readonly code = "OBSIDIAN_ERROR";
18
+ constructor(message: string, options?: {
19
+ cause?: unknown;
20
+ });
21
+ }
22
+ /** `open(q, n)` was asked for a result that doesn't exist. */
23
+ export declare class IndexOutOfRangeError extends Error {
24
+ readonly code = "INDEX_OUT_OF_RANGE";
25
+ readonly index: number;
26
+ readonly count: number;
27
+ constructor(index: number, count: number);
28
+ }
package/dist/errors.js ADDED
@@ -0,0 +1,43 @@
1
+ /** Quick Switcher++ (`darlal-switcher-plus`) is not installed, or installed but not enabled. */
2
+ export class QspNotInstalledError extends Error {
3
+ code = "QSP_NOT_INSTALLED";
4
+ /** true if the plugin is installed but disabled. */
5
+ installed;
6
+ constructor(installed = false) {
7
+ super(installed
8
+ ? "Quick Switcher++ (darlal-switcher-plus) is installed but not enabled in this vault"
9
+ : "Quick Switcher++ (darlal-switcher-plus) is not installed in this vault");
10
+ this.name = "QspNotInstalledError";
11
+ this.installed = installed;
12
+ }
13
+ }
14
+ /** Obsidian could not be reached: the socket and the `obsidian` command both failed. */
15
+ export class ObsidianUnavailableError extends Error {
16
+ code = "OBSIDIAN_UNAVAILABLE";
17
+ constructor(message, options) {
18
+ super(message, options);
19
+ this.name = "ObsidianUnavailableError";
20
+ }
21
+ }
22
+ /** Obsidian was reached but reported an error (eval error, unknown vault, unexpected output). */
23
+ export class ObsidianError extends Error {
24
+ code = "OBSIDIAN_ERROR";
25
+ constructor(message, options) {
26
+ super(message, options);
27
+ this.name = "ObsidianError";
28
+ }
29
+ }
30
+ /** `open(q, n)` was asked for a result that doesn't exist. */
31
+ export class IndexOutOfRangeError extends Error {
32
+ code = "INDEX_OUT_OF_RANGE";
33
+ index;
34
+ count;
35
+ constructor(index, count) {
36
+ super(count === 0
37
+ ? `no results, can't open result ${index}`
38
+ : `result ${index} out of range (${count} result${count === 1 ? "" : "s"}, 0-${count - 1})`);
39
+ this.name = "IndexOutOfRangeError";
40
+ this.index = index;
41
+ this.count = count;
42
+ }
43
+ }
@@ -0,0 +1,58 @@
1
+ import { type SwitcherKind } from "./bridge.ts";
2
+ import { type Connect, type ExecFile, type TransportKind } from "./transport.ts";
3
+ export { IndexOutOfRangeError, ObsidianError, ObsidianUnavailableError, QspNotInstalledError } from "./errors.ts";
4
+ export { socketPath, type TransportKind } from "./transport.ts";
5
+ export type { SwitcherKind } from "./bridge.ts";
6
+ export type Result = {
7
+ index: number;
8
+ /**
9
+ * The switcher's suggestion type. Quick Switcher++: e.g. "file", "headingsList", "symbolList", "commandList".
10
+ * Core switcher: "file", "alias", "unresolved" or "bookmark".
11
+ */
12
+ type: string;
13
+ title: string;
14
+ note: string;
15
+ path: string;
16
+ /** Heading level for heading results, else null. */
17
+ level: number | null;
18
+ };
19
+ export type Options = {
20
+ /** Vault name. Default: `$QSP_VAULT`. Required: there is no implicit vault. */
21
+ vault?: string;
22
+ /**
23
+ * "plus" (Quick Switcher++, must be installed) or "core" (Obsidian's built-in Quick Switcher).
24
+ * Default: `$QSP_SWITCHER`, then "plus".
25
+ */
26
+ switcher?: SwitcherKind;
27
+ /** "auto" (socket, falling back to the `obsidian` command), "socket" or "cli". Default "auto". */
28
+ transport?: TransportKind;
29
+ /** Max results for `query`. Default 50. */
30
+ limit?: number;
31
+ /** Receives fallback/diagnostic messages. Default `console.error`. */
32
+ log?: (msg: string) => void;
33
+ /** Timeout per transport attempt. Default 10000 ms. */
34
+ timeoutMs?: number;
35
+ /** Socket path override. Default: `$QSP_SOCKET`, then Obsidian's default path. */
36
+ socketPath?: string;
37
+ /**
38
+ * Replace the transport entirely: receives the code to evaluate and returns the eval value.
39
+ * For tests and custom transports.
40
+ */
41
+ evaluate?: (code: string, ctx: {
42
+ vault: string;
43
+ idempotent: boolean;
44
+ }) => Promise<string>;
45
+ /** Test hooks for the built-in transports. */
46
+ connect?: Connect;
47
+ execFile?: ExecFile;
48
+ };
49
+ export declare const DEFAULT_LIMIT = 50;
50
+ export declare const DEFAULT_TIMEOUT_MS = 10000;
51
+ export declare const SWITCHERS: readonly SwitcherKind[];
52
+ /** Run a switcher query (Quick Switcher++ unless `switcher` says otherwise). Zero matches is `[]`, not an error. */
53
+ export declare function query(q: string, opts?: Options): Promise<Result[]>;
54
+ /**
55
+ * Run the query and open result `index` (default 0) in the same call. Returns the opened result.
56
+ * Doesn't focus the Obsidian window; that's up to the caller.
57
+ */
58
+ export declare function open(q: string, index?: number, opts?: Options): Promise<Result>;
package/dist/index.js ADDED
@@ -0,0 +1,84 @@
1
+ import { bridgeCode } from "./bridge.js";
2
+ import { IndexOutOfRangeError, ObsidianError, QspNotInstalledError } from "./errors.js";
3
+ import { evaluate, socketPath } from "./transport.js";
4
+ export { IndexOutOfRangeError, ObsidianError, ObsidianUnavailableError, QspNotInstalledError } from "./errors.js";
5
+ export { socketPath } from "./transport.js";
6
+ export const DEFAULT_LIMIT = 50;
7
+ export const DEFAULT_TIMEOUT_MS = 10_000;
8
+ function isNonNegInt(n) {
9
+ return typeof n === "number" && Number.isInteger(n) && n >= 0;
10
+ }
11
+ /**
12
+ * The vault to target. Never left to Obsidian: without `vault=` it picks the vault containing
13
+ * the working directory (opening it if needed), else the active one.
14
+ */
15
+ function resolveVault(opts) {
16
+ const vault = opts.vault || process.env.QSP_VAULT;
17
+ if (!vault)
18
+ throw new RangeError("no vault configured: use --vault <name> (library: the vault option) or set $QSP_VAULT");
19
+ return vault;
20
+ }
21
+ export const SWITCHERS = ["plus", "core"];
22
+ function resolveSwitcher(opts) {
23
+ const [value, from] = opts.switcher !== undefined ? [opts.switcher, "switcher"] : [process.env.QSP_SWITCHER || "plus", "$QSP_SWITCHER"];
24
+ if (!SWITCHERS.includes(value)) {
25
+ throw new RangeError(`${from} must be one of ${SWITCHERS.join(", ")}, got ${JSON.stringify(value)}`);
26
+ }
27
+ return value;
28
+ }
29
+ async function run(req, opts) {
30
+ const vault = resolveVault(opts);
31
+ const switcher = resolveSwitcher(opts);
32
+ const idempotent = req.action === "query";
33
+ const code = bridgeCode({ ...req, switcher });
34
+ const value = opts.evaluate
35
+ ? await opts.evaluate(code, { vault, idempotent })
36
+ : await evaluate(code, {
37
+ vault,
38
+ idempotent,
39
+ transport: opts.transport ?? "auto",
40
+ socketPath: opts.socketPath || process.env.QSP_SOCKET || socketPath(),
41
+ timeoutMs: opts.timeoutMs ?? DEFAULT_TIMEOUT_MS,
42
+ log: opts.log ?? ((msg) => console.error(msg)),
43
+ connect: opts.connect,
44
+ execFile: opts.execFile,
45
+ });
46
+ let data;
47
+ try {
48
+ data = JSON.parse(value);
49
+ }
50
+ catch {
51
+ throw new ObsidianError(`unexpected output from Obsidian: ${value.slice(0, 200)}`);
52
+ }
53
+ if (data === null || typeof data !== "object")
54
+ throw new ObsidianError(`unexpected output from Obsidian: ${value.slice(0, 200)}`);
55
+ if (data.error === "QSP_NOT_INSTALLED")
56
+ throw new QspNotInstalledError(!!data.installed);
57
+ if (data.error === "INDEX_OUT_OF_RANGE")
58
+ throw new IndexOutOfRangeError(data.index, data.count);
59
+ if (data.error)
60
+ throw new ObsidianError(String(data.message ?? data.error));
61
+ return data;
62
+ }
63
+ /** Run a switcher query (Quick Switcher++ unless `switcher` says otherwise). Zero matches is `[]`, not an error. */
64
+ export async function query(q, opts = {}) {
65
+ const limit = opts.limit ?? DEFAULT_LIMIT;
66
+ if (!isNonNegInt(limit) || limit === 0)
67
+ throw new RangeError(`limit must be a positive integer, got ${limit}`);
68
+ const data = (await run({ action: "query", query: String(q), limit }, opts));
69
+ if (!Array.isArray(data.results))
70
+ throw new ObsidianError("unexpected output from Obsidian: no results array");
71
+ return data.results;
72
+ }
73
+ /**
74
+ * Run the query and open result `index` (default 0) in the same call. Returns the opened result.
75
+ * Doesn't focus the Obsidian window; that's up to the caller.
76
+ */
77
+ export async function open(q, index = 0, opts = {}) {
78
+ if (!isNonNegInt(index))
79
+ throw new RangeError(`index must be a non-negative integer, got ${index}`);
80
+ const data = (await run({ action: "open", query: String(q), index }, opts));
81
+ if (!data.result)
82
+ throw new ObsidianError("unexpected output from Obsidian: no result");
83
+ return data.result;
84
+ }
@@ -0,0 +1,58 @@
1
+ import { type Socket } from "node:net";
2
+ export type TransportKind = "auto" | "socket" | "cli";
3
+ /**
4
+ * Path of Obsidian's CLI socket (undocumented, read from Obsidian 1.15.1's main process).
5
+ * Linux: `$XDG_RUNTIME_DIR/.obsidian-cli.sock` (homedir if unset); macOS: homedir; Windows: a named pipe.
6
+ */
7
+ export declare function socketPath(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, home?: string, username?: () => string): string;
8
+ /** The argv passed to `obsidian` (or sent over the socket) to evaluate `code` in `vault`. */
9
+ export declare function evalArgv(vault: string, code: string): string[];
10
+ /**
11
+ * Parse the output of `obsidian eval`: `=> <value>\n` on success, `Error: <message>\n` on failure.
12
+ * Anything else (`Vault not found.`, `(no output)`, …) is an error too.
13
+ * Lines before the first `=> `/`Error: ` line are ignored (the `obsidian` command may print noise).
14
+ */
15
+ export declare function parseEvalOutput(raw: string): string;
16
+ /** A failure talking to the socket. `sent` tells whether the request may have reached Obsidian. */
17
+ export declare class SocketError extends Error {
18
+ readonly errno: string;
19
+ readonly sent: boolean;
20
+ constructor(errno: string, message: string, sent: boolean);
21
+ }
22
+ export type Connect = (path: string) => Socket;
23
+ /** Send one request over the CLI socket and return the raw output (everything until the server closes). */
24
+ export declare function sendSocket(path: string, argv: string[], opts: {
25
+ timeoutMs: number;
26
+ cwd?: string;
27
+ connect?: Connect;
28
+ }): Promise<string>;
29
+ export type ExecFile = (file: string, args: string[], opts: {
30
+ timeout: number;
31
+ maxBuffer: number;
32
+ }) => Promise<{
33
+ stdout: string;
34
+ stderr: string;
35
+ }>;
36
+ /** Run `obsidian <argv>` (no shell) and return the parsed eval value. */
37
+ export declare function runCli(argv: string[], opts: {
38
+ timeoutMs: number;
39
+ command?: string;
40
+ execFile?: ExecFile;
41
+ }): Promise<string>;
42
+ export type EvalOptions = {
43
+ vault: string;
44
+ transport: TransportKind;
45
+ socketPath: string;
46
+ timeoutMs: number;
47
+ log: (msg: string) => void;
48
+ /**
49
+ * Whether re-running the code is harmless. If false (e.g. `open`), a socket failure after the request
50
+ * was sent doesn't fall back to the CLI, so the action never runs twice.
51
+ */
52
+ idempotent: boolean;
53
+ connect?: Connect;
54
+ execFile?: ExecFile;
55
+ command?: string;
56
+ };
57
+ /** Evaluate `code` in Obsidian and return the eval value (the string after `=> `). */
58
+ export declare function evaluate(code: string, opts: EvalOptions): Promise<string>;
@@ -0,0 +1,145 @@
1
+ import { execFile as nodeExecFile } from "node:child_process";
2
+ import { createConnection } from "node:net";
3
+ import { homedir, userInfo } from "node:os";
4
+ import { join } from "node:path";
5
+ import { ObsidianError, ObsidianUnavailableError } from "./errors.js";
6
+ /**
7
+ * Path of Obsidian's CLI socket (undocumented, read from Obsidian 1.15.1's main process).
8
+ * Linux: `$XDG_RUNTIME_DIR/.obsidian-cli.sock` (homedir if unset); macOS: homedir; Windows: a named pipe.
9
+ */
10
+ export function socketPath(platform = process.platform, env = process.env, home = homedir(), username = () => userInfo().username) {
11
+ if (platform === "win32")
12
+ return `\\\\.\\pipe\\obsidian-cli-${username()}`;
13
+ if (platform === "darwin")
14
+ return join(home, ".obsidian-cli.sock");
15
+ return join(env.XDG_RUNTIME_DIR || home, ".obsidian-cli.sock");
16
+ }
17
+ /** The argv passed to `obsidian` (or sent over the socket) to evaluate `code` in `vault`. */
18
+ export function evalArgv(vault, code) {
19
+ return [`vault=${vault}`, "eval", `code=${code}`];
20
+ }
21
+ /**
22
+ * Parse the output of `obsidian eval`: `=> <value>\n` on success, `Error: <message>\n` on failure.
23
+ * Anything else (`Vault not found.`, `(no output)`, …) is an error too.
24
+ * Lines before the first `=> `/`Error: ` line are ignored (the `obsidian` command may print noise).
25
+ */
26
+ export function parseEvalOutput(raw) {
27
+ const lines = raw.split("\n");
28
+ for (let i = 0; i < lines.length; i++) {
29
+ const line = lines[i];
30
+ if (line.startsWith("=> ") || line === "=>") {
31
+ const rest = [line.slice(3), ...lines.slice(i + 1)].join("\n");
32
+ return rest.endsWith("\n") ? rest.slice(0, -1) : rest;
33
+ }
34
+ if (line.startsWith("Error: ")) {
35
+ throw new ObsidianError(`Obsidian: ${lines.slice(i).join("\n").trim().slice("Error: ".length)}`);
36
+ }
37
+ }
38
+ const text = raw.trim();
39
+ throw new ObsidianError(text ? `Obsidian: ${text}` : "Obsidian returned no output");
40
+ }
41
+ /** A failure talking to the socket. `sent` tells whether the request may have reached Obsidian. */
42
+ export class SocketError extends Error {
43
+ errno;
44
+ sent;
45
+ constructor(errno, message, sent) {
46
+ super(message);
47
+ this.name = "SocketError";
48
+ this.errno = errno;
49
+ this.sent = sent;
50
+ }
51
+ }
52
+ /** Send one request over the CLI socket and return the raw output (everything until the server closes). */
53
+ export function sendSocket(path, argv, opts) {
54
+ const connect = opts.connect ?? ((p) => createConnection(p));
55
+ return new Promise((resolve, reject) => {
56
+ let sent = false;
57
+ let done = false;
58
+ const chunks = [];
59
+ const sock = connect(path);
60
+ const finish = (err) => {
61
+ if (done)
62
+ return;
63
+ done = true;
64
+ clearTimeout(timer);
65
+ sock.destroy();
66
+ if (err)
67
+ reject(err);
68
+ else
69
+ resolve(Buffer.concat(chunks).toString("utf8"));
70
+ };
71
+ const timer = setTimeout(() => finish(new SocketError("ETIMEDOUT", `no response within ${opts.timeoutMs} ms`, sent)), opts.timeoutMs);
72
+ sock.on("connect", () => {
73
+ sent = true;
74
+ sock.write(JSON.stringify({ argv, tty: false, cwd: opts.cwd ?? process.cwd() }) + "\n");
75
+ });
76
+ sock.on("data", (d) => chunks.push(d));
77
+ sock.on("end", () => finish(null));
78
+ sock.on("close", () => {
79
+ if (!sent)
80
+ finish(new SocketError("ECONNRESET", "connection closed", false));
81
+ else
82
+ finish(null);
83
+ });
84
+ sock.on("error", (e) => finish(new SocketError(e.code ?? "EUNKNOWN", e.message, sent)));
85
+ });
86
+ }
87
+ const defaultExecFile = (file, args, opts) => new Promise((resolve, reject) => {
88
+ nodeExecFile(file, args, { ...opts, encoding: "utf8" }, (err, stdout, stderr) => {
89
+ if (err)
90
+ reject(Object.assign(err, { stdout, stderr }));
91
+ else
92
+ resolve({ stdout, stderr });
93
+ });
94
+ });
95
+ /** Run `obsidian <argv>` (no shell) and return the parsed eval value. */
96
+ export async function runCli(argv, opts) {
97
+ const exec = opts.execFile ?? defaultExecFile;
98
+ const command = opts.command ?? "obsidian";
99
+ let stdout;
100
+ try {
101
+ ({ stdout } = await exec(command, argv, { timeout: opts.timeoutMs, maxBuffer: 64 * 1024 * 1024 }));
102
+ }
103
+ catch (e) {
104
+ const err = e;
105
+ // A non-zero exit with recognisable eval output (e.g. "Vault not found.") is Obsidian's answer, not a transport failure.
106
+ if (err.stdout && /^(=> |Error: )/m.test(err.stdout))
107
+ return parseEvalOutput(err.stdout);
108
+ const why = err.code === "ENOENT"
109
+ ? `\`${command}\` not found`
110
+ : err.killed
111
+ ? `\`${command}\` timed out after ${opts.timeoutMs} ms`
112
+ : `\`${command}\` failed: ${(err.stderr || err.stdout || err.message).trim()}`;
113
+ throw new ObsidianUnavailableError(`Obsidian unreachable: socket and fallback failed (${why}). Is Obsidian running?`, {
114
+ cause: e,
115
+ });
116
+ }
117
+ return parseEvalOutput(stdout);
118
+ }
119
+ /** Evaluate `code` in Obsidian and return the eval value (the string after `=> `). */
120
+ export async function evaluate(code, opts) {
121
+ const argv = evalArgv(opts.vault, code);
122
+ const cli = () => runCli(argv, { timeoutMs: opts.timeoutMs, command: opts.command, execFile: opts.execFile });
123
+ if (opts.transport === "cli") {
124
+ opts.log("qsp: transport=cli, using obsidian CLI instead of the socket");
125
+ return cli();
126
+ }
127
+ let raw;
128
+ try {
129
+ raw = await sendSocket(opts.socketPath, argv, { timeoutMs: opts.timeoutMs, connect: opts.connect });
130
+ }
131
+ catch (e) {
132
+ if (!(e instanceof SocketError))
133
+ throw e;
134
+ const what = `${e.errno} ${opts.socketPath}`;
135
+ if (opts.transport === "socket") {
136
+ throw new ObsidianUnavailableError(`Obsidian unreachable over the socket (${what}: ${e.message})`, { cause: e });
137
+ }
138
+ if (e.sent && !opts.idempotent) {
139
+ throw new ObsidianUnavailableError(`socket failed after the request was sent (${what}: ${e.message}); not retrying over the obsidian CLI`, { cause: e });
140
+ }
141
+ opts.log(`qsp: socket unavailable (${what}), falling back to obsidian CLI`);
142
+ return cli();
143
+ }
144
+ return parseEvalOutput(raw);
145
+ }
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "obsidian-quickswitcher-cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Query and open Quick Switcher++ results in a running Obsidian instance, from the terminal or Node",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "qsp": "dist/bin.js"
9
+ },
10
+ "main": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "scripts": {
25
+ "build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
26
+ "typecheck": "tsc -p tsconfig.test.json",
27
+ "test": "tsc -p tsconfig.test.json && node --test \"test/*.test.ts\"",
28
+ "prepare": "npm run build",
29
+ "prepublishOnly": "npm test",
30
+ "measure": "npm run build && node scripts/measure.mjs"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^26.6.11",
34
+ "typescript": "^7.0.2"
35
+ },
36
+ "author": "jorrit200",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/jorrit200/obsidian_quickswitcher_cli.git"
40
+ },
41
+ "homepage": "https://github.com/jorrit200/obsidian_quickswitcher_cli#readme",
42
+ "bugs": {
43
+ "url": "https://github.com/jorrit200/obsidian_quickswitcher_cli/issues"
44
+ },
45
+ "keywords": [
46
+ "obsidian",
47
+ "quick-switcher",
48
+ "quick-switcher-plus",
49
+ "cli"
50
+ ]
51
+ }