loclaude 0.0.1-alpha.1
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/.claude/CLAUDE.md +175 -0
- package/CHANGELOG.md +49 -0
- package/LICENSE +31 -0
- package/README.md +249 -0
- package/bin/index.mjs +5 -0
- package/bin/index.ts +5 -0
- package/docker/docker-compose.yml +85 -0
- package/libs/cli/dist/cac.d.ts +6 -0
- package/libs/cli/dist/cac.d.ts.map +1 -0
- package/libs/cli/dist/commands/config.d.ts +6 -0
- package/libs/cli/dist/commands/config.d.ts.map +1 -0
- package/libs/cli/dist/commands/docker.d.ts +17 -0
- package/libs/cli/dist/commands/docker.d.ts.map +1 -0
- package/libs/cli/dist/commands/doctor.d.ts +5 -0
- package/libs/cli/dist/commands/doctor.d.ts.map +1 -0
- package/libs/cli/dist/commands/index.d.ts +6 -0
- package/libs/cli/dist/commands/index.d.ts.map +1 -0
- package/libs/cli/dist/commands/init.d.ts +9 -0
- package/libs/cli/dist/commands/init.d.ts.map +1 -0
- package/libs/cli/dist/commands/models.d.ts +9 -0
- package/libs/cli/dist/commands/models.d.ts.map +1 -0
- package/libs/cli/dist/config.d.ts +74 -0
- package/libs/cli/dist/config.d.ts.map +1 -0
- package/libs/cli/dist/constants.d.ts +12 -0
- package/libs/cli/dist/constants.d.ts.map +1 -0
- package/libs/cli/dist/index.bun.js +3742 -0
- package/libs/cli/dist/index.bun.js.map +55 -0
- package/libs/cli/dist/index.d.ts +2 -0
- package/libs/cli/dist/index.d.ts.map +1 -0
- package/libs/cli/dist/index.js +3745 -0
- package/libs/cli/dist/index.js.map +55 -0
- package/libs/cli/dist/spawn.d.ts +35 -0
- package/libs/cli/dist/spawn.d.ts.map +1 -0
- package/libs/cli/dist/types.d.ts +10 -0
- package/libs/cli/dist/types.d.ts.map +1 -0
- package/libs/cli/dist/utils.d.ts +14 -0
- package/libs/cli/dist/utils.d.ts.map +1 -0
- package/libs/cli/package.json +53 -0
- package/package.json +80 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-runtime spawn utilities
|
|
3
|
+
* Works with both Bun and Node.js
|
|
4
|
+
*/
|
|
5
|
+
export interface SpawnOptions {
|
|
6
|
+
env?: Record<string, string | undefined>;
|
|
7
|
+
cwd?: string;
|
|
8
|
+
stdin?: 'inherit' | 'pipe' | 'ignore';
|
|
9
|
+
stdout?: 'inherit' | 'pipe' | 'ignore';
|
|
10
|
+
stderr?: 'inherit' | 'pipe' | 'ignore';
|
|
11
|
+
}
|
|
12
|
+
export interface SpawnResult {
|
|
13
|
+
exitCode: number;
|
|
14
|
+
stdout?: string;
|
|
15
|
+
stderr?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Spawn a process and wait for it to complete
|
|
19
|
+
* Returns exit code (inherits stdio by default)
|
|
20
|
+
*/
|
|
21
|
+
export declare function spawn(cmd: string[], opts?: SpawnOptions): Promise<number>;
|
|
22
|
+
/**
|
|
23
|
+
* Spawn a process and capture its output
|
|
24
|
+
* Returns stdout/stderr as strings
|
|
25
|
+
*/
|
|
26
|
+
export declare function spawnCapture(cmd: string[], opts?: Omit<SpawnOptions, 'stdout' | 'stderr'>): Promise<SpawnResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a command exists in PATH
|
|
29
|
+
*/
|
|
30
|
+
export declare function commandExists(cmd: string): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Get the version of a command (assumes --version flag)
|
|
33
|
+
*/
|
|
34
|
+
export declare function getCommandVersion(cmd: string): Promise<string | null>;
|
|
35
|
+
//# sourceMappingURL=spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../lib/spawn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,S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amaModel } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Fetch available models from Ollama API
|
|
4
|
+
*/
|
|
5
|
+
export declare function fetchOllamaModels(): Promise<OllamaModel[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Interactive model selection prompt
|
|
8
|
+
*/
|
|
9
|
+
export declare function selectModelInteractively(): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Launch Claude with Ollama configuration
|
|
12
|
+
*/
|
|
13
|
+
export declare function launchClaude(model: string, passthroughArgs: string[]): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../lib/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,SAAS,CAAC;AAE/D;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAQhE;AAED;;GAEG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,CA2BhE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,iBAa1E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loclaude-internal/cli",
|
|
3
|
+
"version": "0.0.1-alpha.1",
|
|
4
|
+
"module": "dist/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./bun": {
|
|
14
|
+
"import": "./dist/index.bun.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.bun.js"
|
|
17
|
+
},
|
|
18
|
+
"./bun.js": {
|
|
19
|
+
"import": "./dist/index.bun.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.bun.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"bun": ">=1.3"
|
|
29
|
+
},
|
|
30
|
+
"packageManager": "bun@1.3.6",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prebuild": "rm -rf dist",
|
|
33
|
+
"build-types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
|
34
|
+
"bundle": "bun build.ts",
|
|
35
|
+
"build": "run-p build-types bundle",
|
|
36
|
+
"postbuild": "npm pack",
|
|
37
|
+
"test": "bun test",
|
|
38
|
+
"test:watch": "bun test --watch"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/bun": "latest",
|
|
42
|
+
"@types/bytes": "^3.1.5",
|
|
43
|
+
"npm-run-all": "^4.1.5"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"typescript": "^5"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@inquirer/prompts": "^8.2.0",
|
|
50
|
+
"bytes": "^3.1.2",
|
|
51
|
+
"cac": "^6.7.14"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "loclaude",
|
|
3
|
+
"version": "0.0.1-alpha.1",
|
|
4
|
+
"description": "Run Claude Code with local Ollama LLMs",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"claude",
|
|
9
|
+
"ollama",
|
|
10
|
+
"llm",
|
|
11
|
+
"cli",
|
|
12
|
+
"ai",
|
|
13
|
+
"open-webui",
|
|
14
|
+
"claude-code"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/nicholasgalante1997/docker-ollama.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/nicholasgalante1997/docker-ollama#readme",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/nicholasgalante1997/docker-ollama/issues"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
".claude/CLAUDE.md",
|
|
26
|
+
"bin",
|
|
27
|
+
"dist",
|
|
28
|
+
"docker/docker-compose.yml",
|
|
29
|
+
"libs/cli/package.json",
|
|
30
|
+
"libs/cli/dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"bin": {
|
|
36
|
+
"loclaude": "bin/index.ts",
|
|
37
|
+
"node-loclaude": "bin/index.mjs"
|
|
38
|
+
},
|
|
39
|
+
"workspaces": [
|
|
40
|
+
"libs/*"
|
|
41
|
+
],
|
|
42
|
+
"engines": {
|
|
43
|
+
"bun": ">=1.3"
|
|
44
|
+
},
|
|
45
|
+
"packageManager": "bun@1.3.6",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"lint": "eslint libs",
|
|
48
|
+
"format": "prettier --write libs",
|
|
49
|
+
"build": "turbo run build",
|
|
50
|
+
"test": "bun test libs/cli",
|
|
51
|
+
"prerelease-check": "./scripts/prerelease-check.sh",
|
|
52
|
+
"prepublishOnly": "bun run build",
|
|
53
|
+
"release": "bun run build && npm publish --access public",
|
|
54
|
+
"release:rc": "bun run build && npm publish --tag rc --access public",
|
|
55
|
+
"release:beta": "bun run build && npm publish --tag beta --access public"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@loclaude-internal/cli": "workspace:*"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"typescript": "^5"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesMeta": {
|
|
64
|
+
"typescript": {
|
|
65
|
+
"optional": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@eslint/js": "^9.39.2",
|
|
70
|
+
"@eslint/json": "^0.14.0",
|
|
71
|
+
"@eslint/markdown": "^7.5.1",
|
|
72
|
+
"@types/bun": "latest",
|
|
73
|
+
"eslint": "^9.39.2",
|
|
74
|
+
"globals": "^17.0.0",
|
|
75
|
+
"jiti": "^2.6.1",
|
|
76
|
+
"prettier": "^3.8.0",
|
|
77
|
+
"turbo": "^2.7.5",
|
|
78
|
+
"typescript-eslint": "^8.53.1"
|
|
79
|
+
}
|
|
80
|
+
}
|