ramble-vault 0.1.0 → 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.
Files changed (2) hide show
  1. package/bin/cli.js +65 -3
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -4,6 +4,8 @@ const fs = require("fs");
4
4
  const path = require("path");
5
5
  const os = require("os");
6
6
 
7
+ const readline = require("readline");
8
+
7
9
  const ICLOUD_BASE = path.join(
8
10
  os.homedir(),
9
11
  "Library/Mobile Documents/com~apple~CloudDocs"
@@ -113,8 +115,50 @@ function installSkills() {
113
115
  return installed;
114
116
  }
115
117
 
118
+ // Prompt user for yes/no
119
+ function ask(question) {
120
+ return new Promise((resolve) => {
121
+ const rl = readline.createInterface({
122
+ input: process.stdin,
123
+ output: process.stdout,
124
+ });
125
+ rl.question(` ${question} `, (answer) => {
126
+ rl.close();
127
+ const a = answer.trim().toLowerCase();
128
+ resolve(a === "" || a === "y" || a === "yes");
129
+ });
130
+ });
131
+ }
132
+
133
+ // Set up Obsidian vault in the given directory
134
+ function setupObsidian(vaultPath) {
135
+ const obsidianDir = path.join(vaultPath, ".obsidian");
136
+ fs.mkdirSync(obsidianDir, { recursive: true });
137
+
138
+ // Sane defaults for viewing Ramble On notes
139
+ const appConfig = {
140
+ showFrontmatter: true,
141
+ readableLineLength: true,
142
+ showLineNumber: false,
143
+ strictLineBreaks: false,
144
+ };
145
+ fs.writeFileSync(
146
+ path.join(obsidianDir, "app.json"),
147
+ JSON.stringify(appConfig, null, 2) + "\n"
148
+ );
149
+
150
+ // Recommend Dataview for querying frontmatter
151
+ const communityPlugins = ["dataview"];
152
+ fs.writeFileSync(
153
+ path.join(obsidianDir, "community-plugins.json"),
154
+ JSON.stringify(communityPlugins, null, 2) + "\n"
155
+ );
156
+
157
+ return true;
158
+ }
159
+
116
160
  // Main
117
- function main() {
161
+ async function main() {
118
162
  console.log();
119
163
  console.log(" \x1b[1mRamble On → Claude Code\x1b[0m");
120
164
  console.log();
@@ -150,14 +194,32 @@ function main() {
150
194
  const skills = installSkills();
151
195
  success(`Installed skills: ${skills.map((s) => `/${s}`).join(", ")}`);
152
196
 
197
+ // Step 4: Obsidian setup
198
+ console.log();
199
+ const wantObsidian = await ask("Set up as Obsidian vault? (Y/n)");
200
+
201
+ if (wantObsidian) {
202
+ setupObsidian(vaultPath);
203
+ success("Created .obsidian/ config");
204
+ }
205
+
153
206
  // Done
154
207
  console.log();
155
- console.log(" \x1b[1m\x1b[32mDone!\x1b[0m Open Claude Code and try:");
208
+ console.log(" \x1b[1m\x1b[32mDone!\x1b[0m");
156
209
  console.log();
210
+ console.log(" \x1b[4mClaude Code:\x1b[0m");
157
211
  console.log(" \x1b[36m/recall\x1b[0m what did I talk about this week?");
158
212
  console.log(" \x1b[36m/ideas\x1b[0m");
159
213
  console.log(" \x1b[36m/trace\x1b[0m pricing strategy");
214
+ if (wantObsidian) {
215
+ console.log();
216
+ console.log(" \x1b[4mObsidian:\x1b[0m");
217
+ console.log(` Open folder as vault → select ${vaultPath}`);
218
+ }
160
219
  console.log();
161
220
  }
162
221
 
163
- main();
222
+ main().catch((err) => {
223
+ error(err.message);
224
+ process.exit(1);
225
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ramble-vault",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Connect Ramble On voice notes to Claude Code",
5
5
  "bin": {
6
6
  "ramble-vault": "bin/cli.js"