Skip to content

Repository files navigation

OpenFlow

OpenFlow is a local-first Electron desktop dictation app for Windows. Hold the global shortcut, speak, and OpenFlow pastes the transcript into the app you are using. The installed Electron app is the product surface: dictation history, engine switching, dictionary, snippets, style, transforms, scratchpad, settings, and the recording overlay all live there. OpenFlow has no hosted product and no browser product.

microphone → OpenFlow Electron app → loopback shim on 127.0.0.1:18765
                                   → selected speech engine
                                   → paste at cursor

Release status: OpenFlow 0.2.0 integrates with a Wispr Flow installation already owned and installed by the user. The explicit local patch turns that installed Electron shell into the OpenFlow desktop experience; it is not a secondary interface. OpenFlow does not bundle Wispr code or binaries, is not affiliated with Wispr, and may need to be re-patched after a Wispr update.

What ships

Component Purpose
openflow/server Loopback-only transcription shim used by the Electron app
openflow/providers Grok, ChatGPT, Claude Desktop, and local Whisper adapters
openflow/patch Source-only tooling that integrates the user's installed Electron app
openflow/static Developer-only loopback diagnostics and test bench; not product UI
openflow/host.py Silent launcher for the shim and OpenFlow Electron app

No proprietary asar, extracted vendor source, credentials, recordings, or dictation history belongs in this repository.

Privacy and security defaults

  • The HTTP service binds to 127.0.0.1 by default.
  • Arbitrary website origins are rejected; only the bundled local UI and local desktop shell receive cross-origin access.
  • Provider fallback is opt-in. Failed local transcription never sends audio to a cloud provider unless that provider is explicitly present in fallback.
  • Failed recordings are not retained. Set OPENFLOW_DEBUG_AUDIO (or the legacy WISPR_GROK_DEBUG_AUDIO) to a directory only when you intentionally need local diagnostic recordings.
  • format_examples.json is private, gitignored, and never copied by the installer.
  • Credentials stay in each provider's existing local credential store. OpenFlow never copies them into the repository or install payload.

Never expose port 18765 to a LAN or the public internet.

Requirements

  • Windows 11
  • Python 3.11 or newer on Windows PATH
  • Node.js 22.12 or newer, used only to unpack and repack the local Electron asar
  • Wispr Flow installed by the user
  • At least one configured speech provider:
    • SuperGrok / Grok CLI OAuth
    • ChatGPT / Codex OAuth
    • Claude Desktop
    • OpenAI-compatible local Whisper server

Provider and desktop-app terms still apply. OpenFlow does not grant access to a paid service.

Install

Run from Command Prompt, PowerShell, or Git Bash:

git clone https://github.com/OnlyTerp/OpenFlow.git
cd OpenFlow
npm ci
python -m openflow install
python -m openflow start

install deploys the public runtime to %LOCALAPPDATA%\OpenFlow and creates Desktop and Startup shortcuts. start now finds your installed Wispr Flow desktop shell and patches it automatically before launching, so users no longer need to run patch manually.

Desktop patch pipeline

python -m openflow patch (run implicitly by start) rebuilds the installed desktop app.asar from the immutable stock backup app.asar.bak-pre-grok-stt and applies four stages in order:

  1. patch_asr.py — routes transcription to the loopback shim, unlocks the packaged gRPC override, raises transcription/processing timeouts, extends the renderer CSP to loopback, and disables the auto-updater so an unpatched Wispr update cannot silently replace the build.
  2. patch_offline_local.py — local sign-in bypass: the desktop shell runs on a local offline session instead of the Wispr login wall, and dictation never drops into a signed-out state.
  3. rebrand.pypackage.json and user-facing strings become OpenFlow; theme greens are swapped to the OpenFlow orange palette.
  4. inject.py — injects the OpenFlow theme (sidebar Speech Engine switcher, first-run setup panel) into the renderer and hides cloud-only chrome (quota CTA, post-onboarding interstitial, account/subscription settings tabs).

The pipeline requires Wispr Flow 1.6.122. Every stage verifies exact byte patterns for that build; if a pattern does not match, patching fails loudly instead of writing a partial result — restore stock and report the app version plus the error text. Because the auto-updater is pinned off, update Wispr deliberately: python -m openflow restore, update, then python -m openflow patch again. The developer diagnostics page at 127.0.0.1:18765 stays off by default (OPENFLOW_CONTROL_CENTER=1 enables it); the product UI is the patched Electron app, with no developer UI shown by default.

The installed launcher is:

%LOCALAPPDATA%\OpenFlow\launch-openflow.vbs

Choose a speech engine

Use the Speech Engine control inside the OpenFlow Electron app to switch among Grok, GPT, Claude, and Local. The selected engine is authoritative unless you explicitly configure fallback providers.

Provider authentication still uses each provider's existing local session:

Provider Connection path
Grok grok login --oauth
ChatGPT codex login
Claude Sign in to Claude Desktop
Local Configure an OpenAI-compatible /v1/audio/transcriptions URL

The loopback page at 127.0.0.1:18765 is developer diagnostics only and is not the OpenFlow product. If you open it in a browser you are looking at the wrong window. The real interface is the patched Wispr Flow Electron app.

Commands

Command Action
python -m openflow install Deploy runtime and Windows shortcuts
python -m openflow start Patch the desktop shell, start the shim, and launch the desktop app
python -m openflow serve Run only the shim in the foreground (developer use)
python -m openflow status Print GET /health and exit nonzero when offline
python -m openflow patch Manually back up and patch the current local desktop asar
python -m openflow restore Restore the stock asar backup

After a deliberate Wispr update (see the auto-update pin above), close Wispr and run python -m openflow start again. OpenFlow will re-patch the updated desktop shell automatically; if the new Wispr version changes patched byte patterns, the pipeline fails loudly with the mismatch to report instead of installing a broken asar.

Configuration

User configuration lives outside the repository:

  • Windows: %APPDATA%\OpenFlow\config.json
  • Other development hosts: ~/.openflow/config.json
  • Override: OPENFLOW_CONFIG=/path/to/config.json

The default local Whisper endpoint is http://127.0.0.1:8080/v1/audio/transcriptions. Provider selection, enabled providers, local endpoint settings, and explicit fallbacks are stored in the configuration file.

Useful development overrides:

Variable Default Purpose
OPENFLOW_HOST 127.0.0.1 Shim bind address
OPENFLOW_PORT 18765 Shim port
OPENFLOW_DEBUG_AUDIO unset Opt-in failed-audio directory
OPENFLOW_EXAMPLES install-root format_examples.json Private cleanup examples
OPENFLOW_CONFIG platform config path Isolated config for development/tests
OPENFLOW_CONTROL_CENTER 0 Set to 1 to enable the diagnostics web UI

Older WISPR_GROK_* environment variables are still accepted for backward compatibility.

Development

The Python runtime uses the standard library plus provider-specific local clients. The only Node dependency is @electron/asar for the explicit patch command.

npm ci
python -m unittest discover -s tests -v
python -m openflow --help
python -m openflow serve

If you need the diagnostics test bench, set the environment variable OPENFLOW_CONTROL_CENTER=1 before starting the shim, then open http://127.0.0.1:18765/.

Architecture and design references:

Contributing

Read CONTRIBUTING.md before opening a change. Provider status must remain honest: never report an engine as ready unless its real authentication and transcription path are available. Security reports belong in SECURITY.md, not a public issue.

Legal

OpenFlow-authored code and assets are MIT licensed; see LICENSE. The license does not cover Wispr Flow binaries, source, trademarks, or services. Provider names are used nominatively. OpenFlow is not affiliated with or endorsed by Wispr, xAI, OpenAI, or Anthropic.

About

OpenFlow — local-first multi-engine Electron dictation for Windows

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages