Skip to content

agiletec-inc/neural

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural

A native macOS translation app powered by a local Ollama model, in the spirit of DeepL's desktop app. Swift 5.10 + SwiftUI, generated with Tuist. No Rust, no Node, no Docker.

Features

  • Two-pane translation UI (Auto + 7 languages), streamed token-by-token from Ollama
  • Debounced auto-translate (600ms) plus ⌘⏎ for immediate translation
  • Menu bar resident app — closing the window keeps Neural running
  • Global shortcut (default ⌘⇧T, user-customizable in Settings > Shortcuts): captures the current text selection in any app and translates it
  • Translation cache (avoids re-hitting the model) + optional persisted history (last 100)
  • Settings: launch at login, Ollama URL, model name, history on/off

Build

Requires Xcode + Tuist (brew install tuist or mise use -g tuist).

make install    # tuist install — resolves SPM dependencies
make generate   # tuist generate — produces Neural.xcodeproj
make build      # xcodebuild (ad-hoc signed Debug build)
make test       # xcodebuild test — runs NeuralTests

Or directly:

tuist install
tuist generate --no-open
xcodebuild -project Neural.xcodeproj -scheme Neural -configuration Debug build \
  CODE_SIGN_IDENTITY=- CODE_SIGNING_REQUIRED=NO

Runtime dependency

Neural talks to a local Ollama server (http://localhost:11434 by default, configurable in Settings):

brew install ollama
ollama pull qwen2.5:3b
ollama serve

Project layout

Project.swift          # Tuist project definition (single source of truth for the Xcode project)
Tuist.swift             # Tuist config (compatible Xcode versions)
Neural/
  App/                  # App entry point, menu bar, AppDelegate
  Models/                # Language, TranslationRecord
  Services/              # OllamaClient (streaming), NDJSONStreamParser, PromptBuilder,
                          #   TranslationHistoryStore, ClipboardService, SelectionCapture
  ViewModels/            # TranslationViewModel
  Views/                 # ContentView (main window), SettingsView
  Support/               # AppSettings (UserDefaults), LaunchAtLogin, ShortcutName (global shortcut)
NeuralTests/             # XCTest — NDJSON parsing, prompt building, history/cache, OllamaClient

Notes

  • The Xcode project (Neural.xcodeproj) is generated, not checked in — always run tuist generate after editing Project.swift.
  • The global shortcut (default ⌘⇧T, user-remappable in Settings > Shortcuts) is implemented with KeyboardShortcuts, integrated via Tuist's project-level packages: (Xcode-native SPM, embedded straight into Neural.xcodeproj — resolves with a plain xcodebuild -project build, no workspace required) — see Neural/Support/ShortcutName.swift. Capturing the current selection sends a synthetic ⌘C via CGEvent, which requires Accessibility permission (Settings has a grant-access button).

💖 Support

agiletec is a one-person studio building these tools full-time and open source. If they earn a spot in your workflow, a sponsorship keeps them maintained and independent.

Sponsor agiletec

About

Local translation tool using Ollama + qwen2.5:3b. Tauri desktop app + CLI for fast, offline, API-free markdown translation.

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors