loclaude 0.0.1-alpha.1 → 0.0.1-alpha.3

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.
@@ -0,0 +1,107 @@
1
+ /**
2
+ * CLI Output Utilities
3
+ *
4
+ * Provides colorful, themed output for the loclaude CLI.
5
+ * Uses picocolors for terminal colors.
6
+ *
7
+ * Color Palette:
8
+ * - Brand/Primary: cyan - Headers, branding, info
9
+ * - Accent: magenta - Highlights, interactive elements
10
+ * - Success: green - Confirmations, completed tasks
11
+ * - Warning: yellow - Cautions, non-critical issues
12
+ * - Error: red - Failures, critical issues
13
+ * - Dim: gray - Secondary info, hints
14
+ */
15
+ /** Brand-colored bold text for headers and branding */
16
+ export declare const brand: (text: string) => string;
17
+ /** Accent color for highlights */
18
+ export declare const accent: (text: string) => string;
19
+ /** Bright cyan for emphasis */
20
+ export declare const highlight: (text: string) => string;
21
+ /** Success message with checkmark */
22
+ export declare const success: (text: string) => string;
23
+ /** Warning message with caution symbol */
24
+ export declare const warn: (text: string) => string;
25
+ /** Error message with X symbol */
26
+ export declare const error: (text: string) => string;
27
+ /** Info message with info symbol */
28
+ export declare const info: (text: string) => string;
29
+ /** Dimmed/muted text for secondary information */
30
+ export declare const dim: (text: string) => string;
31
+ /** Bold text for emphasis */
32
+ export declare const bold: (text: string) => string;
33
+ /** Underlined text */
34
+ export declare const underline: (text: string) => string;
35
+ /** Green colored text */
36
+ export declare const green: (text: string) => string;
37
+ /** Yellow colored text */
38
+ export declare const yellow: (text: string) => string;
39
+ /** Red colored text */
40
+ export declare const red: (text: string) => string;
41
+ /** Cyan colored text */
42
+ export declare const cyan: (text: string) => string;
43
+ /** Magenta colored text */
44
+ export declare const magenta: (text: string) => string;
45
+ /** Print a branded header with underline */
46
+ export declare function header(text: string): void;
47
+ /** Print a section title */
48
+ export declare function section(title: string): void;
49
+ /** Print a labeled value */
50
+ export declare function labelValue(label: string, value: string): void;
51
+ /**
52
+ * Format a status line with icon
53
+ *
54
+ * @example
55
+ * statusLine('ok', 'Docker', 'Installed', 'v24.0.0')
56
+ * // ✓ Docker: Installed (v24.0.0)
57
+ */
58
+ export declare function statusLine(status: 'ok' | 'warning' | 'error', name: string, message: string, extra?: string): string;
59
+ /**
60
+ * Print a hint/suggestion with arrow
61
+ */
62
+ export declare function hint(text: string): void;
63
+ /**
64
+ * Print the loclaude banner
65
+ */
66
+ export declare function banner(): void;
67
+ /**
68
+ * Print a spinner-style loading message
69
+ */
70
+ export declare function loading(text: string): void;
71
+ /**
72
+ * Print a completion message
73
+ */
74
+ export declare function done(text: string): void;
75
+ /**
76
+ * Print a table row with consistent formatting
77
+ */
78
+ export declare function tableRow(columns: string[], widths: number[]): string;
79
+ /**
80
+ * Print a table header with underline
81
+ */
82
+ export declare function tableHeader(columns: string[], widths: number[]): void;
83
+ /**
84
+ * Format bytes with color based on size
85
+ */
86
+ export declare function coloredSize(sizeStr: string): string;
87
+ /**
88
+ * Format a URL for display
89
+ */
90
+ export declare function url(urlStr: string): string;
91
+ /**
92
+ * Format a command for display
93
+ */
94
+ export declare function cmd(command: string): string;
95
+ /**
96
+ * Format a file path for display
97
+ */
98
+ export declare function file(filePath: string): string;
99
+ /**
100
+ * Print a success summary box
101
+ */
102
+ export declare function successBox(title: string, lines: string[]): void;
103
+ /**
104
+ * Print an error summary box
105
+ */
106
+ export declare function errorBox(title: string, lines: string[]): void;
107
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../lib/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,uDAAuD;AACvD,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,WAA2B,CAAC;AAE9D,kCAAkC;AAClC,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,WAAqB,CAAC;AAEzD,+BAA+B;AAC/B,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,WAAkB,CAAC;AAMzD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,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CASR;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;GAEG;AACH,wBAAgB,MAAM,IAAI,IAAI,CAM7B;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAOpE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAQrE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7C;AAMD;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAO/D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAO7D"}
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Type definitions for Ollama API responses
3
+ */
1
4
  export interface OllamaModel {
2
5
  name: string;
3
6
  model: string;
@@ -7,4 +10,41 @@ export interface OllamaModel {
7
10
  export interface OllamaTagsResponse {
8
11
  models: OllamaModel[];
9
12
  }
13
+ export interface RunningModel {
14
+ /** Model identifier */
15
+ model: string;
16
+ /** Model name */
17
+ name: string;
18
+ /** Size in VRAM (bytes) */
19
+ size_vram: number;
20
+ /** Digest hash */
21
+ digest: string;
22
+ /** When the model will be unloaded */
23
+ expires_at: string;
24
+ /** Model details */
25
+ details: {
26
+ parent_model: string;
27
+ format: string;
28
+ family: string;
29
+ families: string[];
30
+ parameter_size: string;
31
+ quantization_level: string;
32
+ };
33
+ }
34
+ export interface OllamaPsResponse {
35
+ models: RunningModel[];
36
+ }
37
+ export interface OllamaGenerateRequest {
38
+ model: string;
39
+ prompt: string;
40
+ stream?: boolean;
41
+ keep_alive?: string;
42
+ }
43
+ export interface OllamaGenerateResponse {
44
+ model: string;
45
+ created_at: string;
46
+ response: string;
47
+ done: boolean;
48
+ done_reason?: string;
49
+ }
10
50
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAMD,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB;IACpB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAMD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -1,8 +1,26 @@
1
- import type { OllamaModel } from './types';
1
+ import type { OllamaModel, RunningModel } from './types';
2
2
  /**
3
3
  * Fetch available models from Ollama API
4
4
  */
5
5
  export declare function fetchOllamaModels(): Promise<OllamaModel[]>;
6
+ /**
7
+ * Fetch currently running/loaded models from Ollama API
8
+ */
9
+ export declare function fetchRunningModels(): Promise<RunningModel[]>;
10
+ /**
11
+ * Check if a specific model is currently loaded in memory
12
+ */
13
+ export declare function isModelLoaded(modelName: string): Promise<boolean>;
14
+ /**
15
+ * Load a model into memory with specified keep_alive duration
16
+ * Sends an empty prompt to trigger model loading
17
+ */
18
+ export declare function loadModel(modelName: string, keepAlive?: string): Promise<void>;
19
+ /**
20
+ * Ensure a model is loaded, loading it if necessary
21
+ * Shows progress while loading
22
+ */
23
+ export declare function ensureModelLoaded(modelName: string): Promise<void>;
6
24
  /**
7
25
  * Interactive model selection prompt
8
26
  */
@@ -1 +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"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../lib/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAwC,YAAY,EAAE,MAAM,SAAS,CAAC;AAM/F;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAQhE;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAgBlE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWvE;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB3F;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBxE;AAMD;;GAEG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,CAmChE;AAMD;;GAEG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,iBAuB1E"}
@@ -1,9 +1,32 @@
1
1
  {
2
2
  "name": "@loclaude-internal/cli",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.2",
4
+ "description": "An internal @loclaude-internal package that supplies common CLI utilities.",
4
5
  "module": "dist/index.js",
5
6
  "type": "module",
6
- "private": true,
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "claude",
10
+ "ollama",
11
+ "llm",
12
+ "cli",
13
+ "ai",
14
+ "open-webui",
15
+ "claude-code"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/nicholasgalante1997/loclaude.git"
20
+ },
21
+ "homepage": "https://github.com/nicholasgalante1997/loclaude.git#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/nicholasgalante1997/loclaude.git/issues"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "registry": "https://registry.npmjs.org/",
28
+ "tag": "alpha"
29
+ },
7
30
  "exports": {
8
31
  ".": {
9
32
  "import": "./dist/index.js",
@@ -22,7 +45,10 @@
22
45
  }
23
46
  },
24
47
  "files": [
25
- "dist"
48
+ "dist",
49
+ "CHANGELOG.md",
50
+ "LICENSE",
51
+ "README.md"
26
52
  ],
27
53
  "engines": {
28
54
  "bun": ">=1.3"
@@ -35,7 +61,12 @@
35
61
  "build": "run-p build-types bundle",
36
62
  "postbuild": "npm pack",
37
63
  "test": "bun test",
38
- "test:watch": "bun test --watch"
64
+ "test:watch": "bun test --watch",
65
+ "prepublishOnly": "bun run build",
66
+ "release": "bun run build && npm publish --access public",
67
+ "release:rc": "bun run build && npm publish --tag rc --access public",
68
+ "release:alpha": "bun run build && npm publish --tag alpha --access public",
69
+ "release:beta": "bun run build && npm publish --tag beta --access public"
39
70
  },
40
71
  "devDependencies": {
41
72
  "@types/bun": "latest",
@@ -45,9 +76,15 @@
45
76
  "peerDependencies": {
46
77
  "typescript": "^5"
47
78
  },
79
+ "peerDependenciesMeta": {
80
+ "typescript": {
81
+ "optional": true
82
+ }
83
+ },
48
84
  "dependencies": {
49
85
  "@inquirer/prompts": "^8.2.0",
50
86
  "bytes": "^3.1.2",
51
- "cac": "^6.7.14"
87
+ "cac": "^6.7.14",
88
+ "picocolors": "^1.1.1"
52
89
  }
53
90
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "loclaude",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.3",
4
4
  "description": "Run Claude Code with local Ollama LLMs",
5
5
  "type": "module",
6
- "license": "MIT",
6
+ "license": "./LICENSE",
7
7
  "keywords": [
8
8
  "claude",
9
9
  "ollama",
@@ -13,6 +13,13 @@
13
13
  "open-webui",
14
14
  "claude-code"
15
15
  ],
16
+ "contributors": [
17
+ {
18
+ "email": "rustycloud42@protonmail.com",
19
+ "name": "mega-blastoise",
20
+ "url": "https://github.com/mega-blastoise"
21
+ }
22
+ ],
16
23
  "repository": {
17
24
  "type": "git",
18
25
  "url": "git+https://github.com/nicholasgalante1997/docker-ollama.git"
@@ -21,6 +28,11 @@
21
28
  "bugs": {
22
29
  "url": "https://github.com/nicholasgalante1997/docker-ollama/issues"
23
30
  },
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/",
34
+ "tag": "alpha"
35
+ },
24
36
  "files": [
25
37
  ".claude/CLAUDE.md",
26
38
  "bin",
@@ -33,8 +45,8 @@
33
45
  "LICENSE"
34
46
  ],
35
47
  "bin": {
36
- "loclaude": "bin/index.ts",
37
- "node-loclaude": "bin/index.mjs"
48
+ "loclaude": "bin/index.mjs",
49
+ "bun-loclaude": "bin/index.ts"
38
50
  },
39
51
  "workspaces": [
40
52
  "libs/*"
@@ -44,6 +56,7 @@
44
56
  },
45
57
  "packageManager": "bun@1.3.6",
46
58
  "scripts": {
59
+ "docs": "bunx serve ./docs",
47
60
  "lint": "eslint libs",
48
61
  "format": "prettier --write libs",
49
62
  "build": "turbo run build",
@@ -52,10 +65,11 @@
52
65
  "prepublishOnly": "bun run build",
53
66
  "release": "bun run build && npm publish --access public",
54
67
  "release:rc": "bun run build && npm publish --tag rc --access public",
68
+ "release:alpha": "bun run build && npm publish --tag alpha --access public",
55
69
  "release:beta": "bun run build && npm publish --tag beta --access public"
56
70
  },
57
71
  "dependencies": {
58
- "@loclaude-internal/cli": "workspace:*"
72
+ "@loclaude-internal/cli": "^0.0.1-alpha.2"
59
73
  },
60
74
  "peerDependencies": {
61
75
  "typescript": "^5"