Skip to content

Support adding custom editors in "Open In" menu #10428

Closed

Description

@frederik-uni

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

Activity

  1. added
    CLIIssues related to the Codex CLI
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    on Feb 2, 2026
  2. etraut-openai commented on Feb 2, 2026

    @etraut-openai
    Contributor

    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".

  3. added
    appIssues related to the Codex desktop app
    and removed
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    CLIIssues related to the Codex CLI
    on Feb 3, 2026
  4. etraut-openai commented on Feb 3, 2026

    @etraut-openai
    Contributor

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

  5. frederik-uni commented on Feb 3, 2026

    @frederik-uni
    Author

    my bad.

    yes thats what I mean

  6. changed the title [-]custom open in[/-] [+]Support adding custom editors in "Open In" menu[/+] on Feb 3, 2026
  7. tolgaerdonmez commented on Feb 4, 2026

    @tolgaerdonmez

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

  8. gercograndia commented on Feb 4, 2026

    @gercograndia

    Yeah, would like to use Zed editor!

  9. JonathanAquino-NextRoll commented on Feb 7, 2026

    @JonathanAquino-NextRoll

    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?

  10. 1 remaining item

  11. soegaard commented on Feb 26, 2026

    @soegaard

    I am closing
    #12933 (comment)
    which asks the same - a way to add editors or previewers.

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

  12. huylg commented on Feb 27, 2026

    @huylg

    Adding support for Alacritty would be great.

  13. ionuttiplea commented on Mar 9, 2026

    @ionuttiplea

    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 :/

  14. mantoni commented on Mar 9, 2026

    @mantoni

    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.

  15. rahulxsomething commented on Mar 26, 2026

    @rahulxsomething

    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
  16. Amigov-Ai commented on Apr 12, 2026

    @Amigov-Ai

    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.

  17. xrmzju commented on Apr 17, 2026

    @xrmzju

    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.

  18. ohmyangboy commented on Apr 28, 2026

    @ohmyangboy

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

  19. NightGlowww commented on Jun 15, 2026

    @NightGlowww

    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.

  20. soegaard commented on Jun 15, 2026

    @soegaard

    The markdown previewer Marked is also pretty popular.

  21. bolinfest commented on Jun 22, 2026

    @bolinfest
    Collaborator

    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.
  22. mantoni commented on Jun 24, 2026

    @mantoni

    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.

  23. bolinfest commented on Jul 22, 2026

    @bolinfest
    Collaborator

    Sorry I forgot about this, but this is now in the public docs:

    https://learn.chatgpt.com/docs/config-file/config-advanced#desktop

    Now you can point your friends to that page instead of this GitHub issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions