Skip to content
BtocodePublic

About

Write better in every app: grammar, tone, translation and answers right where you type. An open-source writing assistant for Linux (X11, GNOME Wayland) and macOS. Bring your own AI, or run fully offline.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Glance

Write better in every app.

Grammar, tone, translation and answers, right where you type.
Open source, private by design, for Linux and macOS.

Release License: MIT Platform: Linux and macOS Python 3.10 to 3.14 Status: alpha

Install · Features · Shortcuts · Privacy · Changelog


Glance overview: fixes as you type, one-click tones, the Glance Assistant, autocomplete, actions on selected text, answers and translation beside the text, Tell Glance, Glance Shot, AI choices and privacy settings, then the one-line install.

Watch it in HD (MP4, 44 s)


Install

curl -fsSL https://raw.githubusercontent.com/Btocode/glance/main/install.sh | bash

Linux (x86_64, X11 or GNOME Shell 46 to 50 on Wayland) and macOS 13 or later (Apple silicon and Intel). No sudo, and it starts by itself at login. KDE, Sway and other Wayland desktops are not supported yet.

Your system One-time setup
Linux, X11 Nothing. If glance doctor asks you to restart Chrome, Slack or similar, do it.
Linux, GNOME Wayland Log out and back in once, so GNOME loads Glance's extension.
macOS When asked, switch on Accessibility for python3.12 (System Settings → Privacy & Security). Screen Recording is only for Glance Shot.

On first start, Glance shows a short tour. The tray's How to use Glance… opens it again.

Connect an AI (optional)

Spelling and grammar work offline with no AI. Tones, rewrites, Explain, Translate and Tell Glance need one, and Glance uses the one you already have:

You have Do this
Claude Code, Codex, Gemini CLI or OpenCode Sign in as usual (claude, codex login, gemini, opencode auth login). Glance finds it.
An API key (Anthropic or OpenAI-compatible) glance backend set-key
Nothing, and you want it fully offline Install Ollama, ollama pull llama3.2, then glance backend use local. Your text never leaves the computer. More

glance backend list shows what Glance found, glance backend use NAME switches, glance backend test tries one. Claude is the best tested; Codex, Gemini and OpenCode are experimental.

Features

Fixes as you type, in any app
Chat, mail in the browser, editors. Spelling and grammar run on your computer. Super+Alt+G checks, Alt+Enter puts the fix in, one undo takes it out.

The suggestion strip under a text field, the fixes in green, an Alt+Enter chip.

Change the tone in one click
Right-click the Glance icon: Friendlier, Direct, Shorter, Professional, Formal, Diplomatic, or "Rewrite…" in your own words. Save the ones you like as your own tones.

The icon's toolbar: Check, Friendlier, Direct, Shorter, Professional, Formal, Diplomatic, Rewrite…

See every rewrite before you use it
The Glance Assistant (Super+Alt+Space) shows the fixes and each tone's rewrite side by side.

The Glance Assistant: the suggested text, Apply, four tone cards with previews and Rewrite as…

Works on any text you select
Let go of the mouse and the Glance mark appears: Explain, Summarize, Translate, Copy. ⋯ drafts a reply or changes the tone.

A selected sentence and Glance's explanation in a panel under it.

Just tell Glance
Super+Alt+T, then type what you want: "formal", "translate to Spanish", "reply politely declining". It works on the selection or the field you're in.

The Tell Glance box with suggestions: Formal, Diplomatic, Shorter, Fix grammar, Explain, Translate…

Glance Shot: ask about anything on screen
Super+Alt+C, pick a region: copy its text, explain it, translate it, ask a question, or mark it up before you share.

A screenshot of an error with Glance Shot's toolbar and the AI's explanation under it.

And more:

  • Sounds like you. Write a short note on how you write (Settings ▸ AI ▸ Your voice, or glance voice set …) and every rewrite follows it.
  • Many languages. Spanish, Bangla, German, French, Arabic, Hindi, Chinese, Japanese and more are checked in their own language, never translated.
  • Autocomplete when you want it. Super+Alt+Enter suggests the rest of the sentence as ghost text; Tab takes it.
  • Explains itself. If the icon or the mark doesn't show up somewhere, glance doctor --last says why and what to do.
See the typing flow in action
Demo: a message is typed with mistakes, the Glance icon counts 6 fixes, Super+Alt+G shows the corrected sentence in a strip under the field, Alt+Enter puts it in; then a paragraph is selected, the Glance mark opens its action bar and Explain answers in a panel.

Shortcuts

Linux macOS What it does
Super+Alt+G ⌃⌥G Check the field now
Alt+Enter ⌥⏎ Use the suggestion (or the tone you picked)
Super+Alt+T ⌃⌥T Tell Glance what to do
Super+Alt+A ⌃⌥A Act on the selected text
Super+Alt+C ⌃⌥C Glance Shot (Enter: whole screen, Space: a window, Esc: cancel)
Super+Alt+Space ⌃⌥O Open the Glance Assistant
Super+Alt+1 … 4 ⌃⌥1 … ⌃⌥4 Pick tone 1 to 4
Super+Alt+F ⌃⌥F Fix all safe grammar
Super+Alt+Enter ⌃⌥⏎ Autocomplete (Tab takes it)
Super+Alt+Z ⌃⌥Z Undo the last Glance change
Super+Alt+P ⌃⌥P Pause or resume
Esc Esc Close the strip and the panel

Plain Enter is never taken. Change any shortcut in Settings or [general.hotkeys]; none clashes with a desktop shortcut (details). On GNOME, a shortcut of Super plus one key is refused, because GNOME's overview takes it.

Privacy

  • Grammar runs on your computer (Harper). Nothing goes to an AI until you connect one, or ever, with a local model.
  • Secrets are removed first. Keys, tokens, card numbers and private keys are redacted before any text reaches an AI.
  • Some places are never read: password fields, private browser windows, password managers, banking and sign-in pages, terminals.
  • Your text is never stored or logged. API keys live only in the system keyring (Keychain on macOS).
  • One network call of its own: once a day Glance asks github.com for the latest version (check_updates = false turns it off).

Found a privacy problem? Report it privately: SECURITY.md.

Commands

Command What it does
glance doctor (--fix) Check the setup and say what to do (--fix repairs what Glance owns)
glance doctor --last Why the icon or mark didn't show in the app you just used
glance start · pause [30m] · resume Start after Quit, pause, resume
glance settings Open the Settings window
glance backend list · use NAME · test See, pick and try an AI
glance voice set "…" · glance tones Your voice note; list or delete saved tones
glance rewrite --tone formal < draft.txt Rewrite text from the terminal
glance usage AI calls, tokens and cost per day
glance update Install the latest release (keeps your settings)
glance report A diagnostics file for a bug report (never your text)

Troubleshooting

Problem Fix
Nothing happens glance doctor --fix
The icon or mark didn't show in an app glance doctor --last, right after
"Connect an AI" Sign in to an AI (see Connect an AI). Grammar still works without one.
No icon on GNOME Wayland Log out and back in once.
macOS: no icon or suggestions Switch on Accessibility for python3.12, then launchctl kickstart -k gui/$(id -u)/io.github.btocode.glance.
The first check is slow The AI is starting up; later checks are faster.
A shortcut does nothing Another program may own it. glance doctor reports clashes.

Logs never contain your text: Linux journalctl --user -u glance, macOS ~/Library/Logs/Glance/glanced.log. Reporting a bug? Attach the file glance report writes (read it first: it holds versions, doctor results and a filtered log, never your text, clipboard, window titles, keys or user name).

Update and uninstall

glance update                                  # the latest release; keeps your config, keys and dictionary
~/.local/share/glance-src/uninstall.sh         # remove Glance (--keep-data keeps your dictionary)

Glance checks for updates once a day and adds Update now to the tray. glance update --check only says whether one exists ("Glance 0.5.0 → 0.6.0"); glance update --main follows the main branch. Packages for the AUR, Homebrew and Debian/Ubuntu are in packaging/ (run glance setup once after installing one).

Uninstall keeps ~/.config/glance/config.toml and leaves the accessibility setting on: on GNOME turn it off with gsettings set org.gnome.desktop.interface toolkit-accessibility false, on macOS remove the Accessibility entry in System Settings.

More

Settings

Change them in the Settings window: the tray's Settings… or glance settings. They live in ~/.config/glance/config.toml (the window keeps your comments), and Glance reads changes while it runs.

[general]
check = "shortcut"            # or "typing": check as you type
correction = "minimal"        # or "fluent": also reword a sentence a little to fix its grammar
check_languages = "auto"      # or "english": check every text as English
check_updates = true          # false: never look for a newer version

[general.hotkeys]             # only the keys you set change
check = "Super+Alt+g"

[ui]
suggestions = "on_click"      # or "auto" (typing mode): show suggestions by themselves
use_key = "Alt+Return"        # the key that puts the suggestion in

[ai]
max_words = 600               # most words the AI reads at once (50-5000)
monthly_cost_limit_usd = 5.00 # stop AI calls at this reported cost (default: no limit)

[selection]
enabled = true                # the floating mark beside selected text
translate_to = "English"

[shot]
enabled = true
save_dir = "~/Pictures/Glance"
ocr = "auto"                  # auto, ocrs, tesseract or off
ai_images = "ask"             # ask, allow or never (Explain / Ask send the image to the AI)

[style]
voice = "Short, plain sentences. British spelling."  # "Your voice": every rewrite follows it

[[my_tone]]                   # a saved "Rewrite as…" (Settings or "Save as a tone")
name = "Firm but kind"
instruction = "firm but polite, no apologies"

[backend]
local_url = ""                # a local OpenAI-compatible server (default: Ollama, then LM Studio)
warm = false                  # no idle claude processes (default on: one for checks, one
                              # for rewrites, 130-195 MB each, stopped after 10 idle minutes)

[apps.slack]                  # per app, by window class
capture = false               # stop automatic field capture in this app

Change a model with glance backend model NAME MODEL. Defaults are each tool's fastest, cheapest model. To make Glance never read an app, add its window class to privacy.app_denylist (this replaces the built-in list of password managers and remote-desktop tools).

Other commands: glance profile (the focused field's audience), glance features (list or switch features), glance shot, glance tones delete NAME, glance voice clear.

Claude Code Ctrl+G (Linux): glance wrapper install adds a claude() function to .zshrc so Ctrl+G opens your prompt in Glance's editor. glance wrapper uninstall removes it.

Installer options: add them after bash -s --. --with-apt installs missing system packages with one sudo apt-get install -y (never run otherwise), --yes / --no-wrapper answer the Claude Code wrapper question, --no-desktop-overrides leaves Chrome, Brave, Slack and Discord launchers alone, --no-start does not start the service, --from-local installs from a checkout, --ref main (or a tag such as v0.4.0) picks what to install; the default is the latest release. For the Linux tray icon install gir1.2-ayatanaappindicator3-0.1; without it Glance works with no icon.

Privacy, in detail
  • Grammar checks run on your computer (Harper). Nothing is sent to an AI until you connect one.
  • Text sent to any backend is redacted first (keys, tokens, cards, private keys).
  • An API key lives in the system keyring (Keychain on macOS) only, never in the config or logs.
  • glance status and the logs never contain your text.
  • Once a day Glance asks github.com for the latest version; nothing else is sent. Turn it off with check_updates = false.
  • A Glance Shot image stays in memory. It is written to disk only if you click Save, and sent to an AI only by Explain or Ask, after a notice.
  • Private browser windows, password managers and banking or SSO pages are never read.
  • On GNOME Wayland, Glance's shell extension can type into the focused window and read the clipboard. It serves only Glance's own processes.

Found a privacy leak? Report it privately: see SECURITY.md.

AI usage tracking

Glance counts its own AI calls per day, backend and model: calls, failures, tokens and what each was for. No text is stored, only numbers, in ~/.local/share/glance/usage-ledger.json (last 90 days). Figures appear only where the backend reports them; Glance never estimates, so a missing figure shows as n/a.

See it with glance usage (--days N, --json), glance status, or the tray's "AI usage" menu. With monthly_cost_limit_usd set, Glance refuses new AI calls once the reported cost reaches it (local grammar keeps working) and starts again on the 1st. Only backends that report a cost, such as claude, are limited.

How it works
flowchart LR
    app["Any app<br/>(text field)"] -->|AT-SPI| cap["glance-capture"]
    cap -->|"privacy gate,<br/>unix socket"| d["glanced"]
    d <-->|LSP over pipes| h["harper-ls<br/>(local grammar)"]
    d <-.->|"redacted text,<br/>optional"| ai["AI backend<br/>(CLI or API)"]
    d --> ov["GTK overlay<br/>(strip and panel)"]
    ov -->|Alt+Enter| d
    d -->|apply| cap
    cap -->|XTEST write-back| app
Loading
  • glance-capture follows the focused field over AT-SPI. A privacy gate decides from the field's metadata alone (app, window, URL, role), never its text, whether the text may leave capture.
  • glanced is the daemon: scheduling, Harper, the overlay, hotkeys and the tray in one loop. It restarts glance-capture and harper-ls if they die.
  • Write-back types one edit into the field (or pastes it), checks it landed, and undoes it if not.
  • GNOME Wayland: Wayland blocks overlays, global shortcuts and typing into other apps, so a small GNOME Shell extension (glance@btocode.github.io) does just those parts. The installer enables it; you log out and in once.
  • macOS: the same design through the Accessibility API, with a LaunchAgent. The installer needs no sudo, Homebrew or Xcode.
Status and known limits

Glance is early software, tested by automated tests (a private Xvfb on X11, a headless GNOME Shell on Wayland, a test app on a Mac), not yet in daily use on real desktops.

  • Not run yet: the live desktop checklist (real Slack, Discord, Gmail, claude.ai, ChatGPT) and the suspend, lock and monitor-hotplug check.
  • Firefox write-back is not matrix-tested. Flatpak and snap apps are not captured.
  • Codex, Gemini and OpenCode are experimental; Gemini and OpenCode never returned a verified reply in testing.
  • Tested on Ubuntu 22.04 / Python 3.10 (X11) and Ubuntu 26.04 / Python 3.14 with GNOME Shell 50 (Wayland). x86_64 only. GNOME 46 to 49 are supported but untested.
  • macOS: tested on macOS 15 (Apple silicon) with a test app only. Safari, Chrome, Arc and Electron apps are expected to work but are untested. Safari private windows cannot be detected. The Accessibility grant is on the Python interpreter, so a Python update may ask again. The Ctrl+G editor window and the "Connect an AI" window are not ported yet; use glance backend.
  • Details: docs/acceptance/report.md.

Contributing

Bug reports, fixes and new backends are welcome. Start with CONTRIBUTING.md. Please follow the Code of Conduct.

License

MIT © 2026 Btocode

About

Write better in every app: grammar, tone, translation and answers right where you type. An open-source writing assistant for Linux (X11, GNOME Wayland) and macOS. Bring your own AI, or run fully offline.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages