ollanet 0.6.3 → 0.6.4
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/README.md +16 -441
- package/dist/alias.d.ts +9 -0
- package/dist/alias.js +147 -0
- package/dist/bench.js +14 -5
- package/dist/cli.d.ts +4 -1
- package/dist/cli.js +16 -3
- package/dist/compare.js +12 -3
- package/dist/config.d.ts +23 -0
- package/dist/config.js +73 -1
- package/dist/help.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/mcp.d.ts +2 -1
- package/dist/mcp.js +2 -1
- package/dist/prompt.js +22 -3
- package/dist/ps.js +8 -3
- package/dist/pull.js +11 -5
- package/dist/rm.d.ts +1 -1
- package/dist/rm.js +11 -4
- package/dist/show.d.ts +1 -1
- package/dist/show.js +13 -3
- package/package.json +2 -1
package/dist/show.js
CHANGED
|
@@ -8,20 +8,24 @@ import { ollamaShow } from "./ollama-chat.js";
|
|
|
8
8
|
import { failUsage, isHelpFlag, printHelp, takeFlag } from "./argv.js";
|
|
9
9
|
import { resolveTarget } from "./target.js";
|
|
10
10
|
import { looksTuned } from "./tuned.js";
|
|
11
|
+
import { expandMachineModel, loadConfig } from "./config.js";
|
|
11
12
|
function showTimeoutMs() {
|
|
12
13
|
return envInt("OLLAMA_SHOW_TIMEOUT_MS", 30_000);
|
|
13
14
|
}
|
|
14
15
|
export function helpText() {
|
|
15
16
|
return `Usage:
|
|
16
17
|
ollanet show <machine> <model>
|
|
18
|
+
ollanet show <alias>
|
|
17
19
|
ollanet show --machine <name> --model <name>
|
|
18
20
|
|
|
19
21
|
Examples:
|
|
20
22
|
ollanet show studio gemma4-ctx32k
|
|
23
|
+
ollanet show desk
|
|
21
24
|
ollanet show localhost llama3.2:1b --json
|
|
22
25
|
|
|
23
26
|
Reads /api/show on that host — Modelfile, parameters, capabilities.
|
|
24
27
|
Tuned Finetuna-style names are marked [tuned].
|
|
28
|
+
A single alias name expands to that alias's machine + model.
|
|
25
29
|
|
|
26
30
|
Options:
|
|
27
31
|
--machine <name> Host (discovered name, MagicDNS, hostname, or IP[:port])
|
|
@@ -112,14 +116,20 @@ function printShow(result) {
|
|
|
112
116
|
}
|
|
113
117
|
export async function main() {
|
|
114
118
|
const parsed = parseArgs(process.argv.slice(2));
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
const config = await loadConfig();
|
|
120
|
+
const expanded = expandMachineModel(config, parsed.machine, parsed.model);
|
|
121
|
+
if (!expanded.machine || !expanded.model) {
|
|
122
|
+
if (!expanded.machine)
|
|
117
123
|
console.error("Machine is required.");
|
|
118
124
|
else
|
|
119
125
|
console.error("Model is required.");
|
|
120
126
|
usage();
|
|
121
127
|
}
|
|
122
|
-
const result = await showModel({
|
|
128
|
+
const result = await showModel({
|
|
129
|
+
machine: expanded.machine,
|
|
130
|
+
model: expanded.model,
|
|
131
|
+
config,
|
|
132
|
+
});
|
|
123
133
|
if (parsed.json) {
|
|
124
134
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
125
135
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ollanet",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Discover and talk to Ollama on any reachable network — CLI, MCP, and a Node library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"ps": "tsx src/cli.ts ps",
|
|
37
37
|
"chats": "tsx src/cli.ts chats",
|
|
38
38
|
"bench": "tsx src/cli.ts bench",
|
|
39
|
+
"alias": "tsx src/cli.ts alias",
|
|
39
40
|
"mcp": "tsx src/cli.ts mcp",
|
|
40
41
|
"start": "tsx src/cli.ts scan",
|
|
41
42
|
"typecheck": "tsc --noEmit",
|