notoken-core 1.2.0 → 1.2.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/README.md +47 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# notoken-core
|
|
2
|
+
|
|
3
|
+
Shared engine for [notoken](https://notoken.sh) — NLP parsing, execution, detection, analysis.
|
|
4
|
+
|
|
5
|
+
Used by the CLI (`notoken`) and the desktop app (`notoken-installer`).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install notoken-core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
parseIntent,
|
|
18
|
+
executeIntent,
|
|
19
|
+
detectLocalPlatform,
|
|
20
|
+
checkForUpdate,
|
|
21
|
+
} from "notoken-core";
|
|
22
|
+
|
|
23
|
+
// Parse natural language into a structured intent
|
|
24
|
+
const parsed = await parseIntent("restart nginx on prod");
|
|
25
|
+
console.log(parsed.intent.intent); // "service.restart"
|
|
26
|
+
console.log(parsed.intent.fields); // { service: "nginx", environment: "prod" }
|
|
27
|
+
|
|
28
|
+
// Detect platform
|
|
29
|
+
const platform = detectLocalPlatform();
|
|
30
|
+
console.log(platform.distro); // "Ubuntu 24.04.2 LTS"
|
|
31
|
+
console.log(platform.packageManager); // "apt"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## What's Inside
|
|
35
|
+
|
|
36
|
+
- **119 config-driven intents** — services, docker, git, files, network, security, databases, and more
|
|
37
|
+
- **NLP pipeline** — rule parser + compromise POS tagging + multi-classifier + keyboard typo correction
|
|
38
|
+
- **LLM fallback** — Claude CLI, OpenAI API, or Ollama (auto-detected)
|
|
39
|
+
- **File parsers** — passwd, shadow, .env, yaml, json, nginx, apache, BIND zone files
|
|
40
|
+
- **Intelligent analysis** — load/disk/memory assessment, project type detection
|
|
41
|
+
- **Conversation persistence** — knowledge tree, coreference resolution
|
|
42
|
+
- **Platform detection** — Linux/macOS/Windows/WSL, adapts commands per OS
|
|
43
|
+
- **Adaptive rules** — learns from failures via LLM
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT — [Dino Bartolome](https://notoken.sh)
|