Support adding custom editors in "Open In" menu

Open 💬 18 comments Opened Feb 2, 2026 by frederik-uni
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Open in seems to be limited to some defaults and cant be extended. I use alacritty & zed and both aren't options, which aren't that popular, but would be nice if it would be possible to add custom options(icon+command)

Additional information

_No response_

View original on GitHub ↗

18 Comments

etraut-openai contributor · 5 months ago

Can you provide more context? I'm not sure which Codex program you're using (app, web, CLI, extension) or what you mean by "open in".

etraut-openai contributor · 5 months ago

Ah, I figured out what you mean. I presume you're using the desktop app on macOS.

frederik-uni · 5 months ago

my bad.

yes thats what I mean

tolgaerdonmez · 5 months ago

is there any developments on this or workarounds? I would love to have it open alacritty + neovim

gercograndia · 5 months ago

Yeah, would like to use Zed editor!

JonathanAquino-NextRoll · 5 months ago

I would love to be able to use Typora to open markdown files. Typora is my default app for opening .md files - maybe provide a Default Editor option that will open a file using the OS default?

soegaard · 4 months ago

I am closing
https://github.com/openai/codex/issues/12933#issuecomment-3968604657
which asks the same - a way to add editors or previewers.

I my case I can't find Emacs on the list.

huylg · 4 months ago

Adding support for Alacritty would be great.

ionuttiplea · 4 months ago

Adding support for opening files in vim/neovim would be great as well, though I know it might be niche so it is what it is :/

mantoni · 4 months ago

On macOS, supporting the standard "open with…" functionality would already solve this for most users. Anyone else with special needs can ask Codex to write an Apple Script for their use-case. My manual workaround: Right click on a link, select "copy path", open the terminal and type open + command+v.

rahulxsomething · 3 months ago

Workaround: Use any app as Codex's "Default open destination" on macOS

Codex uses a hardcoded allowlist of known editors for its "Default open destination" dropdown. Custom .app bundles don't appear even when properly registered with Launch Services. This workaround creates a tiny AppleScript app that masquerades as a recognized editor (e.g. TextMate) but routes every file to its real macOS default handler — so files open in whatever app macOS would normally use.

This also works if you want files to always open in a specific app that is NOT already the default macOS handler (like Zed, Alacritty+Neovim, IntelliJ LightEdit, etc.) — just modify the AppleScript in the script below.

Install

Save this as install.sh, run chmod +x install.sh, then ./install.sh:

#!/bin/zsh
set -eo pipefail

APP="/Applications/TextMate.app"

# 1. Create the AppleScript
SCRIPT=$(mktemp /tmp/open-default-XXXXX.applescript)
cat > "$SCRIPT" << 'AS'
on open theFiles
  repeat with aFile in theFiles
    do shell script "open " & quoted form of POSIX path of aFile
  end repeat
end open
AS

# 2. Compile into an app bundle
osacompile -o "$APP" "$SCRIPT"
rm "$SCRIPT"

# 3. Write the Info.plist (must declare Editor role + droplet executable)
cat > "$APP/Contents/Info.plist" << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundleName</key>
  <string>TextMate</string>
  <key>CFBundleIdentifier</key>
  <string>com.macromates.TextMate</string>
  <key>CFBundleVersion</key>
  <string>1.0</string>
  <key>CFBundleShortVersionString</key>
  <string>1.0</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>CFBundleSignature</key>
  <string>????</string>
  <key>CFBundleExecutable</key>
  <string>droplet</string>
  <key>CFBundleIconFile</key>
  <string>droplet</string>
  <key>CFBundleDocumentTypes</key>
  <array>
    <dict>
      <key>CFBundleTypeName</key>
      <string>Plain Text</string>
      <key>CFBundleTypeRole</key>
      <string>Editor</string>
      <key>LSItemContentTypes</key>
      <array>
        <string>public.plain-text</string>
        <string>public.utf8-plain-text</string>
        <string>public.source-code</string>
        <string>public.script</string>
        <string>public.shell-script</string>
        <string>public.python-script</string>
        <string>public.ruby-script</string>
        <string>public.perl-script</string>
        <string>public.c-source</string>
        <string>public.c-header</string>
        <string>public.c-plus-plus-source</string>
        <string>public.objective-c-source</string>
        <string>public.swift-source</string>
        <string>public.assembly-source</string>
        <string>public.json</string>
        <string>public.xml</string>
        <string>public.yaml</string>
        <string>com.apple.property-list</string>
        <string>com.netscape.javascript-source</string>
        <string>public.css</string>
        <string>public.html</string>
      </array>
    </dict>
  </array>
  <key>NSAppleEventsUsageDescription</key>
  <string>This app routes files to their default macOS handler.</string>
  <key>LSUIElement</key>
  <true/>
</dict>
</plist>
PLIST

# 4. Register with Launch Services
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f "$APP"

echo "Installed: $APP"

Then open Codex → Settings → Default open destination → select TextMate.

Files will now route through the fake TextMate to their real default macOS handler.

Customization

Want files to open in a specific app instead? Change the do shell script "open " line in the script:

-- Zed:
do shell script "/usr/local/bin/zed " & quoted form of POSIX path of aFile

-- Neovim via Alacritty:
do shell script "open -a Alacritty -- nvim " & quoted form of POSIX path of aFile

-- IntelliJ LightEdit:
do shell script "/usr/local/bin/idea -e " & quoted form of POSIX path of aFile

Already have TextMate installed? Change APP, CFBundleName, and CFBundleIdentifier to a different editor from Codex's allowlist that you don't use:

| Editor | App name | Bundle ID |
|--------------|---------------------|------------------------------|
| TextMate | TextMate.app | com.macromates.TextMate |
| BBEdit | BBEdit.app | com.barebones.bbedit |
| Sublime Text | Sublime Text.app | com.sublimetext.4 |

Amigov-Ai · 3 months ago

Additional macOS desktop case for this issue.

Environment:

  • Codex Desktop on macOS 26.2
  • Codex version 26.409.20454
  • Markdown files (.md) are associated with CotEditor in Finder / Launch Services

Observed behavior:

  • In Finder, opening the same .md file uses CotEditor as expected.
  • In Codex Desktop, the Open with menu does not respect the macOS default app.
  • The menu only shows a fixed list of integrations such as Cursor, Antigravity, Finder, and Terminal.
  • CotEditor does not appear there even though it is the system default handler for .md.

Expected behavior:

  • Codex should provide an Open with default app action that uses the standard macOS default handler for the file type.
  • For Markdown specifically, this should open the file in CotEditor on this machine.

Current workaround:

  • Use Open in Finder, then open the file from Finder.

This feels less like a custom-editor request and more like Codex Desktop bypassing the OS default-open behavior for files.

xrmzju · 3 months ago

Qoder is another strong use case for this feature.

I use Codex App together with Qoder, and having Qoder available in the Open In menu would make file navigation much faster during a session. A configurable editor entry would cover this cleanly: pick a label/icon and map it to a custom command or URL scheme, with file path and line/column placeholders when available.

That would let users wire up editors beyond the built-in list, including Qoder, team-specific wrappers, and internal IDE distributions.

ohmyangboy · 2 months ago

Add Qoder pleace. i had to switch between Codex and Qoder now.
it would be great to support this!

NightGlowww · 1 month ago

Adding another concrete macOS Desktop case, specifically for Markdown + Typora.

Environment:

  • Codex Desktop: 26.609.41114
  • macOS: 27.0 (26A5353q)
  • Typora installed at /Applications/Typora.app
  • Typora bundle id: abnerworks.Typora
  • .md / .markdown are registered with Launch Services to open in Typora

Observed behavior:

  • In a Codex chat response, local Markdown attachments show an Open with menu.
  • The menu has a Default app item, plus a second-level fixed list such as VS Code, Zed, Finder, Terminal, and Ghostty.
  • Typora is not shown in that list, even though it is installed and registered as the macOS default handler for Markdown files.
  • This is confusing because the UI looks like a user-extensible “Open with” list, but it appears to be a hardcoded allowlist. The user naturally asks how to “add Typora” to Codex.

Expected behavior:

  • Either expose a real custom open-destination setting where users can add apps/commands such as Typora, Obsidian, Emacs, Alacritty+Neovim, etc.; or
  • make Default app more explicit in the file menu, e.g. Open with system default app, and ensure it reliably uses macOS Launch Services for the clicked file type.

Why this matters:

  • Codex is increasingly used for Markdown-heavy work: documentation, courseware, reports, checklists, and generated handbooks.
  • For Markdown, users often want a preview/editing app such as Typora rather than a code editor.
  • The current menu creates friction because users see editor shortcuts but cannot add their own preferred app, while the Default app behavior is not obvious enough to discover confidently.

Current workaround:

  • Set Typora as the macOS default handler for .md files and use Codex's Default app item, or open the file in Finder first.

A first-class custom destination, or clearer OS-default wording, would make this much less confusing.

soegaard · 1 month ago

The markdown previewer Marked is also pretty popular.

bolinfest collaborator · 28 days ago

As of at least Version 26.616.51431 • Released Jun 20, 2026, you can now add something like the following to config.toml to add support for custom editors:

[desktop.custom_file_handlers.apple_textedit]
label = "TextEdit"
# Exported from /System/Applications/TextEdit.app/Contents/Resources/AppIcon.icns
icon = "file:///Users/mbolin/Downloads/TextEditAppIcon.png"
command = "/usr/bin/open"
args = ["-a", "/System/Applications/TextEdit.app"]

# https://lap.dev/lapce/
[desktop.custom_file_handlers.lapce]
label = "Lapce"
# Exported from /Applications/Lapce.app/Contents/Resources/lapce.icns
icon = "file:///Users/mbolin/Downloads/Lapce.png"
command = "/usr/local/bin/lapce"

[desktop.custom_file_handlers.fake_editor]
label = "Fake Editor"
icon = "file:///Users/mbolin/Downloads/FakeEditor.png"
command = "/Users/mbolin/bin/fake_editor"
input = "json_argument"

The full custom file handler API is:

  • [desktop.custom_file_handlers.<id>]: file handler id suffix. Must start with an alphanumeric character and may contain alphanumeric characters, ., _, or -; Codex exposes it as custom:<id>.
  • label: required display name.
  • icon: required icon source. This can be a bundled asset such as apps/vscode.png or /apps/vscode.png, a base64 data:image/... URL, a file: URI, or an absolute local image path. Unsupported icon sources fall back to the default VS Code icon.
  • command: required executable path or command name to detect and launch.
  • args: optional string array prepended before Codex's input. Defaults to [].
  • input: optional input mode. Defaults to path, which appends the opened path after args. json_argument appends a JSON argument with target, path, appPath, and location. json_stdin writes JSON to stdin and additionally includes hostConfig, remoteWorkspaceRoot, and remotePath.
  • supports_ssh: optional boolean. Defaults to false; set to true for custom handlers that can open SSH workspaces.
mantoni · 26 days ago

For anyone wanting to try this with Neovim + tmux, I published my custom handler code here:

https://github.com/mantoni/codex-nvim-tmux-open

It uses desktop.custom_file_handlers.nvim with a custom icon and command, supports Codex args, and handles both file targets and directory/worktree targets.