loclaude 0.0.1-alpha.3 → 0.0.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.
- package/CHANGELOG.md +2 -2
- package/README.md +150 -64
- package/libs/cli/dist/commands/doctor.d.ts.map +1 -1
- package/libs/cli/dist/index.bun.js +108 -27
- package/libs/cli/dist/index.bun.js.map +5 -5
- package/libs/cli/dist/index.js +108 -27
- package/libs/cli/dist/index.js.map +5 -5
- package/libs/cli/package.json +2 -2
- package/package.json +17 -7
package/libs/cli/dist/index.js
CHANGED
|
@@ -1089,13 +1089,13 @@ function getClaudeExtraArgs() {
|
|
|
1089
1089
|
var OLLAMA_URL = getOllamaUrl();
|
|
1090
1090
|
var DEFAULT_MODEL = getDefaultModel();
|
|
1091
1091
|
|
|
1092
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1092
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/key.js
|
|
1093
1093
|
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
1094
1094
|
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
1095
1095
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
1096
1096
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
1097
1097
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
1098
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1098
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/errors.js
|
|
1099
1099
|
class AbortPromptError extends Error {
|
|
1100
1100
|
name = "AbortPromptError";
|
|
1101
1101
|
message = "Prompt was aborted";
|
|
@@ -1121,10 +1121,10 @@ class HookError extends Error {
|
|
|
1121
1121
|
class ValidationError extends Error {
|
|
1122
1122
|
name = "ValidationError";
|
|
1123
1123
|
}
|
|
1124
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1124
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
1125
1125
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
1126
1126
|
|
|
1127
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1127
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
1128
1128
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
1129
1129
|
var hookStorage = new AsyncLocalStorage;
|
|
1130
1130
|
function createStore(rl) {
|
|
@@ -1229,7 +1229,7 @@ var effectScheduler = {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
};
|
|
1231
1231
|
|
|
1232
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1232
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
1233
1233
|
function useState(defaultValue) {
|
|
1234
1234
|
return withPointer((pointer) => {
|
|
1235
1235
|
const setState = AsyncResource2.bind(function setState(newValue) {
|
|
@@ -1247,7 +1247,7 @@ function useState(defaultValue) {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1250
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
1251
1251
|
function useEffect(cb, depArray) {
|
|
1252
1252
|
withPointer((pointer) => {
|
|
1253
1253
|
const oldDeps = pointer.get();
|
|
@@ -1259,7 +1259,7 @@ function useEffect(cb, depArray) {
|
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1262
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/theme.js
|
|
1263
1263
|
import { styleText } from "node:util";
|
|
1264
1264
|
|
|
1265
1265
|
// ../../node_modules/.bun/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
@@ -1551,7 +1551,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
1551
1551
|
var dist_default2 = figures;
|
|
1552
1552
|
var replacements = Object.entries(specialMainSymbols);
|
|
1553
1553
|
|
|
1554
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1554
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/theme.js
|
|
1555
1555
|
var defaultTheme = {
|
|
1556
1556
|
prefix: {
|
|
1557
1557
|
idle: styleText("blue", "?"),
|
|
@@ -1572,7 +1572,7 @@ var defaultTheme = {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
};
|
|
1574
1574
|
|
|
1575
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1575
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
1576
1576
|
function isPlainObject(value) {
|
|
1577
1577
|
if (typeof value !== "object" || value === null)
|
|
1578
1578
|
return false;
|
|
@@ -1600,7 +1600,7 @@ function makeTheme(...themes) {
|
|
|
1600
1600
|
return deepMerge2(...themesToMerge);
|
|
1601
1601
|
}
|
|
1602
1602
|
|
|
1603
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1603
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
1604
1604
|
function usePrefix({ status = "idle", theme }) {
|
|
1605
1605
|
const [showLoader, setShowLoader] = useState(false);
|
|
1606
1606
|
const [tick, setTick] = useState(0);
|
|
@@ -1630,7 +1630,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
1630
1630
|
const iconName = status === "loading" ? "idle" : status;
|
|
1631
1631
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
1632
1632
|
}
|
|
1633
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1633
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
1634
1634
|
function useMemo(fn, dependencies) {
|
|
1635
1635
|
return withPointer((pointer) => {
|
|
1636
1636
|
const prev = pointer.get();
|
|
@@ -1642,11 +1642,11 @@ function useMemo(fn, dependencies) {
|
|
|
1642
1642
|
return prev.value;
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1645
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
1646
1646
|
function useRef(val) {
|
|
1647
1647
|
return useState({ current: val })[0];
|
|
1648
1648
|
}
|
|
1649
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1649
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
1650
1650
|
function useKeypress(userHandler) {
|
|
1651
1651
|
const signal = useRef(userHandler);
|
|
1652
1652
|
signal.current = userHandler;
|
|
@@ -1664,7 +1664,7 @@ function useKeypress(userHandler) {
|
|
|
1664
1664
|
};
|
|
1665
1665
|
}, []);
|
|
1666
1666
|
}
|
|
1667
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
1667
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/utils.js
|
|
1668
1668
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
1669
1669
|
|
|
1670
1670
|
// ../../node_modules/.bun/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
|
|
@@ -2098,7 +2098,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
2098
2098
|
`);
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2101
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/utils.js
|
|
2102
2102
|
function breakLines(content, width) {
|
|
2103
2103
|
return content.split(`
|
|
2104
2104
|
`).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
|
|
@@ -2109,7 +2109,7 @@ function readlineWidth() {
|
|
|
2109
2109
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
2110
2110
|
}
|
|
2111
2111
|
|
|
2112
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2112
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
2113
2113
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
2114
2114
|
const state = useRef({
|
|
2115
2115
|
lastPointer: active,
|
|
@@ -2175,7 +2175,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
2175
2175
|
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
2176
2176
|
`);
|
|
2177
2177
|
}
|
|
2178
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2178
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
2179
2179
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
2180
2180
|
import * as readline2 from "node:readline";
|
|
2181
2181
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -2388,7 +2388,7 @@ var {
|
|
|
2388
2388
|
unload
|
|
2389
2389
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
2390
2390
|
|
|
2391
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2391
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
2392
2392
|
import { stripVTControlCharacters } from "node:util";
|
|
2393
2393
|
|
|
2394
2394
|
// ../../node_modules/.bun/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
@@ -2407,7 +2407,7 @@ var cursorTo = (x, y) => {
|
|
|
2407
2407
|
var eraseLine = ESC + "2K";
|
|
2408
2408
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
2409
2409
|
|
|
2410
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2410
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
2411
2411
|
var height = (content) => content.split(`
|
|
2412
2412
|
`).length;
|
|
2413
2413
|
var lastLine = (content) => content.split(`
|
|
@@ -2472,7 +2472,7 @@ class ScreenManager {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
2474
|
|
|
2475
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2475
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
2476
2476
|
class PromisePolyfill extends Promise {
|
|
2477
2477
|
static withResolver() {
|
|
2478
2478
|
let resolve;
|
|
@@ -2485,7 +2485,7 @@ class PromisePolyfill extends Promise {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
}
|
|
2487
2487
|
|
|
2488
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2488
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
2489
2489
|
function getCallSites() {
|
|
2490
2490
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
2491
2491
|
let result = [];
|
|
@@ -2571,7 +2571,7 @@ function createPrompt(view) {
|
|
|
2571
2571
|
};
|
|
2572
2572
|
return prompt;
|
|
2573
2573
|
}
|
|
2574
|
-
// ../../node_modules/.bun/@inquirer+core@11.1.1+
|
|
2574
|
+
// ../../node_modules/.bun/@inquirer+core@11.1.1+b219b5910764fa5c/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
2575
2575
|
import { styleText as styleText2 } from "node:util";
|
|
2576
2576
|
class Separator {
|
|
2577
2577
|
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default2.line));
|
|
@@ -2585,7 +2585,7 @@ class Separator {
|
|
|
2585
2585
|
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
2586
2586
|
}
|
|
2587
2587
|
}
|
|
2588
|
-
// ../../node_modules/.bun/@inquirer+select@5.0.4+
|
|
2588
|
+
// ../../node_modules/.bun/@inquirer+select@5.0.4+b219b5910764fa5c/node_modules/@inquirer/select/dist/index.js
|
|
2589
2589
|
import { styleText as styleText3 } from "node:util";
|
|
2590
2590
|
var selectTheme = {
|
|
2591
2591
|
icon: { cursor: dist_default2.pointer },
|
|
@@ -3147,6 +3147,86 @@ async function checkOllamaConnection() {
|
|
|
3147
3147
|
};
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
3150
|
+
var MIN_OLLAMA_VERSION = "0.14.2";
|
|
3151
|
+
function parseVersion(version) {
|
|
3152
|
+
const match = version.match(/(\d+)\.(\d+)\.(\d+)/);
|
|
3153
|
+
if (!match || !match[1] || !match[2] || !match[3])
|
|
3154
|
+
return null;
|
|
3155
|
+
return {
|
|
3156
|
+
major: parseInt(match[1], 10),
|
|
3157
|
+
minor: parseInt(match[2], 10),
|
|
3158
|
+
patch: parseInt(match[3], 10)
|
|
3159
|
+
};
|
|
3160
|
+
}
|
|
3161
|
+
function compareVersions(a, b) {
|
|
3162
|
+
const parsedA = parseVersion(a);
|
|
3163
|
+
const parsedB = parseVersion(b);
|
|
3164
|
+
if (!parsedA || !parsedB)
|
|
3165
|
+
return 0;
|
|
3166
|
+
if (parsedA.major !== parsedB.major)
|
|
3167
|
+
return parsedA.major - parsedB.major;
|
|
3168
|
+
if (parsedA.minor !== parsedB.minor)
|
|
3169
|
+
return parsedA.minor - parsedB.minor;
|
|
3170
|
+
return parsedA.patch - parsedB.patch;
|
|
3171
|
+
}
|
|
3172
|
+
async function checkOllamaVersion() {
|
|
3173
|
+
const ollamaUrl = getOllamaUrl();
|
|
3174
|
+
try {
|
|
3175
|
+
const response = await fetch(`${ollamaUrl}/api/version`, {
|
|
3176
|
+
signal: AbortSignal.timeout(5000)
|
|
3177
|
+
});
|
|
3178
|
+
if (!response.ok) {
|
|
3179
|
+
return {
|
|
3180
|
+
name: "Ollama Version",
|
|
3181
|
+
status: "warning",
|
|
3182
|
+
message: "Could not determine version",
|
|
3183
|
+
hint: "Ollama may not be running. Try: loclaude docker-up"
|
|
3184
|
+
};
|
|
3185
|
+
}
|
|
3186
|
+
const data = await response.json();
|
|
3187
|
+
const version = data.version;
|
|
3188
|
+
if (!version) {
|
|
3189
|
+
return {
|
|
3190
|
+
name: "Ollama Version",
|
|
3191
|
+
status: "warning",
|
|
3192
|
+
message: "Unknown version",
|
|
3193
|
+
hint: "Could not parse version from Ollama API"
|
|
3194
|
+
};
|
|
3195
|
+
}
|
|
3196
|
+
const comparison = compareVersions(version, MIN_OLLAMA_VERSION);
|
|
3197
|
+
if (comparison > 0) {
|
|
3198
|
+
return {
|
|
3199
|
+
name: "Ollama Version",
|
|
3200
|
+
status: "ok",
|
|
3201
|
+
message: "Compatible",
|
|
3202
|
+
version
|
|
3203
|
+
};
|
|
3204
|
+
} else if (comparison === 0) {
|
|
3205
|
+
return {
|
|
3206
|
+
name: "Ollama Version",
|
|
3207
|
+
status: "ok",
|
|
3208
|
+
message: "Compatible",
|
|
3209
|
+
version,
|
|
3210
|
+
hint: `Version ${version} is the minimum. Consider upgrading for best compatibility.`
|
|
3211
|
+
};
|
|
3212
|
+
} else {
|
|
3213
|
+
return {
|
|
3214
|
+
name: "Ollama Version",
|
|
3215
|
+
status: "error",
|
|
3216
|
+
message: `Version too old (requires > ${MIN_OLLAMA_VERSION})`,
|
|
3217
|
+
version,
|
|
3218
|
+
hint: `Upgrade Ollama to a version greater than ${MIN_OLLAMA_VERSION}`
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
} catch (error3) {
|
|
3222
|
+
return {
|
|
3223
|
+
name: "Ollama Version",
|
|
3224
|
+
status: "warning",
|
|
3225
|
+
message: "Could not check version",
|
|
3226
|
+
hint: `Cannot connect to ${ollamaUrl}. Start Ollama: loclaude docker-up`
|
|
3227
|
+
};
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3150
3230
|
function formatCheck(check) {
|
|
3151
3231
|
let line = statusLine(check.status, check.name, check.message, check.version);
|
|
3152
3232
|
if (check.hint) {
|
|
@@ -3164,7 +3244,8 @@ async function doctor() {
|
|
|
3164
3244
|
checkNvidiaSmi(),
|
|
3165
3245
|
checkNvidiaContainerToolkit(),
|
|
3166
3246
|
checkClaude(),
|
|
3167
|
-
checkOllamaConnection()
|
|
3247
|
+
checkOllamaConnection(),
|
|
3248
|
+
checkOllamaVersion()
|
|
3168
3249
|
]);
|
|
3169
3250
|
for (const check of checks) {
|
|
3170
3251
|
console.log(formatCheck(check));
|
|
@@ -3595,7 +3676,7 @@ run = "loclaude config"
|
|
|
3595
3676
|
`;
|
|
3596
3677
|
var README_TEMPLATE = `# Project Name
|
|
3597
3678
|
|
|
3598
|
-
> Powered by [loclaude](https://github.com/nicholasgalante1997/
|
|
3679
|
+
> Powered by [loclaude](https://github.com/nicholasgalante1997/loclaude) - Run Claude Code with local Ollama LLMs
|
|
3599
3680
|
|
|
3600
3681
|
## Prerequisites
|
|
3601
3682
|
|
|
@@ -3740,7 +3821,7 @@ Project-specific instructions for Claude Code.
|
|
|
3740
3821
|
|
|
3741
3822
|
## Project Overview
|
|
3742
3823
|
|
|
3743
|
-
This project uses [loclaude](https://github.com/nicholasgalante1997/
|
|
3824
|
+
This project uses [loclaude](https://github.com/nicholasgalante1997/loclaude) to run Claude Code with local Ollama LLMs.
|
|
3744
3825
|
|
|
3745
3826
|
## Quick Reference
|
|
3746
3827
|
|
|
@@ -4267,5 +4348,5 @@ export {
|
|
|
4267
4348
|
cli
|
|
4268
4349
|
};
|
|
4269
4350
|
|
|
4270
|
-
//# debugId=
|
|
4351
|
+
//# debugId=69EBCABA5DC262EB64756E2164756E21
|
|
4271
4352
|
//# sourceMappingURL=index.js.map
|