npcsh 1.0.14__tar.gz → 1.0.16__tar.gz

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.
Files changed (27) hide show
  1. {npcsh-1.0.14 → npcsh-1.0.16}/PKG-INFO +100 -52
  2. {npcsh-1.0.14 → npcsh-1.0.16}/README.md +97 -51
  3. npcsh-1.0.16/npcsh/npc.py +242 -0
  4. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/npcsh.py +72 -42
  5. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/routes.py +12 -18
  6. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/PKG-INFO +100 -52
  7. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/requires.txt +2 -0
  8. {npcsh-1.0.14 → npcsh-1.0.16}/setup.py +3 -1
  9. npcsh-1.0.14/npcsh/npc.py +0 -216
  10. {npcsh-1.0.14 → npcsh-1.0.16}/LICENSE +0 -0
  11. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/__init__.py +0 -0
  12. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/_state.py +0 -0
  13. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/alicanto.py +0 -0
  14. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/guac.py +0 -0
  15. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/mcp_helpers.py +0 -0
  16. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/mcp_npcsh.py +0 -0
  17. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/mcp_server.py +0 -0
  18. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/plonk.py +0 -0
  19. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/pti.py +0 -0
  20. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/spool.py +0 -0
  21. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/wander.py +0 -0
  22. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh/yap.py +0 -0
  23. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/SOURCES.txt +0 -0
  24. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/dependency_links.txt +0 -0
  25. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/entry_points.txt +0 -0
  26. {npcsh-1.0.14 → npcsh-1.0.16}/npcsh.egg-info/top_level.txt +0 -0
  27. {npcsh-1.0.14 → npcsh-1.0.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcsh
3
- Version: 1.0.14
3
+ Version: 1.0.16
4
4
  Summary: npcsh is a command-line toolkit for using AI agents in novel ways.
5
5
  Home-page: https://github.com/NPC-Worldwide/npcsh
6
6
  Author: Christopher Agostino
@@ -16,6 +16,7 @@ Requires-Dist: litellm
16
16
  Requires-Dist: docx
17
17
  Requires-Dist: scipy
18
18
  Requires-Dist: numpy
19
+ Requires-Dist: thefuzz
19
20
  Requires-Dist: imagehash
20
21
  Requires-Dist: requests
21
22
  Requires-Dist: matplotlib
@@ -40,6 +41,7 @@ Requires-Dist: flask_cors
40
41
  Requires-Dist: redis
41
42
  Requires-Dist: psycopg2-binary
42
43
  Requires-Dist: flask_sse
44
+ Requires-Dist: wikipedia
43
45
  Provides-Extra: lite
44
46
  Requires-Dist: anthropic; extra == "lite"
45
47
  Requires-Dist: openai; extra == "lite"
@@ -150,11 +152,11 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
150
152
  ```
151
153
  <p align="center">
152
154
  <img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/test_data/search_example.png" alt="example of search results", width=600>
153
- </p>
155
+ </p>
154
156
 
155
157
  - **Computer Use**
156
158
  ```bash
157
- /plonk -n 'npc_name' -sp 'task for plonk to carry out'
159
+ /plonk 'find out the latest news on cnn'
158
160
  ```
159
161
 
160
162
  - **Generate Image**
@@ -168,9 +170,10 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
168
170
  ```bash
169
171
  /roll 'generate a video of a hat riding a dog'
170
172
  ```
173
+ <!--
171
174
  <p align="center">
172
175
  <img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/test_data/hat_video.mp4" alt="video of a hat riding a dog", width=250>
173
- </p>
176
+ </p> -->
174
177
 
175
178
  - **Serve an NPC Team**
176
179
  ```bash
@@ -196,7 +199,8 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
196
199
  - `/init` - Initialize NPC project
197
200
  - `/jinxs` - Show available jinxs for the current NPC/Team
198
201
  - `/ots` - Take screenshot and analyze with vision model
199
- - `/plan` - Execute a plan command\n\n/plonk - Use vision model to interact with GUI. Usage: /plonk <task description>
202
+ - `/plan` - Execute a plan command
203
+ - `/plonk` - Use vision model to interact with GUI. Usage: /plonk <task description>
200
204
  - `/pti` - Use pardon-the-interruption mode to interact with reasoning model LLM
201
205
  - `/rag` - Execute a RAG command using ChromaDB embeddings with optional file input (-f/--file)
202
206
  - `/roll` - generate a video with video generation model
@@ -211,13 +215,13 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
211
215
  - `/wander` - A method for LLMs to think on a problem by switching between states of high temperature and low temperature
212
216
  - `/yap` - Enter voice chat (yap) mode
213
217
 
214
- ## Common Command-Line Flags\n\nThe shortest unambiguous prefix works (e.g., `-t` for `--temperature`).
218
+ ## Common Command-Line Flags:
215
219
 
216
220
  ```
217
221
  Flag Shorthand | Flag Shorthand | Flag Shorthand | Flag Shorthand
218
222
  ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------
219
223
  --attachments (-a) | --height (-h) | --num_npcs (-num_n) | --team (-tea)
220
- --config_dir (-con) | --igmodel (-igm) | --output_file (-o) | --temperature (-tem)
224
+ --config_dir (-con) | --igmodel (-igm) | --output_file (-o) | --temperature (-t)
221
225
  --cors (-cor) | --igprovider (-igp) | --plots_dir (-pl) | --top_k
222
226
  --creativity (-cr) | --lang (-l) | --port (-po) | --top_p
223
227
  --depth (-d) | --max_tokens (-ma) | --provider (-pr) | --vmodel (-vm)
@@ -228,7 +232,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
228
232
  ```
229
233
  '
230
234
 
231
- - ## alicanto: a research exploration agent flow.
235
+ - ## `/alicanto`: a research exploration agent flow.
232
236
 
233
237
  <p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/alicanto.md">
234
238
  <img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/alicanto.png" alt="logo for deep research", width=250></a>
@@ -245,41 +249,44 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
245
249
  # bash
246
250
  npc alicanto "What ethical considerations should guide AI development?" --max_facts_per_chain 0.5 --max_thematic_groups 3 --max_criticisms_per_group 3 max_conceptual_combinations 3 max_experiments 10
247
251
 
248
- npc alicanto "What is the future of remote work?" --format report
252
+ npc alicanto "What is the future of remote work?" --format report # NOTE: Report generation and formatting requires latex installed.
249
253
  ```
250
- - ## Brainblast: searching through past messages:
254
+ - ## `/brainblast`: searching through past messages (soon to incorporate options for knowledge graph)
251
255
  ```bash
252
256
  # npcsh
253
257
  /brainblast 'subtle summer winds' --top_k 10
254
258
  ```
255
259
  ```bash
256
260
  # bash
257
- npc brainblast 'python dictionaries'
261
+ npc brainblast 'executing a mirror in the wonderous moon'
258
262
  ```
259
- - ## Breathe: Condense conversation context (shell only):
263
+ - ## `/breathe`: Condense conversation context (shell only):
260
264
  ```bash
261
265
  # npcsh
262
266
  /breathe
263
267
  /breathe -p ollama -m qwen3:latest
264
268
  ```
265
- - ## Compile: render npcs for use without re-loading npcsh
269
+ - ## `/compile`: render npcs for use without re-loading npcsh
266
270
  ```bash
267
271
  # npcsh
268
- /compile /path/to/npc
272
+ /compile ./npc_team/sibiji.npc
269
273
  ```
270
- - ## flush: flush context (shell only):
274
+ - ## `/flush`: flush context (shell only):
275
+ If you're in the NPC shell and have been in a conversation thats going nowhere and you want to start over... just flush theh contexf.
271
276
  ```bash
272
277
  /flush
273
278
  ```
274
279
 
275
280
 
276
- - ## `guac`
281
+ - ## `/guac`
277
282
 
278
283
  <p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/guac.md">
279
284
  <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>
280
285
  </p>
281
286
 
282
- - a replacement shell for interpreters like python/r/node/julia with an avocado input marker 🥑 that brings a pomodoro-like approach to interactive coding.
287
+ - a replacement shell for interpreters like python/r/node/julia with an avocado input marker 🥑 that brings a pomodoro-like approach to interactive coding.
288
+ - available as a standalone program runnable via the `guac` command after `npcsh` has been installed via pip.
289
+
283
290
  - Simulation:
284
291
  `🥑 Make a markov chain simulation of a random walk in 2D space with 1000 steps and visualize`
285
292
  ```
@@ -342,13 +349,61 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
342
349
  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.
343
350
 
344
351
 
345
- - ## help:/ Show help for commands, NPCs, or Jinxs.
346
- ```bash
347
- /help
348
- ```
349
- - ## init - Initialize NPC project
350
- - ## jinxs : show available jinxs
351
- - ## ots: Over-the-shoulder screen shot analysis
352
+ - ## `/help`: Show help for commands, NPCs, or Jinxs.
353
+ ```bash
354
+ /help
355
+ ```
356
+ ```
357
+ npc help
358
+ ```
359
+ - ## `/init` - Initialize NPC project
360
+ -set up bare bones infra for an npc team
361
+ ```bash
362
+ # npcsh
363
+ /init
364
+ ```
365
+ ```bash
366
+ # bash
367
+ npc init
368
+ ```
369
+
370
+
371
+ - ## `/jinxs` : show available jinxs for team
372
+ Jinxs are Jinja execution templates that let users develop small programs that can build on each other and reference each other through jinja templating. Jinx methods allow us to give smaller LLMs the scaffolding to perform `tool calling`, so to speak, reliably
373
+ ```bash
374
+ # npcsh
375
+ /jinxs
376
+ # bash
377
+ npc jinxs
378
+ ```
379
+
380
+ ```python
381
+ Available Jinxs:
382
+ --- Jinxs for NPC: sibiji ---
383
+
384
+ • /bash_executor: Execute bash queries.
385
+
386
+ • /calc: A jinx to simplify and evaluate mathematical expressions (/calc 1+5, /calc 47233*234234)
387
+
388
+ • /data_pull: Execute queries on the ~/npcsh_history.db to pull data. The database contains only information about conversations and other user-provided data. It does not store any information about individual files (/data_pull 'select * from conversation_history limit 10')
389
+
390
+
391
+ • /file_editor: Examines a file, determines what changes are needed, and applies those changes. (/file_editor filename.py 'instructions for carrying out the editing')
392
+
393
+ • /image_generation_jinx: Generates images based on a text prompt. (/image_generation_jinx 'prompt for llm' output_name )
394
+
395
+ • /internet_search: Searches the web for information based on a query in order to verify timiely details (e.g. current events) or to corroborate information in uncertain situations. Should be mainly only used when users
396
+ specifically request a search, otherwise an LLMs basic knowledge should be sufficient. ( /internet_search 'cost of cubs tickets' )
397
+ • /local_search: Searches files in current and downstream directories to find items related to the users query using fuzzy matching. (/local_search 'class NPC')
398
+ Returns only relevant snippets (10 lines around matches) to avoid including too much irrelevant content. Intended for fuzzy searches, not for understanding file sizes.
399
+
400
+ • /python_executor: Execute scripts with python. Set the ultimate result as the "output" variable. It must be a string. Do not add unnecessary print statements. (/python_executor 'import numpy as np; print(np.arange(1000))')
401
+ • /screen_capture_analysis_jinx: Captures the whole screen and sends the image for analysis (mostly redundant with /ots.)
402
+ ```
403
+
404
+
405
+
406
+ - ## `/ots`: Over-the-shoulder screen shot analysis
352
407
  - Screenshot analysis:
353
408
  ```bash
354
409
  #npcsh
@@ -359,17 +414,17 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
359
414
  #bash
360
415
  npc ots ...
361
416
  ```
362
- - ## `plan`: set up cron jobs:
417
+ - ## `/plan`: set up cron jobs:
363
418
  ```bash
364
419
  # npcsh
365
- /plan 'a description of a cron job to implement' -m gemma3:27b -p ollama
420
+ /plan 'set up a cron job that reminds me to stretch every thirty minutes' -m gemma3:27b -p ollama
366
421
  ```
367
422
  ```bash
368
423
  # bash
369
- npc plan
424
+ npc plan 'record my cpu usage percentage every 45 minutes'
370
425
  ```
371
426
 
372
- - ## `plonk`: Computer use:
427
+ - ## `/plonk`: Computer use:
373
428
  ```bash
374
429
  # npcsh
375
430
  /plonk -n 'npc_name' -sp 'task for plonk to carry out '
@@ -377,7 +432,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
377
432
  #bash
378
433
  npc plonk
379
434
  ```
380
- - ## `pti`: a reasoning REPL loop with interruptions
435
+ - ## `/pti`: a reasoning REPL loop with interruptions
381
436
 
382
437
  ```npcsh
383
438
  /pti -n frederic -m qwen3:latest -p ollama
@@ -391,14 +446,14 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
391
446
  <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>
392
447
  </p>
393
448
 
394
- - ## `rag`: embedding search through chroma db, optional file input
395
- - ## `roll`: your video generation assistant
449
+ - ## `/rag`: embedding search through chroma db, optional file input
450
+ - ## `/roll`: your video generation assistant
396
451
  -
397
452
  ```npcsh
398
453
  /roll --provider ollama --model llama3
399
454
  ```
400
455
 
401
- - ## sample: one-shot sampling from LLMs with specific parameters
456
+ - ## `/sample`: one-shot sampling from LLMs with specific parameters
402
457
  ```bash
403
458
  # npcsh
404
459
  /sample 'prompt'
@@ -417,7 +472,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
417
472
  npc sample model=gpt-4o-mini "What are the primary colors?" --provider openai
418
473
  ```
419
474
 
420
- - ## search: use an internet search provider
475
+ - ## `/search`: use an internet search provider
421
476
  ```npcsh
422
477
  /search -sp perplexity 'cal bears football schedule'
423
478
  /search --sprovider duckduckgo 'beef tongue'
@@ -429,7 +484,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
429
484
  ```
430
485
 
431
486
 
432
- - ## serve: serve an npc team
487
+ - ## `/serve`: serve an npc team
433
488
  ```bash
434
489
  /serve
435
490
  /serve ....
@@ -440,7 +495,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
440
495
  npc serve
441
496
  ```
442
497
 
443
- - ## set: change current model, env params
498
+ - ## `/set`: change current model, env params
444
499
  ```bash
445
500
  /set model ...
446
501
  /set provider ...
@@ -450,7 +505,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
450
505
  ```bash
451
506
  npc set ...
452
507
  ```
453
- - ## sleep: prune and evolve the current knowledge graph
508
+ - ## `/sleep`: prune and evolve the current knowledge graph
454
509
  ```bash
455
510
  /sleep
456
511
  /sleep --dream
@@ -460,7 +515,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
460
515
  ```bash
461
516
  npc sleep
462
517
  ```
463
- - ## `spool`
518
+ - ## `/spool`
464
519
  <p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/spool.md">
465
520
  <img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/spool.png" alt="logo for spool", width=250></a>
466
521
  </p>
@@ -489,7 +544,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
489
544
 
490
545
 
491
546
 
492
- - ## Vixynt: Image generation and editing:
547
+ - ## `/vixynt`: Image generation and editing:
493
548
  ```bash
494
549
  npcsh
495
550
  /vixynt 'an image of a dog eating a hat'
@@ -508,7 +563,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
508
563
 
509
564
 
510
565
 
511
- - ## `wander`: daydreaming for LLMs
566
+ - ## `/wander`: daydreaming for LLMs
512
567
 
513
568
  <p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/wander.md">
514
569
  <img src="https://raw.githubusercontent.com/npc-worldwide/npcsh/main/npcsh/npc_team/kadiefa.png" alt="logo for wander", width=250></a>
@@ -544,7 +599,7 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
544
599
  interruption-likelihood=.1
545
600
  ```
546
601
 
547
- - ## `yap`: an agentic voice control loop
602
+ - ## `/yap`: an agentic voice control loop
548
603
 
549
604
 
550
605
  <p align="center"><a href ="https://github.com/npc-worldwide/npcsh/blob/main/docs/yap.md">
@@ -562,20 +617,9 @@ Once installed, the following CLI tools will be available: `npcsh`, `guac`, `npc
562
617
  yap
563
618
  npc yap
564
619
  ```
565
- - Show available Jinja Execution Templates:
566
- ```bash
567
- # npcsh
568
- /jinxs
569
- ```
570
- ```bash
571
- # bash
572
- npc jinxs
573
- ```
574
-
575
-
576
620
 
577
621
  ## Inference Capabilities
578
- - `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.
622
+ - `npcsh` works with local and enterprise LLM providers through its LiteLLM integration, allowing users to run inference from Ollama, LMStudio, vLLM, MLX, OpenAI, Anthropic, Gemini, and Deepseek, making it a versatile tool for both simple commands and sophisticated AI-driven tasks.
579
623
 
580
624
  ## Read the Docs
581
625
 
@@ -751,6 +795,10 @@ export PERPLEXITY_API_KEY='your_perplexity_key'
751
795
  ├── npc_team/ # Global NPCs
752
796
  │ ├── jinxs/ # Global tools
753
797
  │ └── assembly_lines/ # Workflow pipelines
798
+ │ └── example.npc # globally available npc
799
+ │ └── global.ctx # global context file
800
+
801
+
754
802
 
755
803
  ```
756
804
  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: