onekeymap-cli

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: MIT

README ΒΆ

OneKeymap CLI logo

OneKeymap CLI

Go VersionLicenseRelease


Sync your keyboard shortcuts across all your code editors.

OneKeymap CLI is a powerful command-line tool that lets you import, export, and synchronize keyboard shortcuts between VSCode, IntelliJ IDEA, Zed, Helix, and more. Stop reconfiguring keybindings every time you switch editorsβ€”maintain one universal keymap and deploy it everywhere.

asciicast


πŸš€ Quick Start

❗️Currently the OneKeymap CLI only supports macOS. Windows and Linux support is coming soon.

Installation

macOS (Homebrew):

brew install xinnjie/homebrew-onekeymap/onekeymap-cli

Go Install:

go install github.com/xinnjie/onekeymap-cli/cmd/onekeymap-cli@latest

From Release: Download the latest binary from GitHub Releases.

Basic Usage

Import from editors interactively:

onekeymap-cli import

Export to editors interactively:

onekeymap-cli export

Useful Commands

The following commands help you get the most from the OneKeymap CLI:

  • onekeymap-cli help Quick summary of all subcommands and available flags.
  • onekeymap-cli import Convert editor-specific shortcuts into the universal onekeymap.json format.
  • onekeymap-cli export Generate editor keymap files from your universal keymap.
  • onekeymap-cli migrate Chain import and export in one step to move between editors.
  • onekeymap-cli view Inspect the actions and bindings stored in an existing universal keymap.

You can append -h or --help to any subcommand for detailed flag descriptions and examples.


Configuration

OneKeymap can be configured via a config file at ~/.config/onekeymap/config.yaml:

# Default path for universal keymap
onekeymap: ~/.config/onekeymap/keymap.json

# Editor-specific config paths (optional, auto-detected by default)
editors:
  vscode:
    keymap_path: ~/Library/Application Support/Code/User/keybindings.json
  zed:
    keymap_path: ~/.config/zed/keymap.json
  intellij:
    keymap_path: ~/Library/Application Support/JetBrains/IntelliJIdea2024.1/keymaps/custom.xml

🧩 Supported Editors

Editor Import Export Notes
VSCode βœ… βœ… Full support including when clauses
Zed βœ… βœ… Full support including contexts
IntelliJ IDEA βœ… βœ… Supports XML keymap format; shortcut coverage is still limited (see Action Support Matrix)
Helix ❌ βœ… TOML configuration support; shortcut coverage is still limited (see Action Support Matrix)
Vim/Neovim 🚧 🚧 Planned

Contributing

Contributions are welcome! Check out the Contributing Guide for more details on how to get started. Here are some ways you can help:

  • Add Editor Support: Implement a new editor plugin
  • Improve Mappings: Enhance the action mapping configuration
  • Report Bugs: Open an issue with reproduction steps
  • Documentation: Improve docs and examples

Support


How It Works

OneKeymap uses a universal keymap format that represents keyboard shortcuts in an editor-agnostic way. Here's the workflow:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   VSCode    │──┐
β”‚  Keybindingsβ”‚  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                 β”‚  Import
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    ↓
β”‚  IntelliJ   │──┼──────────────┐
β”‚   Keymap    β”‚  β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚    β”‚  Universal Keymap  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚   (onekeymap.json) β”‚
β”‚     Zed     β”‚β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚   Keymap    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       Export    ↓
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚  Any Supported Editor β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Universal Keymap Format

Your keymap is stored in a clean, human-readable JSON format:

{
  "keymaps": [
    {
      "action": "actions.edit.copy",
      "keys": "ctrl+c"
    },
    {
      "action": "actions.view.showCommandPalette",
      "keys": "ctrl+shift+p"
    },
    {
      "action": "actions.editor.quickFix",
      "keys": "ctrl+."
    }
  ]
}

Action Mappings

OneKeymap maintains a comprehensive mapping that translates between editor-specific commands and universal actions. For example:

  • actions.edit.copy maps to:
    • VSCode: editor.action.clipboardCopyAction
    • IntelliJ: $Copy
    • Zed: editor::Copy

This mapping layer handles context-specific behaviors, stateful toggles, and editor quirks automatically.


✨ Companion App: OneKeymap GUI

Prefer a polished interface? Take a look at OneKeymap.appβ€”a paid GUI companion built on top of the CLI. onekeymap-cli will always remain free and open; the app is simply an optional bonus for those who enjoy visual workflows.


Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL