@mattheworiordan/remi 0.1.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 +21 -0
- package/README.md +207 -0
- package/dist/cli/commands/add.d.ts +7 -0
- package/dist/cli/commands/add.js +36 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/authorize.d.ts +1 -0
- package/dist/cli/commands/authorize.js +75 -0
- package/dist/cli/commands/authorize.js.map +1 -0
- package/dist/cli/commands/complete.d.ts +3 -0
- package/dist/cli/commands/complete.js +9 -0
- package/dist/cli/commands/complete.js.map +1 -0
- package/dist/cli/commands/create-list.d.ts +1 -0
- package/dist/cli/commands/create-list.js +7 -0
- package/dist/cli/commands/create-list.js.map +1 -0
- package/dist/cli/commands/create-section.d.ts +1 -0
- package/dist/cli/commands/create-section.js +7 -0
- package/dist/cli/commands/create-section.js.map +1 -0
- package/dist/cli/commands/delete-list.d.ts +3 -0
- package/dist/cli/commands/delete-list.js +11 -0
- package/dist/cli/commands/delete-list.js.map +1 -0
- package/dist/cli/commands/delete-section.d.ts +1 -0
- package/dist/cli/commands/delete-section.js +7 -0
- package/dist/cli/commands/delete-section.js.map +1 -0
- package/dist/cli/commands/delete.d.ts +4 -0
- package/dist/cli/commands/delete.js +14 -0
- package/dist/cli/commands/delete.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +4 -0
- package/dist/cli/commands/doctor.js +180 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/list.d.ts +4 -0
- package/dist/cli/commands/list.js +11 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/lists.d.ts +1 -0
- package/dist/cli/commands/lists.js +7 -0
- package/dist/cli/commands/lists.js.map +1 -0
- package/dist/cli/commands/move.d.ts +3 -0
- package/dist/cli/commands/move.js +11 -0
- package/dist/cli/commands/move.js.map +1 -0
- package/dist/cli/commands/overdue.d.ts +1 -0
- package/dist/cli/commands/overdue.js +11 -0
- package/dist/cli/commands/overdue.js.map +1 -0
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +11 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/sections.d.ts +1 -0
- package/dist/cli/commands/sections.js +7 -0
- package/dist/cli/commands/sections.js.map +1 -0
- package/dist/cli/commands/today.d.ts +1 -0
- package/dist/cli/commands/today.js +11 -0
- package/dist/cli/commands/today.js.map +1 -0
- package/dist/cli/commands/upcoming.d.ts +3 -0
- package/dist/cli/commands/upcoming.js +12 -0
- package/dist/cli/commands/upcoming.js.map +1 -0
- package/dist/cli/commands/update.d.ts +7 -0
- package/dist/cli/commands/update.js +17 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +232 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output.d.ts +26 -0
- package/dist/cli/output.js +234 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/core/checksum.d.ts +9 -0
- package/dist/core/checksum.js +13 -0
- package/dist/core/checksum.js.map +1 -0
- package/dist/core/dateparse.d.ts +7 -0
- package/dist/core/dateparse.js +27 -0
- package/dist/core/dateparse.js.map +1 -0
- package/dist/core/errors.d.ts +26 -0
- package/dist/core/errors.js +34 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/eventkit.d.ts +38 -0
- package/dist/core/eventkit.js +127 -0
- package/dist/core/eventkit.js.map +1 -0
- package/dist/core/lookup.d.ts +10 -0
- package/dist/core/lookup.js +32 -0
- package/dist/core/lookup.js.map +1 -0
- package/dist/core/membership.d.ts +30 -0
- package/dist/core/membership.js +92 -0
- package/dist/core/membership.js.map +1 -0
- package/dist/core/recurrence.d.ts +14 -0
- package/dist/core/recurrence.js +90 -0
- package/dist/core/recurrence.js.map +1 -0
- package/dist/core/reminderkit.d.ts +33 -0
- package/dist/core/reminderkit.js +154 -0
- package/dist/core/reminderkit.js.map +1 -0
- package/dist/core/sqlite.d.ts +65 -0
- package/dist/core/sqlite.js +175 -0
- package/dist/core/sqlite.js.map +1 -0
- package/dist/core/tokenmap.d.ts +29 -0
- package/dist/core/tokenmap.js +52 -0
- package/dist/core/tokenmap.js.map +1 -0
- package/dist/reminders-helper +0 -0
- package/dist/section-helper +0 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
- package/src/swift/Info.plist +16 -0
- package/src/swift/build.sh +47 -0
- package/src/swift/reminders-helper.swift +697 -0
- package/src/swift/section-helper.swift +794 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
import { dbFindDb, dbStats } from "../../core/reminderkit.js";
|
|
8
|
+
import { isJsonMode, outputSuccess } from "../output.js";
|
|
9
|
+
const execFileAsync = promisify(execFile);
|
|
10
|
+
export async function doctorCommand(opts) {
|
|
11
|
+
const checks = [];
|
|
12
|
+
// Check macOS version
|
|
13
|
+
try {
|
|
14
|
+
const { stdout } = await execFileAsync("sw_vers", ["-productVersion"]);
|
|
15
|
+
const version = stdout.trim();
|
|
16
|
+
const major = Number.parseInt(version.split(".")[0], 10);
|
|
17
|
+
if (major >= 13) {
|
|
18
|
+
checks.push({ name: "macOS version", status: "ok", message: `macOS ${version}` });
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
checks.push({
|
|
22
|
+
name: "macOS version",
|
|
23
|
+
status: "fail",
|
|
24
|
+
message: `macOS ${version} (requires 13+)`,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
checks.push({
|
|
30
|
+
name: "macOS version",
|
|
31
|
+
status: "fail",
|
|
32
|
+
message: "Could not determine macOS version",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Check Swift
|
|
36
|
+
try {
|
|
37
|
+
const { stdout } = await execFileAsync("/usr/bin/swift", ["--version"]);
|
|
38
|
+
const match = stdout.match(/Swift version ([\d.]+)/);
|
|
39
|
+
checks.push({
|
|
40
|
+
name: "Swift",
|
|
41
|
+
status: "ok",
|
|
42
|
+
message: match ? `Swift ${match[1]}` : "Available",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
checks.push({
|
|
47
|
+
name: "Swift",
|
|
48
|
+
status: "fail",
|
|
49
|
+
message: "Not found",
|
|
50
|
+
detail: "Install Xcode Command Line Tools: xcode-select --install",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Check compiled Swift helpers
|
|
54
|
+
const { dirname: dirnameFn } = await import("node:path");
|
|
55
|
+
const { fileURLToPath } = await import("node:url");
|
|
56
|
+
const currentDir = dirnameFn(fileURLToPath(import.meta.url));
|
|
57
|
+
const helperDir = [join(currentDir, "../.."), join(currentDir, "../../../dist")];
|
|
58
|
+
const remindersHelperExists = helperDir.some((d) => existsSync(join(d, "reminders-helper")));
|
|
59
|
+
if (remindersHelperExists) {
|
|
60
|
+
checks.push({
|
|
61
|
+
name: "reminders-helper",
|
|
62
|
+
status: "ok",
|
|
63
|
+
message: "Compiled binary with permissions",
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
checks.push({
|
|
68
|
+
name: "reminders-helper",
|
|
69
|
+
status: "warn",
|
|
70
|
+
message: "Not compiled — using interpreted Swift (permissions may be attributed to terminal)",
|
|
71
|
+
detail: "Run: npm run build:swift",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const sectionHelperExists = helperDir.some((d) => existsSync(join(d, "section-helper")));
|
|
75
|
+
if (sectionHelperExists) {
|
|
76
|
+
checks.push({ name: "section-helper", status: "ok", message: "Compiled binary found" });
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
checks.push({
|
|
80
|
+
name: "section-helper",
|
|
81
|
+
status: "warn",
|
|
82
|
+
message: "Not compiled (section operations unavailable)",
|
|
83
|
+
detail: "Run: npm run build:swift",
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
// Check Reminders database (via compiled binary — uses its own permissions)
|
|
87
|
+
try {
|
|
88
|
+
const dbPath = await dbFindDb();
|
|
89
|
+
checks.push({ name: "Reminders database", status: "ok", message: "Found", detail: dbPath });
|
|
90
|
+
if (opts.db) {
|
|
91
|
+
const stats = await dbStats();
|
|
92
|
+
checks.push({
|
|
93
|
+
name: "Database stats",
|
|
94
|
+
status: "ok",
|
|
95
|
+
message: `${stats.lists} lists, ${stats.sections} sections, ${stats.reminders} reminders`,
|
|
96
|
+
detail: stats.dbPath,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
const errMsg = err instanceof Error ? err.message : "Not found";
|
|
102
|
+
checks.push({
|
|
103
|
+
name: "Reminders database",
|
|
104
|
+
status: "warn",
|
|
105
|
+
message: `Not accessible (${errMsg})`,
|
|
106
|
+
detail: "Run: remi authorize (section features need Full Disk Access for your terminal app)",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
// Check EventKit permissions (via compiled reminders-helper, same binary used by all commands)
|
|
110
|
+
try {
|
|
111
|
+
const { listLists } = await import("../../core/eventkit.js");
|
|
112
|
+
const lists = await listLists();
|
|
113
|
+
const count = Array.isArray(lists) ? lists.length : 0;
|
|
114
|
+
if (count > 0) {
|
|
115
|
+
checks.push({
|
|
116
|
+
name: "Reminders access",
|
|
117
|
+
status: "ok",
|
|
118
|
+
message: `Granted (${count} lists)`,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// 0 lists usually means access was denied — EventKit returns empty rather than erroring
|
|
123
|
+
checks.push({
|
|
124
|
+
name: "Reminders access",
|
|
125
|
+
status: "fail",
|
|
126
|
+
message: "Not granted (0 lists returned)",
|
|
127
|
+
detail: "Run: remi authorize",
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
const errMsg = err instanceof Error ? err.message : "";
|
|
133
|
+
checks.push({
|
|
134
|
+
name: "Reminders access",
|
|
135
|
+
status: "fail",
|
|
136
|
+
message: errMsg.includes("denied") ? "Not granted" : `Error: ${errMsg}`,
|
|
137
|
+
detail: "Run: remi authorize",
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
// Check Reminders stores dir
|
|
141
|
+
const storesDir = join(homedir(), "Library/Group Containers/group.com.apple.reminders/Container_v1/Stores");
|
|
142
|
+
if (existsSync(storesDir)) {
|
|
143
|
+
checks.push({ name: "Reminders data dir", status: "ok", message: "Exists" });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
checks.push({
|
|
147
|
+
name: "Reminders data dir",
|
|
148
|
+
status: "fail",
|
|
149
|
+
message: "Not found",
|
|
150
|
+
detail: storesDir,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
// Output
|
|
154
|
+
if (isJsonMode()) {
|
|
155
|
+
outputSuccess(checks);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
process.stdout.write(chalk.bold("\nremi doctor\n"));
|
|
159
|
+
process.stdout.write(`${"─".repeat(40)}\n`);
|
|
160
|
+
for (const check of checks) {
|
|
161
|
+
const icon = check.status === "ok"
|
|
162
|
+
? chalk.green("✓")
|
|
163
|
+
: check.status === "warn"
|
|
164
|
+
? chalk.yellow("⚠")
|
|
165
|
+
: chalk.red("✗");
|
|
166
|
+
process.stdout.write(`${icon} ${chalk.bold(check.name)}: ${check.message}\n`);
|
|
167
|
+
if (check.detail) {
|
|
168
|
+
process.stdout.write(chalk.dim(` ${check.detail}\n`));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const failures = checks.filter((c) => c.status === "fail");
|
|
172
|
+
if (failures.length > 0) {
|
|
173
|
+
process.stdout.write(chalk.red(`\n${failures.length} issue(s) found.\n`));
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
process.stdout.write(chalk.green("\nAll checks passed.\n"));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAS1C,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAsC;IACzE,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,sBAAsB;IACtB,IAAI,CAAC;QACJ,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,SAAS,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACvE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACzD,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;YACjB,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K,CAAC,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAC7D,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getReminders } from "../../core/eventkit.js";
|
|
2
|
+
import { outputReminders } from "../output.js";
|
|
3
|
+
export async function listCommand(name, opts) {
|
|
4
|
+
const filter = opts.includeCompleted ? "all" : "incomplete";
|
|
5
|
+
const reminders = await getReminders({ list: name, filter });
|
|
6
|
+
outputReminders(reminders, name, {
|
|
7
|
+
context: "list",
|
|
8
|
+
sortByDate: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,WAAW,CAChC,IAAY,EACZ,IAAsD;IAEtD,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC;IAC5D,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7D,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE;QAChC,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,IAAI;KAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function listsCommand(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../../src/cli/commands/lists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,YAAY;IACjC,MAAM,KAAK,GAAG,MAAM,SAAS,EAAE,CAAC;IAChC,WAAW,CAAC,KAAK,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { assignToSection } from "../../core/membership.js";
|
|
2
|
+
import { outputMessage } from "../output.js";
|
|
3
|
+
export async function moveCommand(list, title, opts) {
|
|
4
|
+
const { warning } = await assignToSection(list, title, opts.toSection);
|
|
5
|
+
let msg = `Moved "${title}" to section "${opts.toSection}" in "${list}"`;
|
|
6
|
+
if (warning) {
|
|
7
|
+
msg += ` (note: ${warning})`;
|
|
8
|
+
}
|
|
9
|
+
outputMessage(msg);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=move.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move.js","sourceRoot":"","sources":["../../../src/cli/commands/move.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,WAAW,CAChC,IAAY,EACZ,KAAa,EACb,IAA2B;IAE3B,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACvE,IAAI,GAAG,GAAG,UAAU,KAAK,iBAAiB,IAAI,CAAC,SAAS,SAAS,IAAI,GAAG,CAAC;IACzE,IAAI,OAAO,EAAE,CAAC;QACb,GAAG,IAAI,WAAW,OAAO,GAAG,CAAC;IAC9B,CAAC;IACD,aAAa,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function overdueCommand(): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getReminders } from "../../core/eventkit.js";
|
|
2
|
+
import { outputReminders } from "../output.js";
|
|
3
|
+
export async function overdueCommand() {
|
|
4
|
+
const reminders = await getReminders({ filter: "overdue" });
|
|
5
|
+
outputReminders(reminders, "Overdue", {
|
|
6
|
+
context: "overdue",
|
|
7
|
+
showList: true,
|
|
8
|
+
sortByDate: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=overdue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overdue.js","sourceRoot":"","sources":["../../../src/cli/commands/overdue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,cAAc;IACnC,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5D,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE;QACrC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;KAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function searchCommand(query: string): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { searchReminders } from "../../core/eventkit.js";
|
|
2
|
+
import { outputReminders } from "../output.js";
|
|
3
|
+
export async function searchCommand(query) {
|
|
4
|
+
const reminders = await searchReminders(query);
|
|
5
|
+
outputReminders(reminders, `Search: "${query}"`, {
|
|
6
|
+
context: "search",
|
|
7
|
+
showList: true,
|
|
8
|
+
sortByDate: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAa;IAChD,MAAM,SAAS,GAAG,MAAM,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/C,eAAe,CAAC,SAAS,EAAE,YAAY,KAAK,GAAG,EAAE;QAChD,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;KAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sectionsCommand(list: string): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { listSections } from "../../core/reminderkit.js";
|
|
2
|
+
import { outputSections } from "../output.js";
|
|
3
|
+
export async function sectionsCommand(list) {
|
|
4
|
+
const sections = await listSections(list);
|
|
5
|
+
outputSections(sections, list);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.js","sourceRoot":"","sources":["../../../src/cli/commands/sections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAY;IACjD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1C,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function todayCommand(): Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getReminders } from "../../core/eventkit.js";
|
|
2
|
+
import { outputReminders } from "../output.js";
|
|
3
|
+
export async function todayCommand() {
|
|
4
|
+
const reminders = await getReminders({ filter: "today" });
|
|
5
|
+
outputReminders(reminders, "Due Today", {
|
|
6
|
+
context: "today",
|
|
7
|
+
showList: true,
|
|
8
|
+
sortByDate: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=today.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"today.js","sourceRoot":"","sources":["../../../src/cli/commands/today.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,YAAY;IACjC,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1D,eAAe,CAAC,SAAS,EAAE,WAAW,EAAE;QACvC,OAAO,EAAE,OAAO;QAChB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;KAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getReminders } from "../../core/eventkit.js";
|
|
2
|
+
import { outputReminders } from "../output.js";
|
|
3
|
+
export async function upcomingCommand(opts) {
|
|
4
|
+
const days = opts.days ? Number.parseInt(opts.days, 10) : 7;
|
|
5
|
+
const reminders = await getReminders({ filter: "upcoming", days });
|
|
6
|
+
outputReminders(reminders, `Due in next ${days} days`, {
|
|
7
|
+
context: "upcoming",
|
|
8
|
+
showList: true,
|
|
9
|
+
sortByDate: true,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=upcoming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming.js","sourceRoot":"","sources":["../../../src/cli/commands/upcoming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAuB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,eAAe,CAAC,SAAS,EAAE,eAAe,IAAI,OAAO,EAAE;QACtD,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;KAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { parseDate } from "../../core/dateparse.js";
|
|
2
|
+
import * as eventkit from "../../core/eventkit.js";
|
|
3
|
+
import { findReminderByTitle } from "../../core/lookup.js";
|
|
4
|
+
import { outputMessage } from "../output.js";
|
|
5
|
+
export async function updateCommand(list, title, opts) {
|
|
6
|
+
const reminder = await findReminderByTitle(list, title);
|
|
7
|
+
await eventkit.editReminder({
|
|
8
|
+
id: reminder.id,
|
|
9
|
+
title: opts.title,
|
|
10
|
+
due: opts.due ? parseDate(opts.due) : undefined,
|
|
11
|
+
clearDue: opts.clearDue,
|
|
12
|
+
notes: opts.notes,
|
|
13
|
+
priority: opts.priority,
|
|
14
|
+
});
|
|
15
|
+
outputMessage(`Updated "${reminder.title}" in "${list}"`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,aAAa,CAClC,IAAY,EACZ,KAAa,EACb,IAA6F;IAE7F,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACxD,MAAM,QAAQ,CAAC,YAAY,CAAC;QAC3B,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACvB,CAAC,CAAC;IACH,aAAa,CAAC,YAAY,QAAQ,CAAC,KAAK,SAAS,IAAI,GAAG,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { RemiCommandError } from "../core/errors.js";
|
|
4
|
+
import { outputError, setJsonMode, setVerboseMode } from "./output.js";
|
|
5
|
+
const program = new Command();
|
|
6
|
+
program
|
|
7
|
+
.name("remi")
|
|
8
|
+
.description("Fast, reliable CLI for Apple Reminders with section support and iCloud sync")
|
|
9
|
+
.version("0.1.0")
|
|
10
|
+
.option("--json", "Output in JSON format for machine consumption")
|
|
11
|
+
.option("-v, --verbose", "Show additional details (notes preview, full dates)")
|
|
12
|
+
.hook("preAction", (thisCommand) => {
|
|
13
|
+
const opts = thisCommand.opts();
|
|
14
|
+
if (opts.json) {
|
|
15
|
+
setJsonMode(true);
|
|
16
|
+
}
|
|
17
|
+
if (opts.verbose) {
|
|
18
|
+
setVerboseMode(true);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
// -- Daily drivers: queries --
|
|
22
|
+
program
|
|
23
|
+
.command("today")
|
|
24
|
+
.description("Show reminders due today")
|
|
25
|
+
.action(async () => {
|
|
26
|
+
const { todayCommand } = await import("./commands/today.js");
|
|
27
|
+
await todayCommand();
|
|
28
|
+
});
|
|
29
|
+
program
|
|
30
|
+
.command("upcoming")
|
|
31
|
+
.description("Show upcoming reminders")
|
|
32
|
+
.option("--days <n>", "Number of days to look ahead", "7")
|
|
33
|
+
.action(async (opts) => {
|
|
34
|
+
const { upcomingCommand } = await import("./commands/upcoming.js");
|
|
35
|
+
await upcomingCommand(opts);
|
|
36
|
+
});
|
|
37
|
+
program
|
|
38
|
+
.command("overdue")
|
|
39
|
+
.description("Show overdue reminders")
|
|
40
|
+
.action(async () => {
|
|
41
|
+
const { overdueCommand } = await import("./commands/overdue.js");
|
|
42
|
+
await overdueCommand();
|
|
43
|
+
});
|
|
44
|
+
// -- Browse --
|
|
45
|
+
program
|
|
46
|
+
.command("list <name>")
|
|
47
|
+
.description("Show contents of a reminder list")
|
|
48
|
+
.option("--section <section>", "Filter by section")
|
|
49
|
+
.option("--include-completed", "Include completed reminders")
|
|
50
|
+
.action(async (name, opts) => {
|
|
51
|
+
const { listCommand } = await import("./commands/list.js");
|
|
52
|
+
await listCommand(name, opts);
|
|
53
|
+
});
|
|
54
|
+
program
|
|
55
|
+
.command("lists")
|
|
56
|
+
.alias("ls")
|
|
57
|
+
.description("List all reminder lists")
|
|
58
|
+
.action(async () => {
|
|
59
|
+
const { listsCommand } = await import("./commands/lists.js");
|
|
60
|
+
await listsCommand();
|
|
61
|
+
});
|
|
62
|
+
program
|
|
63
|
+
.command("search <query>")
|
|
64
|
+
.description("Search reminders across all lists")
|
|
65
|
+
.action(async (query) => {
|
|
66
|
+
const { searchCommand } = await import("./commands/search.js");
|
|
67
|
+
await searchCommand(query);
|
|
68
|
+
});
|
|
69
|
+
// -- Task actions --
|
|
70
|
+
program
|
|
71
|
+
.command("add <list> <title>")
|
|
72
|
+
.description("Add a reminder to a list")
|
|
73
|
+
.option("--section <section>", "Add to a specific section")
|
|
74
|
+
.option("--due <date>", 'Due date: YYYY-MM-DD or natural language ("tomorrow", "next friday")')
|
|
75
|
+
.option("--priority <level>", "Priority: none, low, medium, high", "none")
|
|
76
|
+
.option("--notes <text>", "Reminder notes")
|
|
77
|
+
.option("--repeat <rule>", 'Recurrence: "daily", "weekly", "every 2 weeks", "every 3 months"')
|
|
78
|
+
.action(async (list, title, opts) => {
|
|
79
|
+
const { addCommand } = await import("./commands/add.js");
|
|
80
|
+
await addCommand(list, title, opts);
|
|
81
|
+
});
|
|
82
|
+
program
|
|
83
|
+
.command("complete <list> <title>")
|
|
84
|
+
.alias("done")
|
|
85
|
+
.description("Mark a reminder as complete")
|
|
86
|
+
.option("--id <id>", "Match by reminder ID instead of title")
|
|
87
|
+
.action(async (list, title, opts) => {
|
|
88
|
+
const { completeCommand } = await import("./commands/complete.js");
|
|
89
|
+
await completeCommand(list, title, opts);
|
|
90
|
+
});
|
|
91
|
+
program
|
|
92
|
+
.command("update <list> <title>")
|
|
93
|
+
.description("Update a reminder")
|
|
94
|
+
.option("--title <newTitle>", "New title")
|
|
95
|
+
.option("--due <date>", "New due date: YYYY-MM-DD or natural language")
|
|
96
|
+
.option("--clear-due", "Remove due date")
|
|
97
|
+
.option("--priority <level>", "New priority: none, low, medium, high")
|
|
98
|
+
.option("--notes <text>", "New notes")
|
|
99
|
+
.action(async (list, title, opts) => {
|
|
100
|
+
const { updateCommand } = await import("./commands/update.js");
|
|
101
|
+
await updateCommand(list, title, opts);
|
|
102
|
+
});
|
|
103
|
+
program
|
|
104
|
+
.command("delete <list> <title>")
|
|
105
|
+
.alias("rm")
|
|
106
|
+
.description("Delete a reminder")
|
|
107
|
+
.option("--id <id>", "Match by reminder ID instead of title")
|
|
108
|
+
.option("--confirm", "Confirm deletion (required in interactive mode)")
|
|
109
|
+
.action(async (list, title, opts) => {
|
|
110
|
+
const { deleteCommand } = await import("./commands/delete.js");
|
|
111
|
+
await deleteCommand(list, title, opts);
|
|
112
|
+
});
|
|
113
|
+
// -- Organization: sections and lists --
|
|
114
|
+
program
|
|
115
|
+
.command("sections <list>")
|
|
116
|
+
.description("List sections in a reminder list")
|
|
117
|
+
.action(async (list) => {
|
|
118
|
+
const { sectionsCommand } = await import("./commands/sections.js");
|
|
119
|
+
await sectionsCommand(list);
|
|
120
|
+
});
|
|
121
|
+
program
|
|
122
|
+
.command("move <list> <title>")
|
|
123
|
+
.description("Move a reminder to a different section")
|
|
124
|
+
.requiredOption("--to-section <section>", "Target section name")
|
|
125
|
+
.action(async (list, title, opts) => {
|
|
126
|
+
const { moveCommand } = await import("./commands/move.js");
|
|
127
|
+
await moveCommand(list, title, opts);
|
|
128
|
+
});
|
|
129
|
+
program
|
|
130
|
+
.command("create-section <list> <name>")
|
|
131
|
+
.description("Create a section in a reminder list")
|
|
132
|
+
.action(async (list, name) => {
|
|
133
|
+
const { createSectionCommand } = await import("./commands/create-section.js");
|
|
134
|
+
await createSectionCommand(list, name);
|
|
135
|
+
});
|
|
136
|
+
program
|
|
137
|
+
.command("delete-section <list> <name>")
|
|
138
|
+
.description("Delete a section from a reminder list")
|
|
139
|
+
.action(async (list, name) => {
|
|
140
|
+
const { deleteSectionCommand } = await import("./commands/delete-section.js");
|
|
141
|
+
await deleteSectionCommand(list, name);
|
|
142
|
+
});
|
|
143
|
+
program
|
|
144
|
+
.command("create-list <name>")
|
|
145
|
+
.description("Create a new reminder list")
|
|
146
|
+
.action(async (name) => {
|
|
147
|
+
const { createListCommand } = await import("./commands/create-list.js");
|
|
148
|
+
await createListCommand(name);
|
|
149
|
+
});
|
|
150
|
+
program
|
|
151
|
+
.command("delete-list <name>")
|
|
152
|
+
.description("Delete a reminder list")
|
|
153
|
+
.option("--confirm", "Confirm deletion (required in interactive mode)")
|
|
154
|
+
.action(async (name, opts) => {
|
|
155
|
+
const { deleteListCommand } = await import("./commands/delete-list.js");
|
|
156
|
+
await deleteListCommand(name, opts);
|
|
157
|
+
});
|
|
158
|
+
// -- System --
|
|
159
|
+
program
|
|
160
|
+
.command("authorize")
|
|
161
|
+
.description("Request Reminders access permission")
|
|
162
|
+
.action(async () => {
|
|
163
|
+
const { authorizeCommand } = await import("./commands/authorize.js");
|
|
164
|
+
await authorizeCommand();
|
|
165
|
+
});
|
|
166
|
+
program
|
|
167
|
+
.command("doctor")
|
|
168
|
+
.description("Check system health and diagnostics")
|
|
169
|
+
.option("--sync", "Verify sync status")
|
|
170
|
+
.option("--db", "Show database location and stats")
|
|
171
|
+
.action(async (opts) => {
|
|
172
|
+
const { doctorCommand } = await import("./commands/doctor.js");
|
|
173
|
+
await doctorCommand(opts);
|
|
174
|
+
});
|
|
175
|
+
program
|
|
176
|
+
.command("completions")
|
|
177
|
+
.description("Generate shell completions (bash, zsh, fish)")
|
|
178
|
+
.argument("<shell>", "Shell type: bash, zsh, or fish")
|
|
179
|
+
.action(async (shell) => {
|
|
180
|
+
const commands = program.commands.map((c) => c.name()).filter((n) => n !== "completions");
|
|
181
|
+
if (shell === "zsh") {
|
|
182
|
+
const completions = `#compdef remi
|
|
183
|
+
_remi() {
|
|
184
|
+
local -a commands
|
|
185
|
+
commands=(
|
|
186
|
+
${commands.map((c) => ` '${c}:${program.commands.find((cmd) => cmd.name() === c)?.description() || ""}'`).join("\n")}
|
|
187
|
+
)
|
|
188
|
+
_describe 'command' commands
|
|
189
|
+
}
|
|
190
|
+
compdef _remi remi`;
|
|
191
|
+
process.stdout.write(`${completions}\n`);
|
|
192
|
+
}
|
|
193
|
+
else if (shell === "bash") {
|
|
194
|
+
const completions = `_remi() {
|
|
195
|
+
local commands="${commands.join(" ")}"
|
|
196
|
+
COMPREPLY=($(compgen -W "$commands" -- "\${COMP_WORDS[COMP_CWORD]}"))
|
|
197
|
+
}
|
|
198
|
+
complete -F _remi remi`;
|
|
199
|
+
process.stdout.write(`${completions}\n`);
|
|
200
|
+
}
|
|
201
|
+
else if (shell === "fish") {
|
|
202
|
+
const lines = commands
|
|
203
|
+
.map((c) => {
|
|
204
|
+
const desc = program.commands.find((cmd) => cmd.name() === c)?.description() || "";
|
|
205
|
+
return `complete -c remi -n '__fish_use_subcommand' -a '${c}' -d '${desc}'`;
|
|
206
|
+
})
|
|
207
|
+
.join("\n");
|
|
208
|
+
process.stdout.write(`${lines}\n`);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
process.stderr.write(`Unknown shell: ${shell}. Use: bash, zsh, or fish\n`);
|
|
212
|
+
process.exit(1);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
// -- Error handling --
|
|
216
|
+
async function main() {
|
|
217
|
+
try {
|
|
218
|
+
await program.parseAsync(process.argv);
|
|
219
|
+
}
|
|
220
|
+
catch (err) {
|
|
221
|
+
if (err instanceof RemiCommandError) {
|
|
222
|
+
outputError(err.toRemiError());
|
|
223
|
+
process.exit(1);
|
|
224
|
+
}
|
|
225
|
+
// Unknown error
|
|
226
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
227
|
+
outputError({ code: "UNKNOWN", message });
|
|
228
|
+
process.exit(1);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
main();
|
|
232
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACL,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,6EAA6E,CAAC;KAC1F,OAAO,CAAC,OAAO,CAAC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