npcsh 1.0.11__py3-none-any.whl → 1.0.13__py3-none-any.whl
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.
- npcsh/_state.py +89 -1
- npcsh/alicanto.py +22 -7
- npcsh/npcsh.py +434 -492
- npcsh/plonk.py +300 -367
- npcsh/routes.py +367 -162
- npcsh/spool.py +162 -221
- npcsh-1.0.13.dist-info/METADATA +775 -0
- npcsh-1.0.13.dist-info/RECORD +21 -0
- npcsh-1.0.11.dist-info/METADATA +0 -596
- npcsh-1.0.11.dist-info/RECORD +0 -21
- {npcsh-1.0.11.dist-info → npcsh-1.0.13.dist-info}/WHEEL +0 -0
- {npcsh-1.0.11.dist-info → npcsh-1.0.13.dist-info}/entry_points.txt +0 -0
- {npcsh-1.0.11.dist-info → npcsh-1.0.13.dist-info}/licenses/LICENSE +0 -0
- {npcsh-1.0.11.dist-info → npcsh-1.0.13.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
npcsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
npcsh/_state.py,sha256=UEI28eLEHS4xJZOlNynSfZWnxipZV086ynGzoAdQmUY,33601
|
|
3
|
+
npcsh/alicanto.py,sha256=-muGqd0O2m8xcFBctEavSEizWbQmzuPSdcT-3YqYBhY,45043
|
|
4
|
+
npcsh/guac.py,sha256=Ocmk_c4NUtGsC3JOtmkbgLvD6u-XtBPRFRYcckpgUJU,33099
|
|
5
|
+
npcsh/mcp_helpers.py,sha256=Ktd2yXuBnLL2P7OMalgGLj84PXJSzaucjqmJVvWx6HA,12723
|
|
6
|
+
npcsh/mcp_npcsh.py,sha256=SfmplH62GS9iI6q4vuQLVUS6tkrok6L7JxODx_iH7ps,36158
|
|
7
|
+
npcsh/mcp_server.py,sha256=l2Ra0lpFrUu334pvp0Q9ajF2n73KvZswFi0FgbDhh9k,5884
|
|
8
|
+
npcsh/npc.py,sha256=7ujKrMQFgkeGJ4sX5Kn_dB5tjrPN58xeC91PNt453aM,7827
|
|
9
|
+
npcsh/npcsh.py,sha256=TB_xYN3IEFHB5Wj931ZOlgQ12cNBsVz1SoIrQsP4b4M,59088
|
|
10
|
+
npcsh/plonk.py,sha256=7w7J2bht5QXOyV2UK045nAPDmrSrTGLX-sh56KQ3-k0,14653
|
|
11
|
+
npcsh/pti.py,sha256=jGHGE5SeIcDkV8WlOEHCKQCnYAL4IPS-kUBHrUz0oDA,10019
|
|
12
|
+
npcsh/routes.py,sha256=hEnOwRrY9onHhUTeS7lPGEytEUEzd7KZYO5GTikS0KQ,44848
|
|
13
|
+
npcsh/spool.py,sha256=QF1SuIhj_PWiOYNkAK31f1W_wS8yYxC5XvM2GU7VJMM,9495
|
|
14
|
+
npcsh/wander.py,sha256=BiN6eYyFnEsFzo8MFLRkdZ8xS9sTKkQpjiCcy9chMcc,23225
|
|
15
|
+
npcsh/yap.py,sha256=h5KNt9sNOrDPhGe_zfn_yFIeQhizX09zocjcPWH7m3k,20905
|
|
16
|
+
npcsh-1.0.13.dist-info/licenses/LICENSE,sha256=IKBvAECHP-aCiJtE4cHGCE5Yl0tozYz02PomGeWS3y4,1070
|
|
17
|
+
npcsh-1.0.13.dist-info/METADATA,sha256=xhEAZb5pELsUA-lQKspyS_nKfy6kxU2ayL4CfJxZQjg,30829
|
|
18
|
+
npcsh-1.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
npcsh-1.0.13.dist-info/entry_points.txt,sha256=qxOYTm3ym3JWyWf2nv2Mk71uMcJIdUoNEJ8VYMkyHiY,214
|
|
20
|
+
npcsh-1.0.13.dist-info/top_level.txt,sha256=kHSNgKMCkfjV95-DH0YSp1LLBi0HXdF3w57j7MQON3E,6
|
|
21
|
+
npcsh-1.0.13.dist-info/RECORD,,
|
npcsh-1.0.11.dist-info/METADATA
DELETED
|
@@ -1,596 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: npcsh
|
|
3
|
-
Version: 1.0.11
|
|
4
|
-
Summary: npcsh is a command-line toolkit for using AI agents in novel ways.
|
|
5
|
-
Home-page: https://github.com/NPC-Worldwide/npcsh
|
|
6
|
-
Author: Christopher Agostino
|
|
7
|
-
Author-email: info@npcworldwi.de
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Requires-Python: >=3.10
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: npcpy
|
|
14
|
-
Requires-Dist: jinja2
|
|
15
|
-
Requires-Dist: litellm
|
|
16
|
-
Requires-Dist: scipy
|
|
17
|
-
Requires-Dist: numpy
|
|
18
|
-
Requires-Dist: requests
|
|
19
|
-
Requires-Dist: matplotlib
|
|
20
|
-
Requires-Dist: markdown
|
|
21
|
-
Requires-Dist: networkx
|
|
22
|
-
Requires-Dist: PyYAML
|
|
23
|
-
Requires-Dist: PyMuPDF
|
|
24
|
-
Requires-Dist: pyautogui
|
|
25
|
-
Requires-Dist: pydantic
|
|
26
|
-
Requires-Dist: pygments
|
|
27
|
-
Requires-Dist: sqlalchemy
|
|
28
|
-
Requires-Dist: termcolor
|
|
29
|
-
Requires-Dist: rich
|
|
30
|
-
Requires-Dist: colorama
|
|
31
|
-
Requires-Dist: Pillow
|
|
32
|
-
Requires-Dist: python-dotenv
|
|
33
|
-
Requires-Dist: pandas
|
|
34
|
-
Requires-Dist: beautifulsoup4
|
|
35
|
-
Requires-Dist: duckduckgo-search
|
|
36
|
-
Requires-Dist: flask
|
|
37
|
-
Requires-Dist: flask_cors
|
|
38
|
-
Requires-Dist: redis
|
|
39
|
-
Requires-Dist: psycopg2-binary
|
|
40
|
-
Requires-Dist: flask_sse
|
|
41
|
-
Provides-Extra: lite
|
|
42
|
-
Requires-Dist: anthropic; extra == "lite"
|
|
43
|
-
Requires-Dist: openai; extra == "lite"
|
|
44
|
-
Requires-Dist: google-generativeai; extra == "lite"
|
|
45
|
-
Requires-Dist: google-genai; extra == "lite"
|
|
46
|
-
Provides-Extra: local
|
|
47
|
-
Requires-Dist: sentence_transformers; extra == "local"
|
|
48
|
-
Requires-Dist: opencv-python; extra == "local"
|
|
49
|
-
Requires-Dist: ollama; extra == "local"
|
|
50
|
-
Requires-Dist: kuzu; extra == "local"
|
|
51
|
-
Requires-Dist: chromadb; extra == "local"
|
|
52
|
-
Requires-Dist: diffusers; extra == "local"
|
|
53
|
-
Requires-Dist: nltk; extra == "local"
|
|
54
|
-
Requires-Dist: torch; extra == "local"
|
|
55
|
-
Provides-Extra: yap
|
|
56
|
-
Requires-Dist: pyaudio; extra == "yap"
|
|
57
|
-
Requires-Dist: gtts; extra == "yap"
|
|
58
|
-
Requires-Dist: playsound==1.2.2; extra == "yap"
|
|
59
|
-
Requires-Dist: pygame; extra == "yap"
|
|
60
|
-
Requires-Dist: faster_whisper; extra == "yap"
|
|
61
|
-
Requires-Dist: pyttsx3; extra == "yap"
|
|
62
|
-
Provides-Extra: mcp
|
|
63
|
-
Requires-Dist: mcp; extra == "mcp"
|
|
64
|
-
Provides-Extra: all
|
|
65
|
-
Requires-Dist: anthropic; extra == "all"
|
|
66
|
-
Requires-Dist: openai; extra == "all"
|
|
67
|
-
Requires-Dist: google-generativeai; extra == "all"
|
|
68
|
-
Requires-Dist: google-genai; extra == "all"
|
|
69
|
-
Requires-Dist: sentence_transformers; extra == "all"
|
|
70
|
-
Requires-Dist: opencv-python; extra == "all"
|
|
71
|
-
Requires-Dist: ollama; extra == "all"
|
|
72
|
-
Requires-Dist: kuzu; extra == "all"
|
|
73
|
-
Requires-Dist: chromadb; extra == "all"
|
|
74
|
-
Requires-Dist: diffusers; extra == "all"
|
|
75
|
-
Requires-Dist: nltk; extra == "all"
|
|
76
|
-
Requires-Dist: torch; extra == "all"
|
|
77
|
-
Requires-Dist: pyaudio; extra == "all"
|
|
78
|
-
Requires-Dist: gtts; extra == "all"
|
|
79
|
-
Requires-Dist: playsound==1.2.2; extra == "all"
|
|
80
|
-
Requires-Dist: pygame; extra == "all"
|
|
81
|
-
Requires-Dist: faster_whisper; extra == "all"
|
|
82
|
-
Requires-Dist: pyttsx3; extra == "all"
|
|
83
|
-
Requires-Dist: mcp; extra == "all"
|
|
84
|
-
Dynamic: author
|
|
85
|
-
Dynamic: author-email
|
|
86
|
-
Dynamic: classifier
|
|
87
|
-
Dynamic: description
|
|
88
|
-
Dynamic: description-content-type
|
|
89
|
-
Dynamic: home-page
|
|
90
|
-
Dynamic: license-file
|
|
91
|
-
Dynamic: provides-extra
|
|
92
|
-
Dynamic: requires-dist
|
|
93
|
-
Dynamic: requires-python
|
|
94
|
-
Dynamic: summary
|
|
95
|
-
|
|
96
|
-
<p align="center">
|
|
97
|
-
<a href= "https://github.com/npc-worldwide/npcsh/blob/main/docs/npcsh.md">
|
|
98
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npcsh.png" alt="npcsh logo" width=250></a>
|
|
99
|
-
</p>
|
|
100
|
-
|
|
101
|
-
# NPC Shell
|
|
102
|
-
|
|
103
|
-
The NPC shell is a suite of executable command-line programs that allow users to easily interact with NPCs and LLMs through a command line shell.
|
|
104
|
-
|
|
105
|
-
Programs within the NPC shell use the properties defined in `~/.npcshrc`, which is generated upon installation and running of `npcsh` for the first time.
|
|
106
|
-
|
|
107
|
-
To get started:
|
|
108
|
-
```
|
|
109
|
-
pip install 'npcsh[local]'
|
|
110
|
-
```
|
|
111
|
-
Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc` cli, `yap` `pti`, `wander`, and `spool`.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## npcsh
|
|
115
|
-
- a bash-replacement shell (`npcsh`) that can process bash, natural language, or special macro calls. `npcsh` detects whether input is bash or natural language and processes it accordingly.
|
|
116
|
-
|
|
117
|
-
- Users can specify whether natural language commands are processed in one of three ways:
|
|
118
|
-
- agentically (i.e. an NPC reviews and decides to pass to other NPCs or to use NPC tools called `jinxs` (short for Jinja Template Executions) to carry out tasks.
|
|
119
|
-
- conversationally (the NPC generates a response which the user can approve to run)
|
|
120
|
-
- directly through bash execution (the NPC responds by generating executable bash code which is then processed automatically in the shell.
|
|
121
|
-
|
|
122
|
-
Switching between the modes within the session is straightforward and the user can specify the default mode in the `.npcshrc` file described in greater detail below. The default mode is agentic, but the user can switch by typing `/chat` to switch to conversational mode or `/cmd` to switch to bash execution mode.
|
|
123
|
-
|
|
124
|
-
- Web searching
|
|
125
|
-
```
|
|
126
|
-
/search -p perplexity 'cal bears football schedule'
|
|
127
|
-
```
|
|
128
|
-
- One shot sampling
|
|
129
|
-
```
|
|
130
|
-
/sample 'prompt'
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
- Image generation:
|
|
134
|
-
```
|
|
135
|
-
/vixynt 'an image of a dog eating a hat'
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
- Process Identification:
|
|
139
|
-
```
|
|
140
|
-
please identify the process consuming the most memory on my computer
|
|
141
|
-
```
|
|
142
|
-
- Screenshot analysis:
|
|
143
|
-
```
|
|
144
|
-
/ots
|
|
145
|
-
```
|
|
146
|
-
- voice chat:
|
|
147
|
-
```
|
|
148
|
-
/yap
|
|
149
|
-
```
|
|
150
|
-
- Computer use:
|
|
151
|
-
```
|
|
152
|
-
/plonk -n 'npc_name' -sp 'task for plonk to carry out '
|
|
153
|
-
```
|
|
154
|
-
- Enter chat loop with an NPC:
|
|
155
|
-
```
|
|
156
|
-
/spool -n <npc_name>
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## `guac`
|
|
160
|
-
|
|
161
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/guac.md">
|
|
162
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/guac.png" alt="npcsh logo of a solarpunk sign", width=250></a>
|
|
163
|
-
</p>
|
|
164
|
-
|
|
165
|
-
- a replacement shell for interpreters like python/r/node/julia with an avocado input marker 🥑 that brings a pomodoro-like approach to interactive coding.
|
|
166
|
-
- Simulation:
|
|
167
|
-
`🥑 Make a markov chain simulation of a random walk in 2D space with 1000 steps and visualize`
|
|
168
|
-
```
|
|
169
|
-
# Generated python code:
|
|
170
|
-
import numpy as np
|
|
171
|
-
import matplotlib.pyplot as plt
|
|
172
|
-
|
|
173
|
-
# Number of steps
|
|
174
|
-
n_steps = 1000
|
|
175
|
-
|
|
176
|
-
# Possible moves: up, down, left, right
|
|
177
|
-
moves = np.array([[0, 1], [0, -1], [1, 0], [-1, 0]])
|
|
178
|
-
|
|
179
|
-
# Initialize position array
|
|
180
|
-
positions = np.zeros((n_steps+1, 2), dtype=int)
|
|
181
|
-
|
|
182
|
-
# Generate random moves
|
|
183
|
-
for i in range(1, n_steps+1):
|
|
184
|
-
step = moves[np.random.choice(4)]
|
|
185
|
-
positions[i] = positions[i-1] + step
|
|
186
|
-
|
|
187
|
-
# Plot the random walk
|
|
188
|
-
plt.figure(figsize=(8, 8))
|
|
189
|
-
plt.plot(positions[:, 0], positions[:, 1], lw=1)
|
|
190
|
-
plt.scatter([positions[0, 0]], [positions[0, 1]], color='green', label='Start')
|
|
191
|
-
plt.scatter([positions[-1, 0]], [positions[-1, 1]], color='red', label='End')
|
|
192
|
-
plt.title('2D Random Walk - 1000 Steps (Markov Chain)')
|
|
193
|
-
plt.xlabel('X Position')
|
|
194
|
-
plt.ylabel('Y Position')
|
|
195
|
-
plt.legend()
|
|
196
|
-
plt.grid(True)
|
|
197
|
-
plt.axis('equal')
|
|
198
|
-
plt.show()
|
|
199
|
-
# Generated code executed successfully
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
<p align="center">
|
|
203
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/test_data/markov_chain.png" alt="markov_chain_figure", width=250>
|
|
204
|
-
</p>
|
|
205
|
-
|
|
206
|
-
Access the variables created in the code:
|
|
207
|
-
`🥑 print(positions)`
|
|
208
|
-
```
|
|
209
|
-
[[ 0 0]
|
|
210
|
-
[ 0 -1]
|
|
211
|
-
[ -1 -1]
|
|
212
|
-
...
|
|
213
|
-
[ 29 -23]
|
|
214
|
-
[ 28 -23]
|
|
215
|
-
[ 27 -23]]
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
- Run a python script:
|
|
219
|
-
`🥑 run file.py`
|
|
220
|
-
- Refresh:
|
|
221
|
-
`🥑 /refresh`
|
|
222
|
-
- Show current variables:
|
|
223
|
-
`🥑 /show`
|
|
224
|
-
|
|
225
|
-
A guac session progresses through a series of stages, each of equal length. Each stage adjusts the emoji input prompt. Once the stages have passed, it is time to refresh. Stage 1: `🥑`, Stage 2: `🥑🔪` Stage 3: `🥑🥣` Stage:4 `🥑🥣🧂`, `Stage 5: 🥘 TIME TO REFRESH`. At stage 5, the user is reminded to refresh with the /refresh macro. This will evaluate the session so farand suggest and implement new functions or automations that will aid in future sessions, with the ultimate approval of the user.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
## `npc`
|
|
229
|
-
- A command line interface offering the capabilities of the npc shell from a regular bash shell. Our mascot agent Sibiji the spider will help you weave your agent web with the `npc` CLI.
|
|
230
|
-
|
|
231
|
-
<p align="center">
|
|
232
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/sibiji.png" alt="npcsh logo with sibiji the spider">
|
|
233
|
-
</p>
|
|
234
|
-
|
|
235
|
-
- The NPC CLI lets users iterate and experiment with AI through bash commands. Below is a cheat sheet that shows how to use the `npc` CLI.
|
|
236
|
-
|
|
237
|
-
- **Ask a Generic Question**
|
|
238
|
-
```bash
|
|
239
|
-
npc 'has there ever been a better pasta shape than bucatini?'
|
|
240
|
-
```
|
|
241
|
-
```
|
|
242
|
-
.Loaded .env file...
|
|
243
|
-
Initializing database schema...
|
|
244
|
-
Database schema initialization complete.
|
|
245
|
-
Processing prompt: 'has there ever been a better pasta shape than bucatini?' with NPC: 'sibiji'...
|
|
246
|
-
• Action chosen: answer_question
|
|
247
|
-
• Explanation given: The question is a general opinion-based inquiry about pasta shapes and can be answered without external data or jinx invocation.
|
|
248
|
-
...............................................................................
|
|
249
|
-
Bucatini is certainly a favorite for many due to its unique hollow center, which holds sauces beautifully. Whether it's "better" is subjective and depends on the dish and personal
|
|
250
|
-
preference. Shapes like orecchiette, rigatoni, or trofie excel in different recipes. Bucatini stands out for its versatility and texture, making it a top contender among pasta shapes!
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
- **Compile an NPC**
|
|
255
|
-
```bash
|
|
256
|
-
npc compile /path/to/npc.npc
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
- **Computer Use**
|
|
260
|
-
```bash
|
|
261
|
-
npc plonk -n 'npc_name' -sp 'task for plonk to carry out'
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
- **Generate Image**
|
|
265
|
-
```bash
|
|
266
|
-
npc vixynt 'generate an image of a rabbit eating ham in the brink of dawn' model='gpt-image-1' provider='openai'
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
- **Search the Web**
|
|
271
|
-
```bash
|
|
272
|
-
npc search -q "cal golden bears football schedule" -sp perplexity
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
- **Serve an NPC Team**
|
|
276
|
-
```bash
|
|
277
|
-
npc serve --port 5337 --cors='http://localhost:5137/'
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
- **Screenshot Analysis**
|
|
281
|
-
```bash
|
|
282
|
-
npc ots
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
## `alicanto` : a research exploration agent flow.
|
|
288
|
-
|
|
289
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/alicanto.md">
|
|
290
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/alicanto.png" alt="logo for deep research", width=250></a>
|
|
291
|
-
</p>
|
|
292
|
-
|
|
293
|
-
- Examples:
|
|
294
|
-
```
|
|
295
|
-
npc alicanto "What are the implications of quantum computing for cybersecurity?"
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
- With more researchers and deeper exploration
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
npc alicanto "How might climate change impact global food security?" --num-npcs 8 --depth 5
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
- Control exploration vs. exploitation balance
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
npc alicanto "What ethical considerations should guide AI development?" --exploration 0.5
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
- Different output formats
|
|
311
|
-
```
|
|
312
|
-
npc alicanto "What is the future of remote work?" --format report
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
## `pti`
|
|
316
|
-
- a reasoning REPL loop with explicit checks to request inputs from users following thinking traces.
|
|
317
|
-
|
|
318
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/pti.md">
|
|
319
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/frederic4.png" alt="npcsh logo of frederic the bear and the pti logo", width=250></a>
|
|
320
|
-
</p>
|
|
321
|
-
Speak with frederic the bear who, once he's done thinking, asks you for input before trudging on so it can work with confidence.
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
pti
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
## `spool`
|
|
329
|
-
- a simple agentic REPL chat loop with a specified agent.
|
|
330
|
-
|
|
331
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/spool.md">
|
|
332
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/spool.png" alt="logo for spool", width=250></a>
|
|
333
|
-
</p>
|
|
334
|
-
|
|
335
|
-
## `yap`
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/yap.md">
|
|
339
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/yap.png" alt="logo for yap ", width=250></a>
|
|
340
|
-
</p>
|
|
341
|
-
|
|
342
|
-
- an agentic voice control loop with a specified agent. When launching `yap`, the user enters the typical `npcsh` agentic loop except that the system is waiting for either text or audio input.
|
|
343
|
-
|
|
344
|
-
```
|
|
345
|
-
yap
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
## `wander`
|
|
350
|
-
|
|
351
|
-
<p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/wander.md">
|
|
352
|
-
<img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/kadiefa.png" alt="logo for wander", width=250></a>
|
|
353
|
-
</p>
|
|
354
|
-
A system for thinking outside of the box. From our testing, it appears gpt-4o-mini and gpt-series models in general appear to wander the most through various languages and ideas with high temperatures. Gemini models and many llama ones appear more stable despite high temps. Thinking models in general appear to be worse at this task.
|
|
355
|
-
|
|
356
|
-
- Wander with an auto-generated environment
|
|
357
|
-
```
|
|
358
|
-
npc --model "gemini-2.0-flash" --provider "gemini" wander "how does the bar of a galaxy influence the the surrounding IGM?" \
|
|
359
|
-
n-high-temp-streams=10 \
|
|
360
|
-
high-temp=1.95 \
|
|
361
|
-
low-temp=0.4 \
|
|
362
|
-
sample-rate=0.5 \
|
|
363
|
-
interruption-likelihood=1
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
```
|
|
367
|
-
- Specify a custom environment
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
npc --model "gpt-4o-mini" --provider "openai" wander "how does the goos-hanchen effect impact neutron scattering?" \
|
|
371
|
-
environment='a ships library in the south.' \
|
|
372
|
-
num-events=3 \
|
|
373
|
-
n-high-temp-streams=10 \
|
|
374
|
-
high-temp=1.95 \
|
|
375
|
-
low-temp=0.4 \
|
|
376
|
-
sample-rate=0.5 \
|
|
377
|
-
interruption-likelihood=1
|
|
378
|
-
|
|
379
|
-
```
|
|
380
|
-
- Control event generation
|
|
381
|
-
```
|
|
382
|
-
npc wander "what is the goos hanchen effect and does it affect water refraction?" \
|
|
383
|
-
--provider "ollama" \
|
|
384
|
-
--model "deepseek-r1:32b" \
|
|
385
|
-
environment="a vast, dark ocean ." \
|
|
386
|
-
interruption-likelihood=.1
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
## Inference Capabilities
|
|
397
|
-
- `npcsh` works with local and enterprise LLM providers through its LiteLLM integration, allowing users to run inference from Ollama, LMStudio, OpenAI, Anthropic, Gemini, and Deepseek, making it a versatile tool for both simple commands and sophisticated AI-driven tasks.
|
|
398
|
-
|
|
399
|
-
## Read the Docs
|
|
400
|
-
|
|
401
|
-
Read the docs at [npcsh.readthedocs.io](https://npcsh.readthedocs.io/en/latest/)
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
## NPC Studio
|
|
405
|
-
There is a graphical user interface that makes use of the NPC Toolkit through the NPC Studio. See the open source code for NPC Studio [here](https://github.com/npc-worldwide/npc-studio). Download the executables at [our website](https://enpisi.com/npc-studio).
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
## Mailing List
|
|
409
|
-
Interested to stay in the loop and to hear the latest and greatest about `npcpy`, `npcsh`, and NPC Studio? Be sure to sign up for the [newsletter](https://forms.gle/n1NzQmwjsV4xv1B2A)!
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
## Support
|
|
413
|
-
If you appreciate the work here, [consider supporting NPC Worldwide with a monthly donation](https://buymeacoffee.com/npcworldwide), [buying NPC-WW themed merch](https://enpisi.com/shop), or hiring us to help you explore how to use the NPC Toolkit and AI tools to help your business or research team, please reach out to info@npcworldwi.de .
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
## Installation
|
|
417
|
-
`npcsh` is available on PyPI and can be installed using pip. Before installing, make sure you have the necessary dependencies installed on your system. Below are the instructions for installing such dependencies on Linux, Mac, and Windows. If you find any other dependencies that are needed, please let us know so we can update the installation instructions to be more accommodating.
|
|
418
|
-
|
|
419
|
-
### Linux install
|
|
420
|
-
<details> <summary> Toggle </summary>
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
|
|
424
|
-
# these are for audio primarily, skip if you dont need tts
|
|
425
|
-
sudo apt-get install espeak
|
|
426
|
-
sudo apt-get install portaudio19-dev python3-pyaudio
|
|
427
|
-
sudo apt-get install alsa-base alsa-utils
|
|
428
|
-
sudo apt-get install libcairo2-dev
|
|
429
|
-
sudo apt-get install libgirepository1.0-dev
|
|
430
|
-
sudo apt-get install ffmpeg
|
|
431
|
-
|
|
432
|
-
# for triggers
|
|
433
|
-
sudo apt install inotify-tools
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
#And if you don't have ollama installed, use this:
|
|
437
|
-
curl -fsSL https://ollama.com/install.sh | sh
|
|
438
|
-
|
|
439
|
-
ollama pull llama3.2
|
|
440
|
-
ollama pull llava:7b
|
|
441
|
-
ollama pull nomic-embed-text
|
|
442
|
-
pip install npcsh
|
|
443
|
-
# if you want to install with the API libraries
|
|
444
|
-
pip install 'npcsh[lite]'
|
|
445
|
-
# if you want the full local package set up (ollama, diffusers, transformers, cuda etc.)
|
|
446
|
-
pip install 'npcsh[local]'
|
|
447
|
-
# if you want to use tts/stt
|
|
448
|
-
pip install 'npcsh[yap]'
|
|
449
|
-
# if you want everything:
|
|
450
|
-
pip install 'npcsh[all]'
|
|
451
|
-
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
</details>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
### Mac install
|
|
458
|
-
|
|
459
|
-
<details> <summary> Toggle </summary>
|
|
460
|
-
|
|
461
|
-
```bash
|
|
462
|
-
#mainly for audio
|
|
463
|
-
brew install portaudio
|
|
464
|
-
brew install ffmpeg
|
|
465
|
-
brew install pygobject3
|
|
466
|
-
|
|
467
|
-
# for triggers
|
|
468
|
-
brew install inotify-tools
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
brew install ollama
|
|
472
|
-
brew services start ollama
|
|
473
|
-
ollama pull llama3.2
|
|
474
|
-
ollama pull llava:7b
|
|
475
|
-
ollama pull nomic-embed-text
|
|
476
|
-
pip install npcsh
|
|
477
|
-
# if you want to install with the API libraries
|
|
478
|
-
pip install npcsh[lite]
|
|
479
|
-
# if you want the full local package set up (ollama, diffusers, transformers, cuda etc.)
|
|
480
|
-
pip install npcsh[local]
|
|
481
|
-
# if you want to use tts/stt
|
|
482
|
-
pip install npcsh[yap]
|
|
483
|
-
|
|
484
|
-
# if you want everything:
|
|
485
|
-
pip install npcsh[all]
|
|
486
|
-
```
|
|
487
|
-
</details>
|
|
488
|
-
|
|
489
|
-
### Windows Install
|
|
490
|
-
|
|
491
|
-
<details> <summary> Toggle </summary>
|
|
492
|
-
Download and install ollama exe.
|
|
493
|
-
|
|
494
|
-
Then, in a powershell. Download and install ffmpeg.
|
|
495
|
-
|
|
496
|
-
```powershell
|
|
497
|
-
ollama pull llama3.2
|
|
498
|
-
ollama pull llava:7b
|
|
499
|
-
ollama pull nomic-embed-text
|
|
500
|
-
pip install npcsh
|
|
501
|
-
# if you want to install with the API libraries
|
|
502
|
-
pip install 'npcsh[lite]'
|
|
503
|
-
# if you want the full local package set up (ollama, diffusers, transformers, cuda etc.)
|
|
504
|
-
pip install 'npcsh[local]'
|
|
505
|
-
# if you want to use tts/stt
|
|
506
|
-
pip install 'npcsh[yap]'
|
|
507
|
-
|
|
508
|
-
# if you want everything:
|
|
509
|
-
pip install 'npcsh[all]'
|
|
510
|
-
```
|
|
511
|
-
As of now, npcsh appears to work well with some of the core functionalities like /ots and /yap.
|
|
512
|
-
|
|
513
|
-
</details>
|
|
514
|
-
|
|
515
|
-
### Fedora Install (under construction)
|
|
516
|
-
|
|
517
|
-
<details> <summary> Toggle </summary>
|
|
518
|
-
|
|
519
|
-
```bash
|
|
520
|
-
python3-dev #(fixes hnswlib issues with chroma db)
|
|
521
|
-
xhost + (pyautogui)
|
|
522
|
-
python-tkinter (pyautogui)
|
|
523
|
-
```
|
|
524
|
-
|
|
525
|
-
</details>
|
|
526
|
-
|
|
527
|
-
## Startup Configuration and Project Structure
|
|
528
|
-
After `npcsh` has been pip installed, `npcsh`, `guac`, `pti`, `spool`, `yap` and the `npc` CLI can be used as command line tools. To initialize these correctly, first start by starting the NPC shell:
|
|
529
|
-
```bash
|
|
530
|
-
npcsh
|
|
531
|
-
```
|
|
532
|
-
When initialized, `npcsh` will generate a .npcshrc file in your home directory that stores your npcsh settings.
|
|
533
|
-
Here is an example of what the .npcshrc file might look like after this has been run.
|
|
534
|
-
```bash
|
|
535
|
-
# NPCSH Configuration File
|
|
536
|
-
export NPCSH_INITIALIZED=1
|
|
537
|
-
export NPCSH_CHAT_PROVIDER='ollama'
|
|
538
|
-
export NPCSH_CHAT_MODEL='llama3.2'
|
|
539
|
-
export NPCSH_DB_PATH='~/npcsh_history.db'
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
`npcsh` also comes with a set of jinxs and NPCs that are used in processing. It will generate a folder at ~/.npcsh/ that contains the tools and NPCs that are used in the shell and these will be used in the absence of other project-specific ones. Additionally, `npcsh` records interactions and compiled information about npcs within a local SQLite database at the path specified in the .npcshrc file. This will default to ~/npcsh_history.db if not specified. When the data mode is used to load or analyze data in CSVs or PDFs, these data will be stored in the same database for future reference.
|
|
543
|
-
|
|
544
|
-
The installer will automatically add this file to your shell config, but if it does not do so successfully for whatever reason you can add the following to your .bashrc or .zshrc:
|
|
545
|
-
|
|
546
|
-
```bash
|
|
547
|
-
# Source NPCSH configuration
|
|
548
|
-
if [ -f ~/.npcshrc ]; then
|
|
549
|
-
. ~/.npcshrc
|
|
550
|
-
fi
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
We support inference via all providers supported by litellm. For openai-compatible providers that are not explicitly named in litellm, use simply `openai-like` as the provider. The default provider must be one of `['openai','anthropic','ollama', 'gemini', 'deepseek', 'openai-like']` and the model must be one available from those providers.
|
|
554
|
-
|
|
555
|
-
To use tools that require API keys, create an `.env` file in the folder where you are working or place relevant API keys as env variables in your ~/.npcshrc. If you already have these API keys set in a ~/.bashrc or a ~/.zshrc or similar files, you need not additionally add them to ~/.npcshrc or to an `.env` file. Here is an example of what an `.env` file might look like:
|
|
556
|
-
|
|
557
|
-
```bash
|
|
558
|
-
export OPENAI_API_KEY="your_openai_key"
|
|
559
|
-
export ANTHROPIC_API_KEY="your_anthropic_key"
|
|
560
|
-
export DEEPSEEK_API_KEY='your_deepseek_key'
|
|
561
|
-
export GEMINI_API_KEY='your_gemini_key'
|
|
562
|
-
export PERPLEXITY_API_KEY='your_perplexity_key'
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
Individual npcs can also be set to use different models and providers by setting the `model` and `provider` keys in the npc files.
|
|
567
|
-
Once initialized and set up, you will find the following in your ~/.npcsh directory:
|
|
568
|
-
```bash
|
|
569
|
-
~/.npcsh/
|
|
570
|
-
├── npc_team/ # Global NPCs
|
|
571
|
-
│ ├── jinxs/ # Global tools
|
|
572
|
-
│ └── assembly_lines/ # Workflow pipelines
|
|
573
|
-
|
|
574
|
-
```
|
|
575
|
-
For cases where you wish to set up a project specific set of NPCs, jinxs, and assembly lines, add a `npc_team` directory to your project and `npcsh` should be able to pick up on its presence, like so:
|
|
576
|
-
```bash
|
|
577
|
-
./npc_team/ # Project-specific NPCs
|
|
578
|
-
├── jinxs/ # Project jinxs #example jinx next
|
|
579
|
-
│ └── example.jinx
|
|
580
|
-
└── assembly_lines/ # Project workflows
|
|
581
|
-
└── example.pipe
|
|
582
|
-
└── models/ # Project workflows
|
|
583
|
-
└── example.model
|
|
584
|
-
└── example1.npc # Example NPC
|
|
585
|
-
└── example2.npc # Example NPC
|
|
586
|
-
└── team.ctx # Example ctx
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
## Contributing
|
|
592
|
-
Contributions are welcome! Please submit issues and pull requests on the GitHub repository.
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
## License
|
|
596
|
-
This project is licensed under the MIT License.
|
npcsh-1.0.11.dist-info/RECORD
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
npcsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
npcsh/_state.py,sha256=GCMUIwgIBlS7LEBLYlfBiPNKVaK19ZyxT833NFU-djU,31109
|
|
3
|
-
npcsh/alicanto.py,sha256=F-zZGjBTo3a_PQHvPC8-DNF6t4mJELo_zx7gBGvDehg,44611
|
|
4
|
-
npcsh/guac.py,sha256=Ocmk_c4NUtGsC3JOtmkbgLvD6u-XtBPRFRYcckpgUJU,33099
|
|
5
|
-
npcsh/mcp_helpers.py,sha256=Ktd2yXuBnLL2P7OMalgGLj84PXJSzaucjqmJVvWx6HA,12723
|
|
6
|
-
npcsh/mcp_npcsh.py,sha256=SfmplH62GS9iI6q4vuQLVUS6tkrok6L7JxODx_iH7ps,36158
|
|
7
|
-
npcsh/mcp_server.py,sha256=l2Ra0lpFrUu334pvp0Q9ajF2n73KvZswFi0FgbDhh9k,5884
|
|
8
|
-
npcsh/npc.py,sha256=7ujKrMQFgkeGJ4sX5Kn_dB5tjrPN58xeC91PNt453aM,7827
|
|
9
|
-
npcsh/npcsh.py,sha256=_vpphATMKlM2FtUZR3RrwKoRh-eg9QiAp7axIIDAITg,59986
|
|
10
|
-
npcsh/plonk.py,sha256=U2e9yUJZN95Girzzvgrh-40zOdl5zO3AHPsIjoyLv2M,15261
|
|
11
|
-
npcsh/pti.py,sha256=jGHGE5SeIcDkV8WlOEHCKQCnYAL4IPS-kUBHrUz0oDA,10019
|
|
12
|
-
npcsh/routes.py,sha256=5u23bFTbdXXJ3V7I8BJMq42wWUZFeMbzItwBf8WHlpY,36917
|
|
13
|
-
npcsh/spool.py,sha256=GhnSFX9uAtrB4m_ijuyA5tufH12DrWdABw0z8FmiCHc,11497
|
|
14
|
-
npcsh/wander.py,sha256=BiN6eYyFnEsFzo8MFLRkdZ8xS9sTKkQpjiCcy9chMcc,23225
|
|
15
|
-
npcsh/yap.py,sha256=h5KNt9sNOrDPhGe_zfn_yFIeQhizX09zocjcPWH7m3k,20905
|
|
16
|
-
npcsh-1.0.11.dist-info/licenses/LICENSE,sha256=IKBvAECHP-aCiJtE4cHGCE5Yl0tozYz02PomGeWS3y4,1070
|
|
17
|
-
npcsh-1.0.11.dist-info/METADATA,sha256=kv7abgprmCXu31NjmmaYZhfLz_x1zIVlzUZAIb1RliI,22748
|
|
18
|
-
npcsh-1.0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
-
npcsh-1.0.11.dist-info/entry_points.txt,sha256=qxOYTm3ym3JWyWf2nv2Mk71uMcJIdUoNEJ8VYMkyHiY,214
|
|
20
|
-
npcsh-1.0.11.dist-info/top_level.txt,sha256=kHSNgKMCkfjV95-DH0YSp1LLBi0HXdF3w57j7MQON3E,6
|
|
21
|
-
npcsh-1.0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|