@tyvm/knowhow 0.0.109-dev.e88af1e → 0.0.110
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/autodoc/README.md +324 -0
- package/autodoc/chat-guide.md +268 -365
- package/autodoc/cli-reference.md +399 -473
- package/autodoc/config-reference.md +431 -330
- package/autodoc/embeddings-guide.md +223 -322
- package/autodoc/generate-guide.md +261 -301
- package/autodoc/language-plugin-guide.md +221 -247
- package/autodoc/modules-guide.md +242 -215
- package/autodoc/plugins-guide.md +470 -469
- package/autodoc/quickstart-guide.md +67 -70
- package/autodoc/skills-guide.md +455 -339
- package/autodoc/worker-guide.md +301 -308
- package/package.json +1 -1
- package/src/agents/tools/list.ts +2 -2
- package/src/ai.ts +81 -37
- package/src/chat/CliChatService.ts +1 -1
- package/src/chat/modules/SystemModule.ts +2 -2
- package/src/clients/anthropic.ts +1 -1
- package/src/clients/index.ts +25 -6
- package/src/clients/openai.ts +8 -5
- package/src/clients/types.ts +29 -6
- package/src/clients/withRetry.ts +89 -0
- package/src/commands/agent.ts +30 -0
- package/src/commands/modules.ts +365 -30
- package/src/config.ts +1 -1
- package/src/hashes.ts +8 -9
- package/src/index.ts +4 -2
- package/src/processors/Base64ImageDetector.ts +73 -0
- package/src/services/MediaProcessorService.ts +79 -10
- package/src/services/modules/index.ts +24 -19
- package/tests/processors/Base64ImageDetector.test.ts +160 -0
- package/tests/unit/clients/AIClient.test.ts +446 -0
- package/tests/unit/clients/withRetry.test.ts +319 -0
- package/tests/unit/commands/github-credentials.test.ts +1 -2
- package/ts_build/package.json +1 -1
- package/ts_build/src/agents/tools/list.js +2 -2
- package/ts_build/src/agents/tools/list.js.map +1 -1
- package/ts_build/src/ai.d.ts +3 -3
- package/ts_build/src/ai.js +51 -23
- package/ts_build/src/ai.js.map +1 -1
- package/ts_build/src/chat/CliChatService.js +1 -1
- package/ts_build/src/chat/CliChatService.js.map +1 -1
- package/ts_build/src/chat/modules/SystemModule.js +2 -2
- package/ts_build/src/chat/modules/SystemModule.js.map +1 -1
- package/ts_build/src/clients/anthropic.js +1 -1
- package/ts_build/src/clients/anthropic.js.map +1 -1
- package/ts_build/src/clients/index.js +7 -6
- package/ts_build/src/clients/index.js.map +1 -1
- package/ts_build/src/clients/openai.js +4 -4
- package/ts_build/src/clients/openai.js.map +1 -1
- package/ts_build/src/clients/types.d.ts +12 -6
- package/ts_build/src/clients/withRetry.d.ts +2 -0
- package/ts_build/src/clients/withRetry.js +60 -0
- package/ts_build/src/clients/withRetry.js.map +1 -0
- package/ts_build/src/commands/agent.js +25 -0
- package/ts_build/src/commands/agent.js.map +1 -1
- package/ts_build/src/commands/modules.js +297 -17
- package/ts_build/src/commands/modules.js.map +1 -1
- package/ts_build/src/config.js +1 -1
- package/ts_build/src/config.js.map +1 -1
- package/ts_build/src/hashes.js +5 -7
- package/ts_build/src/hashes.js.map +1 -1
- package/ts_build/src/index.js +1 -1
- package/ts_build/src/index.js.map +1 -1
- package/ts_build/src/processors/Base64ImageDetector.d.ts +3 -0
- package/ts_build/src/processors/Base64ImageDetector.js +42 -0
- package/ts_build/src/processors/Base64ImageDetector.js.map +1 -1
- package/ts_build/src/services/MediaProcessorService.d.ts +5 -4
- package/ts_build/src/services/MediaProcessorService.js +53 -8
- package/ts_build/src/services/MediaProcessorService.js.map +1 -1
- package/ts_build/src/services/modules/index.js +17 -13
- package/ts_build/src/services/modules/index.js.map +1 -1
- package/ts_build/tests/processors/Base64ImageDetector.test.js +111 -0
- package/ts_build/tests/processors/Base64ImageDetector.test.js.map +1 -1
- package/ts_build/tests/unit/clients/AIClient.test.d.ts +1 -0
- package/ts_build/tests/unit/clients/AIClient.test.js +339 -0
- package/ts_build/tests/unit/clients/AIClient.test.js.map +1 -0
- package/ts_build/tests/unit/clients/withRetry.test.d.ts +1 -0
- package/ts_build/tests/unit/clients/withRetry.test.js +225 -0
- package/ts_build/tests/unit/clients/withRetry.test.js.map +1 -0
- package/ts_build/tests/unit/commands/github-credentials.test.js +1 -2
- package/ts_build/tests/unit/commands/github-credentials.test.js.map +1 -1
|
@@ -1,129 +1,126 @@
|
|
|
1
1
|
# Knowhow Quickstart
|
|
2
2
|
|
|
3
|
-
Knowhow is an AI CLI
|
|
3
|
+
Knowhow is an AI CLI that uses plugins/tools, builds embeddings from your files, and lets you chat/ask using a configured project.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Website: https://knowhow.tyvm.ai
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## 1) Installation
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Option A: Install globally
|
|
12
12
|
```bash
|
|
13
13
|
npm i -g @tyvm/knowhow
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
### npx (
|
|
16
|
+
### Option B: Use with `npx` (no global install)
|
|
17
17
|
```bash
|
|
18
|
-
npx @tyvm/knowhow@latest --version
|
|
18
|
+
npx @tyvm/knowhow@latest knowhow --version
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
knowhow --help
|
|
24
|
-
```
|
|
21
|
+
> After that, you can run commands as `knowhow ...` (or via `npx ... knowhow ...`).
|
|
25
22
|
|
|
26
23
|
---
|
|
27
24
|
|
|
28
25
|
## 2) Initialize a project (`knowhow init`)
|
|
29
26
|
|
|
30
|
-
From your project
|
|
27
|
+
From your project folder, run:
|
|
31
28
|
```bash
|
|
32
29
|
knowhow init
|
|
33
30
|
```
|
|
34
31
|
|
|
35
|
-
This creates
|
|
32
|
+
This creates a local **Knowhow workspace** in `./.knowhow/` and also sets up global templates in `~/.knowhow/`.
|
|
33
|
+
|
|
34
|
+
### What it creates locally
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
In your current directory:
|
|
37
|
+
- `./.knowhow/`
|
|
38
|
+
- `knowhow.json` (your project configuration)
|
|
39
|
+
- `language.json`
|
|
40
|
+
- `prompts/` (prompt templates)
|
|
41
|
+
- `docs/` (generated docs output)
|
|
42
|
+
- `embeddings/` (generated embedding output)
|
|
43
|
+
- `.ignore`, `.hashes.json`, `.jwt` (runtime/support files)
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
- `~/.knowhow/` (stores template copies used by `init`)
|
|
45
|
+
You can edit `./.knowhow/knowhow.json` to customize sources, embeddings, plugins, agents, etc.
|
|
48
46
|
|
|
49
47
|
---
|
|
50
48
|
|
|
51
49
|
## 3) Login (`knowhow login`)
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
Run:
|
|
55
52
|
```bash
|
|
56
53
|
knowhow login
|
|
57
54
|
```
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
### What login does
|
|
57
|
+
- Starts a **browser-based OAuth/login flow** (it creates a short-lived login session, opens your browser, waits until you approve).
|
|
58
|
+
- Retrieves a **JWT token** after approval.
|
|
59
|
+
- Stores the JWT at:
|
|
60
|
+
- `./.knowhow/.jwt` (permissions are set so only you can read it)
|
|
61
|
+
|
|
62
|
+
### If you already have a JWT
|
|
60
63
|
```bash
|
|
61
64
|
knowhow login --jwt
|
|
62
65
|
```
|
|
63
66
|
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
-
|
|
67
|
+
After authentication, Knowhow:
|
|
68
|
+
- Calls Knowhow’s API (`/api/users/me`) using your JWT
|
|
69
|
+
- Prints your current user + organization
|
|
70
|
+
- Saves `orgId` into `./.knowhow/knowhow.json`
|
|
71
|
+
- Ensures the `knowhow` model provider is enabled in your config
|
|
69
72
|
|
|
70
73
|
---
|
|
71
74
|
|
|
72
75
|
## 4) Basic first run
|
|
73
76
|
|
|
74
|
-
After `init` + `login`, you can
|
|
77
|
+
After `knowhow init` + `knowhow login`, you can start immediately.
|
|
75
78
|
|
|
79
|
+
### Recommended: build embeddings first
|
|
76
80
|
```bash
|
|
77
|
-
knowhow
|
|
81
|
+
knowhow embed
|
|
78
82
|
```
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
### Then chat
|
|
81
85
|
```bash
|
|
82
|
-
knowhow
|
|
86
|
+
knowhow chat
|
|
83
87
|
```
|
|
84
88
|
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
knowhow search --input "How do plugins work in Knowhow?"
|
|
88
|
-
```
|
|
89
|
+
You can ask questions about your indexed project content.
|
|
89
90
|
|
|
90
91
|
---
|
|
91
92
|
|
|
92
|
-
## 5) Key concepts (quick
|
|
93
|
-
|
|
94
|
-
- **`knowhow.json` (config file)**
|
|
95
|
-
The main project configuration inside `.knowhow/knowhow.json`. It controls:
|
|
96
|
-
- **plugins** (enabled/disabled)
|
|
97
|
-
- **sources** (what to generate and where)
|
|
98
|
-
- **embedSources** (what to embed and where)
|
|
99
|
-
- **embeddingModel**, agents, model providers, worker settings, etc.
|
|
100
|
-
|
|
101
|
-
- **Plugins**
|
|
102
|
-
Small capability modules (e.g., language, git, embeddings, etc.). Knowhow enables/loads them based on `knowhow.json`.
|
|
103
|
-
|
|
104
|
-
- **Sources**
|
|
105
|
-
Inputs that Knowhow can **generate** from. Each source defines things like:
|
|
106
|
-
- `input` glob/pattern
|
|
107
|
-
- `output` path
|
|
108
|
-
- `prompt` template to use
|
|
109
|
-
|
|
110
|
-
- **Embeddings (and `embedSources`)**
|
|
111
|
-
Defines what files to chunk/embed and where to write embedding JSON outputs (typically under `.knowhow/embeddings/`).
|
|
112
|
-
|
|
113
|
-
- **Worker**
|
|
114
|
-
A separate runnable process to execute work in a sandbox/isolated way. You can start/register workers with:
|
|
115
|
-
```bash
|
|
116
|
-
knowhow worker --register
|
|
117
|
-
```
|
|
118
|
-
and manage them with:
|
|
119
|
-
```bash
|
|
120
|
-
knowhow workers --list
|
|
121
|
-
```
|
|
93
|
+
## 5) Key concepts (quick overview)
|
|
122
94
|
|
|
123
|
-
|
|
95
|
+
### `knowhow.json` (project config)
|
|
96
|
+
Your main configuration file at `./.knowhow/knowhow.json`. It controls:
|
|
97
|
+
- enabled plugins
|
|
98
|
+
- what files to turn into docs/artifacts (**sources**)
|
|
99
|
+
- what files to embed for retrieval (**embedSources**)
|
|
100
|
+
- model providers and the worker/tunneling behavior
|
|
101
|
+
|
|
102
|
+
### Plugins
|
|
103
|
+
Plugins are “tools” Knowhow can use (for example: embeddings, git, agents, download, etc.).
|
|
104
|
+
They’re enabled/disabled via `config.plugins.enabled/disabled`.
|
|
105
|
+
|
|
106
|
+
### Sources
|
|
107
|
+
**Sources** describe generation tasks (input files → output file(s) + which prompt to use).
|
|
108
|
+
Example fields (names vary by config): `sources[].input`, `sources[].output`, `sources[].prompt`.
|
|
109
|
+
|
|
110
|
+
### Embeddings
|
|
111
|
+
**Embeddings** are vector indexes built from configured inputs (`embedSources`).
|
|
112
|
+
Running:
|
|
113
|
+
```bash
|
|
114
|
+
knowhow embed
|
|
115
|
+
```
|
|
116
|
+
creates embedding data under `./.knowhow/embeddings/` (based on your `embedSources`).
|
|
124
117
|
|
|
125
|
-
|
|
118
|
+
### Worker
|
|
119
|
+
A **worker** controls background execution features (for example, tunneling/remote execution support).
|
|
120
|
+
This lives under the `worker` section in `knowhow.json`.
|
|
121
|
+
|
|
122
|
+
---
|
|
126
123
|
|
|
127
|
-
|
|
124
|
+
## Links
|
|
128
125
|
- https://knowhow.tyvm.ai
|
|
129
126
|
- https://x.com/micahriggan
|