Skip to content

yuler/typo

Repository files navigation

typo

Alpha: 内测中
English | 简体中文

An AI-powered desktop tool that refines your selected text with smart suggestions and corrections.

Download

Screenshots

screen.mp4

Construct

.
├── .agents/skills/      # Reusable skills for AI agents
├── .github/workflows/  # CI pipelines
├── apps/               # Client-facing apps
│   ├── desktop/       # Tauri + Vue 3 (main product)
│   └── www/           # Astro (marketing / SEO)
├── packages/          # Shared code across apps
│   ├── languages/     # i18n utilities and translation bundles
│   └── utils/         # Shared helpers and constants
├── scripts/           # Repo-wide automation scripts
├── package.json      # Workspaces and top-level scripts
└── README.md

Setup

Follow the setup skill to install Node.js (from .nvmrc), pnpm (via Corepack, pinned in package.json), workspace dependencies, and the Rust toolchain for the Tauri desktop app.

/setup # run this skill/command in AI coding agent

Run the desktop app

pnpm desktop:dev

Usage

  1. Select any text you want to improve.
  2. Press Ctrl/Cmd + Shift + X to activate the application.
  3. Wait for the AI response and let it replace the selected content automatically.

Authentication

typo uses the OAuth 2.0 Device Authorization Grant (RFC 8628) flow for desktop login.

  1. Initiate: Click Login in the desktop app. It will display a user code and open your default browser.
  2. Authorize: Log in to your account in the browser and enter/confirm the code.
  3. Success: The desktop app will automatically detect the approval and establish a secure session.

How it works

  1. Capture: Gets the currently selected text.
  2. AI processing: Sends it to AI with a custom prompt (configurable in settings).
  3. Replacement: Copies the AI's response to the clipboard, then pastes it at the current cursor position (using the clipboard helps avoid input method issues).

Features

  • Multi-Model Support: Works with DeepSeek and local Ollama models.
  • Global Hotkeys: Quick activation with Ctrl/Cmd + Shift + X.
  • Intelligent Pasting: Uses clipboard-based replacement for maximum compatibility.
  • Customizable: Tailor the AI behavior via system prompts.

Prompt shortcuts

You can define up to 5 custom prompt shortcuts in Settings -> Prompts.

  • Each shortcut has a key (for example /tr:zh or /prompt) and an instruction value.
  • Trigger it from selected text with one of these forms:
    • Leading: first line starts with /command
    • Trailing: last line starts with /command
  • Template placeholders in shortcut values:
    • {{args}}: arguments after the command on the same line, e.g. /prompt xxx
    • {{text}}: cleaned selected text after command line is removed

Example:

/prompt Translate to Japanese in polite style

你好啊

FAQ

macOS

  • Run: xattr -cr /Applications/typo.app
  • Enable Accessibility Permission for the app in System Settings.

Linux Installation (AppImage)

For installation and auto-updates, we recommend using the AppImage version:

# Move the downloaded AppImage to a permanent location
mv ~/Downloads/typo_*.AppImage ~/Applications/typo.appimage
# Make it executable
chmod +x ~/Applications/typo.appimage

Create a desktop entry for easy access:

sudo vim /usr/share/applications/typo.desktop

Add the following content (replace <$USER> with your username):

[Desktop Entry]
Name=Typo
Comment=AI-powered text improvement tool
Exec=env GDK_BACKEND=x11 /home/<$USER>/Applications/typo.appimage --no-sandbox
Icon=typo
Type=Application
Categories=Utility;TextEditor;
Terminal=false

Download the icon:

sudo curl -L -o /usr/share/icons/hicolor/256x256/apps/typo.png https://raw.githubusercontent.com/yuler/typo/main/resources/logo.png

Linux Wayland Compatibility

Wayland restricts global hotkey listeners for security. Use a System Shortcut instead of the app-level internal hotkey.

1. Add a Custom Shortcut

  1. Open Settings -> Keyboard -> Custom Shortcuts.
  2. Add a command: typo --selection (or the full path to your AppImage).
  3. Set keys to: Ctrl + Shift + X.

2. Enhanced Clipboard Support (Recommended)

To ensure reliable selection capture and pasting on Wayland, we highly recommend using ydotool for keyboard simulation:

  • ydotool: Fast keyboard simulation but requires manual setup.

    Setup ydotool

    Add your user to group input

    sudo usermod -aG input $USER

    Add udev rule for uinput

    echo '## ydotoold fix

KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput" ' | sudo tee /etc/udev/rules.d/80-uinput.rules > /dev/null

Autostart ydotool daemon Create ~/.config/autostart/ydotoold.desktop:

[Desktop Entry]
Type=Application
Name=ydotool daemon
Exec=/usr/bin/ydotoold

3. XWayland Workaround (Optional)

If selection capture still fails in specific apps (like some Electron apps), running them in X11 mode can help:

# Force VS Code to use X11
code --ozone-platform=x11

4. System Tray Support

On Wayland/GNOME environments (like Ubuntu 24.04 or Omakub), the system tray icon might be hidden by default.

We recommend using the Status Tray GNOME extension to enable system tray support.

5. Autostart Configuration and Testing

You can verify if autostart is correctly configured:

  • macOS: System Settings -> General -> Login Items.
  • Linux: Check if ~/.config/autostart/typo.desktop exists.
  • Windows: Task Manager -> Startup.

Ollama

Release flow

  • pnpm bump to version and tag the release.
  • pnpm release:notes to update the release notes in latest.json.
  • pnpm releases:pull to packages/releases, edit the data, then pnpm releases:push to update the marketing website.
  • pnpm www:deploy to deploy the www website

About

An AI-powered desktop tool that refines your selected text with smart suggestions and corrections.

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors