21
10 Comments

ChatGPT can now read code directly from your computer
IH+ Subscribers Only

It can't edit it yet — but OpenAI is working on the capability.

ChatGPT can now read your code

OpenAI's ChatGPT can now read code directly from your computer using its desktop app.

You can link up the app to your integrated development environment or terminal to give the LLM context and reduce the need to copy and paste.

OpenAI launched a beta version of the capability on Thursday to Plus and Team customers using its Mac desktop app.

The update allows ChatGPT to "work with" editors VSCode, XCode and TextEdit, as well as terminals iTerm and Terminal.

It can read everything in your open editor panes and in the foremost window of your IDE (up to a limit) and the last 200 lines of open panes on your terminal (again, up to a limit).

When used with an editor, it will focus on any text you select, but still take the rest of an open pane as context. In terminals, ChatGPT will focus on selected text and some of the text around it.

ChatGPT desktop suggests updates to code on a Mac

The integration should improve its suggestions and streamline the user experience significantly. No longer will users need to explain how their codebase is set up and paste multiple scripts as part of their queries.

But without writing abilities, ChatGPT still lags behind AI code editors like Cursor.

The company is working to introduce these capabilities, according to an X video featuring OpenAI Head of Develper Experience Romain Huet.

In fact, rumor has it the firm will release computer-using AI agents by January.

Eventually, the company wants you to be able to direct ChatGPT to code with simple voice commands.

How to use ChatGPT's code-reading capabilities

Selecting apps to link up to

If you open ChatGPT Desktop on a Mac, you should be able to see a new icon next to the 'Search the web' function.

Click on this square and arrow icon and you'll get a list of code editors and terminals it's capable of linking to.

Once you've enabled a connection to the app you want to use, load that app alongside ChatGPT.

You can enter queries into the ChatGPT interface as you normally would, and highlight any specific pieces of code you want it to focus on.

ChatGPT will try to answer your queries, sharing code suggestions in a copyable format.

You'll still need to paste any suggestions you want to try out in your IDE or terminal yourself.

Will ChatGPT store my codebase?

Like other content you paste into the ChatGPT interface, code you let LLM "work with" will be stored in your chat history.

It may be used to train OpenAI's models, unless you toggle the "Improve the model for everyone" setting off in your account.

Similarly, if you use temporary chats, these won't be used for training (nor will they be saved in your account history).

Who has access to the feature?

For now, the new ChatGPT features are only available on Apple Macs — and recent Macs at that. The desktop app itself won't run on Macs without at least a MacOS 14+ operating system and an M1+ processor.

Indie Hackers has asked OpenAI if it will roll out access to older devices.

In the meantime, the company is working to expand the new feature to ChatGPT on Windows computers.

Iff you're a Plus or Team subscriber with a recent Mac, you should be able to start using the new capabilities right away. If you're on an education or enterprise plan, you'll have to wait a few weeks.

Indie Hackers Newsletter: Subscribe to get the latest stories, trends, and insights for indie hackers in your inbox 3x/week.

Photo of Katie Hignett Katie Hignett

Katie is a journalist for Indie Hackers who specializes in tech, startups, exclusive investigations, and breaking news. She's written for Forbes, Newsweek, and more. She's also an indie hacker herself, working on EasyFOI.

  1. 4

    This is strange to me, because (and correct me if I'm wrong here) aren't they investors in the company behind Cursor? And yet they apparently have this long-term roadmap to compete with Cursor 🤔

  2. 2

    I always wonder how did chatgpt or other ai tools prevent my secret infos like private keys or passwords from leaking? After all it knows all about my code and configurations.

  3. 1

    This post highlights an exciting evolution in AI's integration with local systems, particularly ChatGPT's ability to read code directly from your computer. While it enhances coding efficiency and debugging, privacy concerns could arise. For a cost-effective alternative, GPTJP offers free access to ChatGPT, ensuring accessibility without compromising value.

  4. 1

    As of now, ChatGPT cannot read code directly from your computer. It can assist with code-related queries by interpreting and providing help based on the code you share with it, but direct access to your computer is not possible.

  5. 1

    2 things about this feels a bit sus.

    1. Why not just flip the interface towards IDE instead of via the CahtGPT interface?
    2. How can we trust that they only look at what we tell them to look at?

  6. 1

    Katie Hignett's article highlights the ability of ChatGPT to read and interact with code directly from your computer. By providing instant insight, debugging assistance, and enhanced collaboration, this feature streamlines coding workflows. Developers will find it to be a game-changer as it simplifies troubleshooting and learning processes. Although the feature raises security and privacy concerns, it underscores the importance of using artificial intelligence responsibly. This is a promising step that combines convenience with caution.

  7. 1

    Well, I think we can all agree that building products just got a lot faster....

  8. 1

    I admire how you explain complex topics! On a similar note, EchoAPI has been an incredible addition to my VS Code setup for API testing.

  9. 1

    finally been waiting for this change

  10. 1

    Yes she is right

Create a free account
to read this article.

Already have an account? Sign in.