Skip to content

About

Definition extension for Windows Command Palette - Look up word definitions, pronunciations, and synonyms

Resources

Stars

9 stars

Watchers

0 watching

Forks

Repository files navigation

Definition for Command Palette

Definition for Command Palette

Instant dictionary lookups right from PowerToys Command Palette

Latest Release Downloads License Microsoft Store


Get it from Microsoft Store

Definition lookup for 'hello'


Overview

Definition is a PowerToys Command Palette extension that gives you instant access to word definitions, phonetics, synonyms, antonyms, and usage examples β€” without ever leaving your keyboard.

Type a word, get results. That simple.

What's New

v1.0.3

  • πŸ’‘ Predictive Spelling Lookup β€” when no definitions are found, the extension now shows "Did you mean?" suggestions ranked by fuzzy similarity. Click a suggestion to instantly look up that word.
  • Multi-source suggestion engine: Datamuse API (English & Spanish), Wiktionary opensearch (12+ languages), and local Levenshtein fallback (offline).
  • New Enable Spelling Suggestions toggle in Settings (on by default).
  • Levenshtein distance scoring with proportional thresholds and prefix-match bonus.
  • Localized "Did you mean?" strings for en-US and fr-FR.

v1.0.2

  • Expanded dictionary experience with support for: English, French, Chinese and Ukrainian.
  • Improved lookup quality with cleaner grouping by part of speech, better examples, and faster repeated searches via in-memory caching.
  • Better CI/CD reliability for Store publishing and release packaging.

v1.0.1

  • Initial release with English dictionary lookup via Free Dictionary API.
  • Phonetics, synonyms, antonyms, and usage examples.
  • Copy to clipboard and Wiktionary integration.

Features

Feature Description
Instant Definitions Definitions from the Free Dictionary API grouped by part of speech
4 Languages English, French, Chinese (CC-CEDICT offline), and Ukrainian (Wiktionary + goroh.pp.ua)
Phonetics IPA transcriptions displayed alongside each word
Synonyms & Antonyms Related words listed per part of speech
Usage Examples Real-world example sentences
Predictive Spelling "Did you mean?" suggestions when no definitions found β€” powered by Datamuse API, Wiktionary opensearch, and Levenshtein fuzzy matching
Copy to Clipboard Click any result to copy
Wiktionary Integration Right-click context menu to open in Wiktionary
Configurable Settings for language, result count, display options, and spelling suggestions
Smart Caching In-memory cache for instant repeat lookups
Debounced Search 300ms debounce to minimize API calls while typing
Offline Chinese CC-CEDICT database embedded β€” Chinese lookups work without internet
Script Auto-Detection Automatically detects Latin, Cyrillic, CJK, or mixed script to route to the right provider

How Spelling Suggestions Work

When you type a word that isn't found in any dictionary, the extension queries three suggestion sources in parallel:

  1. Datamuse API β€” fetches phonetically/orthographically similar words (English & Spanish only)
  2. Wiktionary opensearch β€” prefix-based title search across 12+ language editions
  3. Local word lists β€” built-in common English & Ukrainian words ranked by Levenshtein distance (works offline)

Results are merged, deduplicated, and ranked using a fuzzy similarity score (0–1) based on Levenshtein edit distance with a prefix-match bonus. The distance threshold scales proportionally with word length, so small typos in longer words aren't filtered out.

User types: "recieve"
β†’ No dictionary match found
β†’ Suggestions: receive (close match), relieve, recipe, ...
β†’ User clicks "receive" β†’ full definition displayed instantly

Toggle suggestions on/off in Settings β†’ Enable Spelling Suggestions (on by default).

Screenshots

Definition lookup

Multiple parts of speech

Installation

Prerequisites

  • Windows 10 (build 19041+) or Windows 11
  • Microsoft PowerToys v0.70.0+ with Command Palette enabled

Option 1 β€” WinGet (Recommended)

winget install "Definition for Command Palette"

Option 2 β€” Microsoft Store

Microsoft Store

Option 3 β€” Manual Download

Download the latest .msixbundle from Releases, then:

This project uses SignPath Foundation for code signing.

Add-AppPackage -Path DefinitionForCommandPalette.msixbundle

After installing, restart PowerToys for the extension to appear.

Updating

winget upgrade "Definition for Command Palette"

Uninstalling

winget uninstall "Definition for Command Palette"

Or remove via Settings β†’ Apps β†’ Installed apps.

Usage

  1. Open Command Palette (Win + Ctrl + T by default)
  2. Select Definition
  3. Type any word
  4. Browse definitions, examples, synonyms, and antonyms
  5. Press Enter to copy β€” or right-click for more actions
  6. If no definitions are found, click a "Did you mean?" suggestion to look up that word instead

Building from Source

Requirements

  • .NET 9.0 SDK
  • Visual Studio 2022 with:
    • .NET desktop development workload
    • Windows App SDK / WinUI 3 tooling
  • Developer Mode enabled (Settings β†’ Update & Security β†’ For developers)

Build & Deploy

git clone https://github.com/ruslanlap/CmdPal-Definition.git
cd CmdPal-Definition

Visual Studio: Open CmdPal-Definition.sln, select your platform (x64 / ARM64), right-click the project β†’ Deploy.

Command line:

# x64
dotnet build CmdPal-Definition.sln -c Release -p:Platform=x64

# ARM64
dotnet build CmdPal-Definition.sln -c Release -p:Platform=ARM64

Then install the generated .msix from the build output:

Add-AppPackage -Path "path\to\DefinitionExtension.msix"

Restart PowerToys after installation.

Architecture

CmdPal-Definition/
β”œβ”€β”€ CmdPal-Definition.sln
└── DefinitionExtension/
    β”œβ”€β”€ DefinitionExtension.cs              # IExtension entry point (COM server)
    β”œβ”€β”€ DefinitionCommandsProvider.cs       # CommandProvider β€” top-level commands
    β”œβ”€β”€ Program.cs                          # Main entry point
    β”œβ”€β”€ Package.appxmanifest                # MSIX manifest with CmdPal registration
    β”œβ”€β”€ Pages/
    β”‚   β”œβ”€β”€ DefinitionPage.cs               # DynamicListPage β€” search UI + suggestion flow
    β”‚   └── DefinitionListItem.cs           # ListItem for each result (definitions, suggestions)
    β”œβ”€β”€ Helpers/
    β”‚   β”œβ”€β”€ DictionaryService.cs            # Multi-provider lookup + caching layer
    β”‚   β”œβ”€β”€ SuggestionService.cs            # Predictive spelling (Datamuse + Wiktionary + local)
    β”‚   β”œβ”€β”€ FuzzyMatcher.cs                 # Levenshtein distance & similarity scoring
    β”‚   β”œβ”€β”€ SettingsManager.cs              # Settings UI via CmdPal settings API
    β”‚   β”œβ”€β”€ Models.cs                       # JSON data models (DictionaryEntry, DatamuseWord)
    β”‚   β”œβ”€β”€ ScriptDetector.cs               # Latin / Cyrillic / CJK / Mixed detection
    β”‚   β”œβ”€β”€ IDictionaryProvider.cs          # Provider interface
    β”‚   β”œβ”€β”€ EnglishDictionaryProvider.cs    # Free Dictionary API (en)
    β”‚   β”œβ”€β”€ FrenchDictionaryProvider.cs     # Collins + French Wiktionary (fr)
    β”‚   β”œβ”€β”€ UkrainianDictionaryProvider.cs  # Ukrainian Wiktionary + goroh.pp.ua (uk)
    β”‚   β”œβ”€β”€ ChineseDictionaryProvider.cs    # CC-CEDICT offline database (zh)
    β”‚   └── DefinitionExtensionHost.cs      # Extension host singleton
    β”œβ”€β”€ Strings/
    β”‚   β”œβ”€β”€ en-US/Resources.resw            # English localization
    β”‚   └── fr-FR/Resources.resw            # French localization
    β”œβ”€β”€ Resources/
    β”‚   └── cedict.txt.gz                   # Embedded CC-CEDICT Chinese dictionary
    └── Assets/                             # MSIX tile and logo assets

APIs & Data Sources

Source Type Languages Notes
Free Dictionary API Online English, French No API key required
Ukrainian Wiktionary Online Ukrainian Wikitext parsing
goroh.pp.ua Online Ukrainian Fallback for Wiktionary
Collins Dictionary Online French French-English
French Wiktionary Online French Fallback for Collins
CC-CEDICT Offline Chinese Embedded gzipped resource
Datamuse API Online English, Spanish Spelling suggestions
Wiktionary opensearch Online 12+ languages Spelling suggestions (prefix search)
Built-in word lists Offline English, Ukrainian Spelling suggestions (Levenshtein)

An internet connection is required for most lookups. Chinese lookups work offline via the embedded CC-CEDICT database.

Store Metadata in CI

The workflow .github/workflows/store-metadata.yml can update Microsoft Store listing metadata from:

store-metadata/metadata.json

If this file is missing, the workflow now skips metadata update steps instead of failing.

Use this file only when you intentionally want to update listing metadata through CI.

Troubleshooting

Problem Solution
Extension not visible Restart PowerToys. Verify MSIX is installed: Get-AppPackage *Definition*
Build errors Ensure .NET 9.0 SDK and Windows App SDK are installed
MSIX install fails Enable Developer Mode in Windows Settings
No results returned Check your internet connection (Chinese works offline)
No spelling suggestions Ensure Enable Spelling Suggestions is on in Settings

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT

About

Definition extension for Windows Command Palette - Look up word definitions, pronunciations, and synonyms

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages