Skip to content

J0hnWIcks/Pronitive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pronitive AI USB Banner

Pronitive — AI USB

A fully offline, portable AI environment. No installation. No cloud. No trace.

Run powerful Large Language Models directly from a USB drive on any Windows machine.

Windows Electron llama.cpp License Author


What Is Pronitive?

Pronitive AI USB is a portable AI chat environment designed to run entirely from a USB drive — no internet connection, no data leaving your machine, no software installed on the host. Plug in, launch, chat, unplug.

It runs quantized GGUF language models through a local llama.cpp inference server and wraps everything in a polished Electron desktop app with a multi-panel chat dashboard, session archiving, a scratchpad, Obsidian export, and more.

Who it's for: researchers, students, writers, developers, and anyone who wants a private, portable AI assistant that works anywhere.


Features

  • 100% Offline — zero network calls during inference; your data never leaves the drive
  • Model-agnostic — drop in any GGUF model (Phi-3, Mistral, LLaMA, Gemma, Qwen, and more)
  • Standalone .exe — build once, run anywhere; no Node or VS Code needed on the host
  • Multi-panel dashboard — chat center, session archive drawer, Ghost Draft scratchpad
  • Five color themes — Jarvis Default, Solaris Amber, Nordic Frost, Dracula Violet, Paper Light
  • Session management — save, rename, favorite, search, and restore full conversations
  • Obsidian export — pipe notes and full chats directly to your vault as .md files
  • Prompt Library — save and reuse system prompts with one click
  • File injection — drag .txt, .js, .py, .json, .md, .pdf, and more into context
  • Performance profiles — ECO / BALANCED / TURBO thread modes to match your hardware
  • Autosave + crash recovery — conversation restored automatically if the app closes unexpectedly

Repository Structure

Pronitive/
├── AI_USB/
│   ├── AI_USB_App.exe              ← Standalone app (place here after building)
│   ├── Launch_AI_USB.bat           ← VS Code extension launcher (Option B)
│   ├── HELP.txt                    ← Full in-depth user guide
│   │
│   ├── config/
│   │   └── settings.json           ← All settings: vault path, sampling, prompts
│   │
│   ├── runtimes/
│   │   └── llama.cpp/              ← Place llama-server.exe + .dll files here
│   │       └── (your .gguf files)  ← Place model files anywhere under runtimes/
│   │
│   ├── sessions/                   ← Saved conversations (auto-managed)
│   │   └── _autosave.json          ← Crash recovery autosave
│   │
│   ├── scripts/
│   │   └── ai_usb_launcher.ps1
│   │
│   └── electron-app/               ← Standalone app source
│       ├── main.js
│       ├── preload.js
│       ├── Build_The_App.bat       ← One-click build script
│       ├── Start_Dev_Mode.bat      ← Run without building
│       ├── BUILD_INSTRUCTIONS.md
│       ├── package.json
│       ├── modules/
│       │   ├── engine.js           ← llama.cpp streaming engine
│       │   └── scanner.js          ← Model/runtime auto-detection
│       └── app/
│           ├── dashboard.html
│           ├── css/
│           └── js/
│               ├── chat.js         ← Chat engine & conversation state
│               ├── ui.js           ← UI controls & panels
│               ├── draft.js        ← Ghost Draft scratchpad
│               └── markdown.js     ← Live markdown renderer

Prerequisites

Before building or running Pronitive, you need two things on your machine:

1. Node.js (for building only — not needed at runtime)

Download and install Node.js LTS from https://nodejs.org. Any LTS version works (Node 18 or newer recommended).

After installing, open PowerShell and confirm it works:

node --version
npm --version

2. llama.cpp Runtime Binaries

Download a prebuilt Windows CPU release of llama.cpp:

github.com/ggml-org/llama.cpp/releases

Look for a file named something like llama-bXXXX-bin-win-cpu-x64.zip. Download and extract it.

You need these files from the zip:

  • llama-server.exe
  • All accompanying .dll files in the same folder

Place them in:

AI_USB\runtimes\llama.cpp\

Step 1 — Get a Language Model

Pronitive runs any GGUF-format model. Download one (or several) from Hugging Face:

Model Size Best For
Phi-3 Mini 4K Instruct Q4 ~2.4 GB Fast, lightweight, great for everyday tasks
Mistral 7B Instruct v0.3 Q4_K_M ~4.4 GB Strong reasoning and structured writing
LLaMA 3 8B Instruct Q4_K_M ~4.7 GB General purpose, well-rounded
Gemma 2 9B Instruct Q4_K_M ~5.5 GB High quality outputs, Google-tuned
Qwen 2.5 7B Instruct Q4_K_M ~4.7 GB Multilingual, strong at code

Drop your .gguf file(s) anywhere under:

AI_USB\runtimes\

Subfolders are scanned recursively — the app will find them automatically.


Step 2 — Build the App

Skip this step if AI_USB_App.exe already exists in the AI_USB root folder.

  1. Open File Explorer and navigate to AI_USB\electron-app\
  2. Right-click Build_The_App.batRun as administrator
  3. Wait for the build to finish (it downloads Electron and packages everything)
  4. Move the resulting AI_USB_App.exe from electron-app\dist\ to the AI_USB root folder:
AI_USB\
├── AI_USB_App.exe   ← move it here
├── runtimes\
├── sessions\
├── config\
└── electron-app\

⚠️ The .exe must sit at the root level alongside runtimes\ and sessions\ — it finds your models relative to its own location. If it's anywhere else, it won't detect them.


Step 3 — Launch

Double-click AI_USB_App.exe — that's it.

The app opens directly as its own window. No VS Code, no terminal, no setup prompt.

Want to test without building first?

Double-click Start_Dev_Mode.bat inside electron-app\. This runs the app via Electron's dev runner — same interface, same features, no build step needed.


Using the Dashboard

The interface is split into three resizable panels:

┌─────────────────┬──────────────────────────┬─────────────────┐
│   LEFT PANEL    │       CHAT CENTER        │   RIGHT PANEL   │
│                 │                          │                 │
│  Available      │  ┌──────────────────┐   │  Ghost Draft    │
│  Cores          │  │  Chat messages   │   │  Scratchpad     │
│                 │  │  stream here     │   │                 │
│  Archive /      │  └──────────────────┘   │  Export to      │
│  Sessions       │  [  Type here...  ] ■   │  Obsidian       │
│                 │                          │                 │
│  Profile        │  ENTER = send            │                 │
│  ECO/BAL/TURBO  │  SHIFT+ENTER = newline   │                 │
│                 │                          │                 │
│  Appearance     │                          │                 │
│  ● ● ● ● ●     │                          │                 │
└─────────────────┴──────────────────────────┴─────────────────┘

Selecting a model: click any model name in the Available Cores section of the left panel, then select a performance profile (ECO / BALANCED / TURBO) to authorize the uplink.

Resizing panels: drag the grip handle (small vertical dot-strip) on the inner edge of either panel. Double-click the grip to toggle it closed. Drag it most of the way shut and it snaps closed — click the icon strip that appears to bring it back.

Zen Mode: close both side panels and the chat column centers itself.


Troubleshooting

Symptom Fix
"No cores detected" Make sure .gguf files are somewhere under runtimes\ and the .exe is in the AI_USB root (not inside electron-app\dist\)
"Engine Failure" Port 8080 may be in use by another app. Check that all llama.cpp .dll files are in runtimes\llama.cpp\ alongside llama-server.exe
Build fails with symbolic link error Run Build_The_App.bat as Administrator (right-click → Run as administrator)
npm install hangs or fails Antivirus sometimes blocks Electron binary extraction. Temporarily pause real-time scanning for the node_modules folder and retry
Cores show in dev mode but not in the built .exe Rebuild as Administrator. Make sure preload.js is in extraResources in package.json (it already is in this repo)
Model generates extra tasks or questions after answering This is a known issue with certain instruction-tuned models (Phi-3, FLAN variants). It is handled automatically by the self-prompt guard in engine.js and chat.js
Autosave keeps restoring an old conversation Manually delete sessions\_autosave.json, or click Save Logs once to clear it

Performance Guide

Profile Threads Best For
ECO 2 Laptops, battery operation, background use
BALANCED 4 Standard work — fast responses while multitasking
TURBO All cores Desktop PCs, maximum speed

Use the Run Benchmark option in Settings to compare speeds between profiles and models on your hardware.

For models larger than your RAM, generation will still work but will be significantly slower due to paging. As a rough guide: a Q4_K_M model needs approximately 1.1× its file size in RAM.


Building from Source (Advanced)

If you want to modify the source and rebuild:

# Navigate to the electron-app folder
cd AI_USB\electron-app

# Install dependencies (one-time, requires internet)
npm install

# Run in development mode (no build needed)
npm start

# Build the portable .exe
npm run dist

The built .exe will appear at electron-app\dist\AI_USB_App.exe. Move it to the AI_USB root as described in Step 2.


VS Code Extension (Alternative Launch)

If you prefer to run Pronitive inside VS Code rather than as a standalone app:

  1. Open VS Code in the AI_USB root folder
  2. Double-click Launch_AI_USB.bat

Both launch methods share the same runtimes\, sessions\, and config\ folders — your models and saved sessions are always in sync.


Contributing

Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.

When contributing, please:

  • Keep changes scoped to one concern per PR
  • Test with at least two different GGUF models before submitting
  • Do not commit binary files (.gguf, .exe, .dll) — these are listed in .gitignore

Author

Blake Von Jettgithub.com/J0hnWIcks


License

MIT — free to use, modify, and distribute.


Pronitive AI USB — built for privacy, built for portability.

About

Fully offline, portable AI environment. Run LLMs from a USB drive — no installation, no cloud, no trace.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors