Skip to content

Commit fbbe286

Browse files
committed
Rewrite README: add Agent mode docs, security/testing sections, badges, and a table of contents
1 parent 4fd0647 commit fbbe286

1 file changed

Lines changed: 113 additions & 17 deletions

File tree

README.md

Lines changed: 113 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,53 @@
11
# Modelforge
22

3-
A desktop chat client for [Ollama](https://ollama.com) that also talks to OpenAI and Anthropic — one app for local and cloud models, built with Electron, React, and TypeScript.
3+
[![CI](https://github.com/voidstackloop/modelforge/actions/workflows/ci.yml/badge.svg)](https://github.com/voidstackloop/modelforge/actions/workflows/ci.yml)
4+
[![Release](https://img.shields.io/github/v/release/voidstackloop/modelforge)](https://github.com/voidstackloop/modelforge/releases/latest)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6+
7+
A cross-platform desktop client that unifies local and cloud AI models in one interface: [Ollama](https://ollama.com) for local inference, plus OpenAI and Anthropic for cloud models. Built with Electron, React, and TypeScript.
8+
9+
Beyond chat, Modelforge includes an **agentic mode** — the model can read/write files and run shell commands in a folder you choose, with every action gated behind your explicit approval.
410

511
![Chat view with a local Ollama model](docs/screenshots/chat.png)
612

13+
## Contents
14+
15+
- [Features](#features)
16+
- [Screenshots](#screenshots)
17+
- [Installation](#installation)
18+
- [Quick start](#quick-start-try-it-in-5-minutes)
19+
- [Agent mode](#agent-mode)
20+
- [Building from source](#building-from-source)
21+
- [Project structure](#project-structure)
22+
- [Testing](#testing)
23+
- [Security](#security)
24+
- [Contributing](#contributing)
25+
- [License](#license)
26+
727
## Features
828

9-
- **Multi-provider chat** — local Ollama models plus OpenAI and Anthropic, with streaming responses, in one interface.
29+
**Chat & providers**
30+
- Local Ollama models, OpenAI, and Anthropic in one interface, with token-by-token streaming.
31+
- Vision support — attach images (or extract frames from a video) for models that can see them.
32+
- Live token usage and estimated cost per message and per session (Ollama is free/local; cloud providers show a running estimate).
33+
34+
**Organization**
1035
- **Projects** — group related chats under shared instructions and default model parameters.
11-
- **Per-session and per-project overrides** — pin a specific prompt, model, context length, or temperature to a single chat or an entire project.
36+
- **Per-session and per-project overrides** — pin a specific prompt, model, context length, or temperature to a single chat or an entire project, falling back to sane defaults.
1237
- **Prompt library** — save and reuse system prompts across chats.
13-
- **File, image, video, and PDF attachments** — vision-capable models can see images and extracted video frames; PDFs and folders are parsed and, for large folders, retrieved via an in-app RAG pipeline (embeddings via Ollama).
14-
- **Usage and cost tracking** — token counts and estimated cost per message and per session (Ollama usage is free/local).
15-
- **Command palette**`Ctrl/Cmd+K` to jump between chats, projects, and settings.
16-
- **English and Turkish** UI localization.
17-
- **Configurable Ollama host** — point at a remote Ollama server instead of localhost.
18-
- **Data export/import** — back up or move your chat history.
19-
- **Auto-updates** — packaged builds check GitHub Releases for new versions.
38+
- **Command palette** (`Ctrl/Cmd+K`) — jump between chats, projects, and settings without touching the mouse.
39+
40+
**Files & retrieval**
41+
- Attach files, folders, images, video, and PDFs directly into a conversation.
42+
- Large folders are automatically chunked, embedded (via Ollama), and retrieved by relevance instead of dumped whole into the prompt — so a big project doesn't blow out a small model's context window.
43+
44+
**Agent mode** — see the [dedicated section](#agent-mode) below.
45+
46+
**Customization & control**
47+
- English and Turkish UI localization.
48+
- Configurable Ollama host — point at a remote server instead of localhost.
49+
- Data export/import, and one-click "copy diagnostic info" for bug reports.
50+
- Auto-updates: packaged builds check GitHub Releases for new versions.
2051

2152
## Screenshots
2253

@@ -28,7 +59,7 @@ A desktop chat client for [Ollama](https://ollama.com) that also talks to OpenAI
2859
</details>
2960

3061
<details>
31-
<summary>Browsing and pulling models</summary>
62+
<summary>Browsing and pulling models, with tool-calling badges for Agent mode</summary>
3263

3364
![Model catalog with recommendations based on your hardware](docs/screenshots/settings-models.png)
3465

@@ -52,9 +83,13 @@ A desktop chat client for [Ollama](https://ollama.com) that also talks to OpenAI
5283

5384
Download the latest installer for your platform from the [Releases](../../releases) page.
5485

55-
- **Windows**`Modelforge Setup *.exe`
56-
- **macOS**`Modelforge-*.dmg` ⚠️ **not yet tested on real hardware** — it builds and should run (Electron is cross-platform and nothing in this codebase is Windows/Linux-specific), but no one has verified it on an actual Mac yet. Code signing/notarization also isn't set up, so Gatekeeper will likely block it until you right-click → Open. Use at your own risk and please [open an issue](../../issues) if you try it.
57-
- **Linux**`Modelforge-*.AppImage`
86+
| Platform | File | Notes |
87+
|---|---|---|
88+
| Windows | `Modelforge Setup *.exe` | Unsigned — Windows SmartScreen will warn on first run ("Unknown publisher"); click **More info → Run anyway**. |
89+
| macOS | `Modelforge-*.dmg` (Intel) / `Modelforge-*-arm64.dmg` (Apple Silicon) | ⚠️ **Not yet verified on real hardware.** Builds for both architectures and should run — Electron is cross-platform and nothing in this codebase is OS-specific — but no one has confirmed it on an actual Mac. Also unsigned/unnotarized, so Gatekeeper will block it until you right-click → **Open**. Please [open an issue](../../issues) if you try it, either way. |
90+
| Linux | `Modelforge-*.AppImage` | Make it executable (`chmod +x`) and run directly, or use your AppImage launcher of choice. |
91+
92+
No installer signing certificate is configured yet, so every platform will show some form of "unknown publisher" warning on first launch — this is expected for an unsigned build, not a sign of a corrupted download.
5893

5994
Modelforge talks to a local [Ollama](https://ollama.com) install by default — no API key required. OpenAI and Anthropic support is optional: add your API key in **Settings** only if you want to use those providers.
6095

@@ -70,6 +105,26 @@ Modelforge talks to a local [Ollama](https://ollama.com) install by default —
70105

71106
If steps 2–3 work, the core app is functioning correctly — everything else layers on top of that same chat pipeline.
72107

108+
## Agent mode
109+
110+
Click **Agent** in the chat toolbar and pick a folder — that becomes the model's sandboxed workspace for the rest of the conversation. The model can then call:
111+
112+
| Tool | What it does |
113+
|---|---|
114+
| `read_file` | Read a text file in the workspace |
115+
| `write_file` | Create or overwrite a file (creates parent directories as needed) |
116+
| `list_dir` | List files and subdirectories |
117+
| `search_files` | Search for a text string across the workspace |
118+
| `run_command` | Execute a shell command in the workspace (or a subfolder), with a 60s timeout |
119+
120+
**Safety model:**
121+
- Every tool call is confined to the chosen workspace folder — path-traversal attempts (`../../etc`, absolute paths elsewhere on disk) are rejected before anything runs.
122+
- Every call shows an **Allow / Deny** card before it executes — nothing runs without an explicit click. Read-only tools (`read_file`, `list_dir`, `search_files`) can be marked "always allow this session" to cut down on repetitive approvals; `write_file` and `run_command` always require a fresh click, since they have real, potentially irreversible effects.
123+
- A per-turn step limit (25 tool-result → model-continuation round trips) stops a model from looping indefinitely without producing a final answer.
124+
- The trust list for "always allow" is in-memory only — closing and reopening a chat resets it.
125+
126+
**Model choice matters.** Agent mode works with whatever model you point it at, but only actually produces tool calls if that model was trained for function/tool calling — a model without that training will just chat normally and never call a tool. The Settings model browser flags models with reliable tool-calling support with a 🔧 **Tool calling** badge (e.g. the Qwen3 family, Llama 3.1+, Mistral Nemo, Qwen2.5-Coder, Devstral).
127+
73128
## Building from source
74129

75130
Requires [Node.js](https://nodejs.org) 22+.
@@ -93,12 +148,53 @@ Packaged installers are written to `app/release/`.
93148

94149
## Project structure
95150

96-
- `frontend/` — React + Vite renderer (the UI), built to a single inlined HTML file so Electron can load it via `file://`.
97-
- `app/` — Electron main process: window management, IPC handlers, provider integrations (Ollama/OpenAI/Anthropic), settings/session/project persistence, file and media processing, and packaging config.
151+
```
152+
frontend/ React + Vite renderer (the UI)
153+
src/pages/ Chat and Settings screens
154+
src/components/ Shared UI (layout, command palette, markdown rendering, shadcn primitives)
155+
src/lib/ i18n, model catalogs, pricing estimates, provider helpers
156+
157+
app/ Electron main process
158+
src/main.ts Window management, IPC handler registration
159+
src/providers/ Ollama/OpenAI/Anthropic chat + tool-calling adapters
160+
src/agent-tools.ts Agent mode's file/shell tool implementations (workspace-sandboxed)
161+
src/*-store.ts Settings/sessions/projects/secrets persistence (atomic writes, corruption recovery)
162+
src/rag.ts Chunking + embedding + retrieval for large folder attachments
163+
src/logger.ts Rotating file logs surfaced via Settings → Diagnostics
164+
```
165+
166+
The frontend builds to a single inlined HTML file (`vite-plugin-singlefile`) so Electron can load it directly via `file://` in production, matching how the packaged app actually runs.
167+
168+
## Testing
169+
170+
```sh
171+
npm test --prefix frontend
172+
npm test --prefix app
173+
```
174+
175+
The `app` suite covers the store layer (atomic writes, corrupted-file recovery), the agent tools (including path-traversal rejection and shell command execution), and the RAG chunking/similarity logic. Both suites run in CI on every push and pull request via [`.github/workflows/ci.yml`](.github/workflows/ci.yml), which also lints, typechecks, and builds both packages.
176+
177+
## Security
178+
179+
- **Process isolation**: `contextIsolation: true`, `nodeIntegration: false` — the renderer only ever talks to the main process through an explicit, typed preload bridge.
180+
- **Content Security Policy** restricting plugins, frames, and form submissions; external links open in your default browser instead of an unmanaged Electron window.
181+
- **API keys** are encrypted at rest via the OS credential store (`safeStorage`) and never leave the device.
182+
- **Agent mode** tool calls are workspace-sandboxed (path-traversal rejected) and require explicit per-call approval — see [Agent mode](#agent-mode) above.
183+
- No telemetry, no analytics, no data sent anywhere except directly to whichever provider (Ollama, OpenAI, Anthropic) you've configured.
98184

99185
## Contributing
100186

101-
Issues and pull requests are welcome. Please run `npm run lint` (frontend) and make sure both `frontend` and `app` build cleanly before opening a PR.
187+
Issues and pull requests are welcome. Before opening a PR, please make sure:
188+
189+
```sh
190+
npm run lint --prefix frontend
191+
npm run build --prefix frontend
192+
npm run build --prefix app
193+
npm test --prefix frontend
194+
npm test --prefix app
195+
```
196+
197+
all pass — this is the same set of checks CI runs.
102198

103199
## License
104200

0 commit comments

Comments
 (0)