totem-llm 0.1.0 → 0.1.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/README.md +42 -0
- package/lib/setup.js +2 -2
- package/package.json +1 -1
- package/scripts/postinstall.mjs +1 -1
- package/server/public/assets/{index-c07cc087.js → index-84c982ca.js} +1 -1
- package/server/public/assets/{index-62160652.js → index-cf1af4d2.js} +1 -1
- package/server/public/assets/{index-a6c0d98a.js → index-f87a3dfa.js} +1 -1
- package/server/public/index.js +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
Totem LLM is a sovereign AI solution, aimed at optimizing for consumer hardware and ensuring data privacy. It is designed to run efficiently on consumer-grade hardware, such as laptops and desktops, without the need for cloud-based processing. This allows users to have full control over their data and AI interactions, without relying on third-party services.
|
|
4
4
|
|
|
5
|
+
## Install Quick Start Package
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- [Node.js](https://nodejs.org/) v18 or later
|
|
10
|
+
- [Ollama](https://ollama.com/) (recommended) or an [OpenRouter](https://openrouter.ai/) API key
|
|
11
|
+
|
|
12
|
+
### 1. Install the package
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install -g totem-llm
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This downloads Totem LLM and installs all server and collector dependencies automatically.
|
|
19
|
+
|
|
20
|
+
### 2. Start Totem LLM
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
totem-llm start
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
On first run this performs one-time setup (creates `~/.totem-llm/`, migrates the database) then launches the server and document collector. Open [http://localhost:3001](http://localhost:3001) to access the UI.
|
|
27
|
+
|
|
28
|
+
### Options
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
totem-llm --no-collector Start without the document collector
|
|
32
|
+
totem-llm --port=8080 Override the server port (default: 3001)
|
|
33
|
+
totem-llm setup Run first-time setup without starting
|
|
34
|
+
totem-llm --help Show all options
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> **Storage**: All data is kept in `~/.totem-llm/` by default. Override with `TOTEM_STORAGE_DIR=/your/path totem-llm start`.
|
|
38
|
+
|
|
39
|
+
> **Windows (PowerShell)**: If you see `cannot be loaded because running scripts is disabled`, run this once in PowerShell then retry:
|
|
40
|
+
> ```powershell
|
|
41
|
+
> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
42
|
+
> ```
|
|
43
|
+
> Alternatively, use **Command Prompt** (`cmd.exe`) where `totem-llm.cmd` runs without any policy change.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
5
47
|
## Quick Start (Build from Source)
|
|
6
48
|
|
|
7
49
|
### Prerequisites
|
package/lib/setup.js
CHANGED
|
@@ -54,7 +54,7 @@ function buildEnvFile(storageDir) {
|
|
|
54
54
|
*/
|
|
55
55
|
function runCommand(cmd, args, { cwd, env } = {}) {
|
|
56
56
|
return new Promise((resolve, reject) => {
|
|
57
|
-
// On Windows,
|
|
57
|
+
// On Windows, .cmd files must be invoked through the shell (EINVAL otherwise)
|
|
58
58
|
const isWin = process.platform === "win32";
|
|
59
59
|
const bin = isWin && !cmd.endsWith(".cmd") ? `${cmd}.cmd` : cmd;
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ function runCommand(cmd, args, { cwd, env } = {}) {
|
|
|
62
62
|
cwd,
|
|
63
63
|
env,
|
|
64
64
|
stdio: "inherit",
|
|
65
|
-
shell:
|
|
65
|
+
shell: isWin,
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
child.on("close", (code) => {
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -30,7 +30,7 @@ function bin(name) {
|
|
|
30
30
|
/** Run a command, streaming output, resolving on exit-0, rejecting otherwise. */
|
|
31
31
|
function run(cmd, args, cwd) {
|
|
32
32
|
return new Promise((resolve, reject) => {
|
|
33
|
-
const child = spawn(bin(cmd), args, { cwd, stdio: "inherit", shell:
|
|
33
|
+
const child = spawn(bin(cmd), args, { cwd, stdio: "inherit", shell: isWin });
|
|
34
34
|
child.on("close", (code) =>
|
|
35
35
|
code === 0
|
|
36
36
|
? resolve()
|