Model or dataset
yaroslavyaroslav/OpenAI-sublime-text avatar
yaroslavyaroslav/OpenAI-sublime-text

OpenAI Sublime Text plugin: a chat assistant inside the editor

First class Sublime Text AI assistant with gpt-5, Opus 4.6, Gemini 3 and ollama support!

468 stars43 forksPythonMIT

At a glance

What is it?
The OpenAI Sublime Text plugin puts a multi-provider chat assistant into Sublime Text 4205 or newer, with inline phantoms, per-project histories and file context. It is a strong fit if you already live in Sublime and want model choice, and a poor fit if you need a stable API surface or a Python 3.8 host.
Who is it for?
Adopt it if you are on Sublime Text build 4205 or newer, you want one assistant panel that can talk to OpenAI, Anthropic, Gemini, llama.cpp or ollama, and you are comfortable configuring assistants through openAI.sublime-settings. Do not adopt it if you are pinned to Sublime Text 4050 through 4204 and expect current features, or if you need a documented public API that other tooling can call.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 17 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What the OpenAI Sublime Text plugin solves, and for whom

Sublime Text has no built-in model integration. If you want to ask a model about the function under your cursor, or paste a compiler error and get an explanation without leaving the editor, you normally alt-tab to a browser or a separate chat client. This plugin closes that gap by shipping the assistant as a Sublime package: commands in the command palette, an output panel, inline overlays, and a settings file that describes each assistant.

The audience is narrower than the tagline suggests. The README pitches "Cursor level of AI assistance for Sublime Text", but the requirements are strict: Sublime Text build 4205 or newer, because the plugin host is Python 3.14. Anyone on an older build is not merely missing features, they are on a different release line. The README states that Package Control keeps Sublime Text builds 4050 through 4204 on the frozen 6.1.0, Python 3.8-compatible release. So the first question is not whether the plugin is good, it is which half of the user base you are in.

Provider choice is the other half of the pitch. It works with the OpenAI Responses API, Anthropic Claude, Google Gemini, and OpenAI-compatible endpoints such as a llama.cpp server or ollama. That matters for teams that cannot send source code to a hosted provider, since a local server keeps the request on your machine.

How the assistant, context and output modes fit together

The architecture visible in the repository is a Sublime plugin with a settings file, a set of commands, and a plugins directory. The unit of configuration is the assistant: it defines the model, API key, temperature and other parameters. You pick an assistant and an output mode through `OpenAI: Chat Model Select`, or reuse the last selection with `OpenAI: New Message`.

Output mode is a real design decision, not a cosmetic one. Inline `Phantom` mode renders the answer as an overlay in the current view, which keeps you in the file. Chat `View` mode renders into the output panel or a dedicated tab, and that is the only mode where the README claims Markdown syntax with code language highlighting. If you want highlighted code blocks, you are pushed toward the tab view.

Context flows in three ways. Selected text in the current file is included when you invoke a command. Whole files can be toggled into context from the command palette, the tab context menu or the sidebar context menu. And four dedicated commands append recent lines from Sublime's Build or LSP output panels, with the number of lines controlled by `build_output_limit` in `openAI.sublime-settings`. That last path is the most interesting one for debugging: the diagnostics are already in the editor, so the plugin does not need to parse them itself.

Streaming is server-sent events, and the status bar reports model name, mode and sent/received token counts. Chat history is stored per project when you set a `cache_prefix`, otherwise globally.

Installing the OpenAI Sublime Text plugin and sending a first prompt

Package Control is the shortest path. Install Package Control if it is not already present, then use the command palette to install the package by name: open the palette, type `Package Control: Install Package`, then type `OpenAI` and press Enter. The README notes that the editor may ask you to restart, and that you should do so if asked.

The git route is for people who want the repository in place. The README gives this command, run from the folder that `Preferences: Browse Packages` opens, and it clones the repository under the name `OpenAI completion`.

bash
git clone https://github.com/yaroslavyaroslav/OpenAI-sublime-text.git OpenAI\ completion

After cloning, the README says to open Sublime Text and let it install the dependencies, restart if it asks, then open it again and type `OpenAI` and press `Enter`. There is no documented build step.

Before the first prompt you need a provider. Either a remote API key, for example an OpenAI key, or a local llama.cpp or ollama server. Then open the command palette and run `OpenAI: Chat Model Select`. A panel appears where you choose the assistant and the output mode, inline `Phantom` or a chat `View`. Type your prompt in the multiline input, and submit with `Cmd+Enter` on macOS or `Ctrl+Enter` on Windows and Linux. `Esc` closes the panel and keeps the draft for next time. Pressing `Up` in the first row and first column browses older submitted prompts; `Down` walks back toward the draft you started with. Pasting with `Cmd+V` or `Ctrl+V` wraps clipboard text in a Markdown code block.

To keep a project's history separate from your global one, the README says to append this snippet to the project's settings file.

json
{
    "settings": {
        "ai_assistant": {
            "cache_prefix": "/absolute/path/to/project/"
        }
    }
}

To fold long chat sections automatically, the README gives `fold_sections`, matched case-insensitively and without the leading Markdown hashes.

json
{
    "fold_sections": ["Question", "Answer"]
}

Manual fold choices stay local to each chat view and survive later streaming updates, which is a small but thoughtful detail if you read long answers.

Where the OpenAI Sublime Text plugin gets in your way

The build requirement is the sharpest edge. Sublime Text 4205 or newer is not advice, it is the floor for the current line, and Package Control will hold builds 4050 to 4204 at 6.1.0. If your organisation standardises on an older Sublime build, you are not receiving fixes or features from 6.2.0 or 6.3.0, and there is no documented backport path.

The second limitation is documentation depth. The README covers commands, settings snippets and usage patterns well, but it does not document rollback, it does not describe what happens when a provider request fails mid-stream, and it does not spell out how context is truncated when you mark many large files. Those are the questions that decide whether a tool is dependable on a large repository, and the README is silent on them. Treat that silence as something to test yourself rather than an assumption that it is handled.

Third, the integration is editor-bound. There is no documented public API that other tools can call, so anything you build around it has to go through Sublime commands and settings. If your team wants the assistant available in CI, in a terminal, or in a second editor, this is the wrong tool, not a partial fit.

Finally, the provider matrix is a strength and a maintenance cost at the same time. Each provider has its own authentication and response format, and the plugin is the layer that absorbs those differences. When a provider changes its API, the fix lands here, and the release cadence is what determines how long you wait.

How this differs from editor-native assistants

The obvious comparison is Cursor, which the README itself invokes with "Cursor level of AI assistance for Sublime Text. I mean it." The difference is structural rather than a matter of feature counts. Cursor is an editor built around the model: the assistant can rely on the editor's own index of the codebase and on a fork that the vendor controls. This plugin is a guest inside Sublime Text. It can read the current selection, files you explicitly mark, and the text already present in the Build or LSP output panels. It cannot assume an index exists, because Sublime does not provide one.

That shapes daily use. With an indexed editor you ask broad questions and expect the tool to find the relevant files. Here you curate the context: select the region, toggle the files, or attach the build output. The payoff is that nothing leaves your machine unless you send it, and you can point the assistant at a local llama.cpp server or ollama instead of a hosted API. The cost is that context assembly is manual work you do on every request.

It is also worth separating this from terminal-based assistants that operate on a repository checkout. Those are scriptable and composable, and they fit automation. This plugin is interactive and tied to a GUI session. The two solve overlapping problems through different interfaces, and picking one does not make the other redundant.

Maintenance, releases and what the MIT licence means here

The repository is not archived, and the last push was on 2026-08-30. The release history shows 6.1.0 on 2026-08-02, 6.2.0 on 2026-08-16 and 6.3.0 on 2026-08-30, which is a roughly fortnightly cadence across that window. That is the observable signal; the README does not state a support policy, a deprecation schedule, or how long the 6.1.0 line will be kept for older Sublime builds.

Upgrade cost is dominated by the Python host split. Moving from the 6.1.0 line to 6.2.0 or later means moving to a Sublime build with the Python 3.14 plugin host, so the upgrade is an editor upgrade first and a plugin upgrade second. Anything in your own configuration that depends on the old host will need to be checked at the same time. The README does not document a rollback procedure, so if you manage Sublime versions centrally, plan the move rather than discovering it through Package Control.

The licence is MIT, which is permissive and places few obligations on how you redistribute or modify the package. It does not govern the model providers you connect to. Your API keys, the terms of the hosted services, and the data handling rules of whichever endpoint you point the assistant at sit outside the licence entirely, and a local llama.cpp or ollama server changes that calculus. This is a description of the licence text, not legal advice.

Editorial conclusion

Adopt it if you are on Sublime Text build 4205 or newer, you want one assistant panel that can talk to OpenAI, Anthropic, Gemini, llama.cpp or ollama, and you are comfortable configuring assistants through openAI.sublime-settings. Do not adopt it if you are pinned to Sublime Text 4050 through 4204 and expect current features, or if you need a documented public API that other tooling can call. Before installing, check your exact build number, because Package Control keeps builds 4050 to 4204 on the frozen 6.1.0 release line, and confirm which provider key or local server you intend to point the assistant at.

Frequently asked questions

Which Sublime Text build do I need for the OpenAI Sublime Text plugin?

The README states Sublime Text build 4205 or newer, because the plugin host is Python 3.14. Builds 4050 through 4204 are kept by Package Control on the frozen 6.1.0, Python 3.8-compatible release line.

Can the OpenAI Sublime Text plugin use models other than OpenAI's?

Yes. The README lists OpenAI Responses, Anthropic Claude, Google Gemini, and OpenAI-compatible APIs including a llama.cpp server and ollama. You choose the provider through the assistant configuration.

How do I keep a separate chat history for each project in the OpenAI Sublime Text plugin?

Append a settings block to the project's settings file with an ai_assistant object containing a cache_prefix pointing at the project path. Without it, chat history and assistant settings are global.

How do I send build or LSP errors to the OpenAI Sublime Text plugin?

Use one of the four commands that include panel output, such as OpenAI: New Message With Build Output or OpenAI: Chat Model Select With LSP Output. The number of lines taken from those panels is set by build_output_limit in openAI.sublime-settings.

Does the OpenAI Sublime Text plugin show answers inline or in a panel?

Both. Choosing the Phantom output mode renders the answer as an inline overlay in the current view, while the View mode renders it in the output panel or a dedicated tab. Markdown syntax with code language highlighting is documented for Chat mode only.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. yaroslavyaroslav/OpenAI-sublime-text on GitHub
Community notes

Community notes