Skip to main content

ChatGPT Desktop: A Guide With VS Code and Terminal Examples

Learn how to optimize your coding workflow using the ChatGPT desktop app, with a focus on its integration with VS Code, the terminal, and Xcode.
Jan 7, 2025  · 8 min read

I know you’re probably tired of constantly copying and pasting your code into ChatGPT. Thankfully, there’s a solution: the ChatGPT desktop app. It integrates with popular tools like VS Code, Xcode, and the terminal.

In this tutorial, I will guide you through the setup and use of the ChatGPT desktop app for VS Code and terminal, with examples. 

ChatGPT Desktop: Initial Setup

To get started, download and install the ChatGPT desktop app from the official OpenAI website.

The app is available for macOS and Windows, functioning like the web version but with the added ability to integrate with other applications.

ChatGPT Desktop Overview

The ChatGPT desktop app operates just like its web counterpart, with an added feature: integration with other tools. It can be triggered from anywhere using Option+Space on macOS or Alt+Space on Windows.

Upon opening the app, we’re greeted with a familiar interface that’s almost identical to the web version but includes several key enhancements.

When we open the app, we get the following prompt window:

chatgpt desktop app GUI

The interface is very similar to the web version, but some differences are worth pointing out.

Sharing files and other data

The leftmost button allows us to attach files or data to provide context for ChatGPT. However, with the desktop app, we have different options:

option on the chatgpt dekstop app

In particular, it is worth noting the ability to take a screenshot. This is very practical to share the current context we’re viewing. It makes it possible to easily ask questions about what we’re seeing on our screen.

Unique to the desktop app is the ability to take screenshots, enabling quick sharing of our current screen view. This is particularly useful when seeking assistance about what we’re seeing on our screen.

The app also features an “Open App” button, which toggles between a compact prompt input and the full ChatGPT desktop interface.

Selecting the model

Clicking on the model name opens a model selector where we can choose which model we want to use:

Connecting with other apps

The most significant advantage of the ChatGPT desktop app is its ability to connect with other applications like VS Code and the terminal. This integration can improve our workflows by providing ChatGPT with direct context from these tools.

We can connect to another application using the third button:

In my case, I have already installed the VS Code extension which is what makes it possible for me to connect to it (as indicated by the + icon). We can see in this example that to use Cursor I would need to first install the extension. Let’s see next how we can install extensions.

How to Use ChatGPT Desktop With VS Code

As mentioned above, to integrate ChatGPT with VS Code, we need to install the ChatGPT VS Code extension. To do so, we need to:

  1. Download the ChatGPT VS Code extension from here
  2. From within VS Code, use the shortcut Command+Shift+P (macOS) or Ctrl+Shift+P (Windows) to open the command palette.
  3. Type vsix on the input and select “Extensions: Install from VSIX…”.
  4. Select the file and click “Install”.

Note: Ensure that VS Code is up-to-date to avoid installation errors.

Once installed, we can open ChatGPT using Option+Shift+1 (on macOS) or Alt+Shift+1 (on Windows). This is equivalent to opening the ChatGPT desktop app selecting VS Code in the “Work With” menu.

Example of using ChatGPT Desktop for VS Code

When using ChatGPT with VS Code, the context of the currently open window is automatically taken into account when we submit a prompt.

For example, I’m working on a web application, and I want to see if my database security rules are secure. For this I:

  1. Open my security rules file in VS Code.
  2. Ask ChatGPT to audit my security rules.

example of using chatgpt desktop with vs code

ChatGPT won’t automatically apply any changes to the code. We still need to manually copy and paste the code suggestions it provides.

The main advantage of the extension is that we don’t need to keep manually providing our code. As long as it is the open tab in our editor, ChatGPT will have access to it.

How to Use ChatGPT Desktop With the Terminal

To connect ChatGPT with the terminal, we need to select the terminal from the “Work With” menu:

using chatgpt dekstop with the terminal

Note that this is the stand-alone terminal, not the integrated terminal in VS Code.

Once the terminal is connected, its content will be taken into account when prompting ChatGPT.

Example of using ChatGPT Dekstop with the terminal

In my opinion, one of the most useful aspects of this integration is the ability to easily ask questions about an error. Let’s say I’m working on some code and run into an error. I ask ChatGPT to explain the error I see in the terminal and how to fix the code:example of using chatgpt dekstop with the terminal

This is a much better experience than having to copy both the error from the terminal and the source code into ChatGPT to debug.

Limitations of the ChatGPT Desktop App

While the ChatGPT desktop app greatly simplifies providing context, it’s not without limitations:

  1. Manual updates: ChatGPT does not automatically modify code or execute commands. We must copy and apply the suggested changes ourselves.
  2. Disjointed integration: The app operates as a separate window rather than being fully integrated into tools like VS Code, which can feel cumbersome.
  3. Limited context: ChatGPT only has access to the active window in VS Code, not the entire codebase.
  4. No diff viewer: There’s no built-in tool to view differences between the original code and ChatGPT’s suggestions, making changes harder to track.

Conclusion

The ChatGPT desktop app is a significant improvement for developers who rely on ChatGPT for coding assistance, offering a more streamlined and efficient workflow. However, it’s still not as seamless as fully integrated solutions like Cursor.

If you rely on copy-pasting your code into ChatGPT, this app will save you time and effort. While the integration has room for improvement, OpenAI’s roadmap hints at promising updates in the near future. For now, manual adjustments remain necessary, but the convenience of this tool could make it a valuable addition to your development toolkit.


François Aubry's photo
Author
François Aubry
LinkedIn
Teaching has always been my passion. From my early days as a student, I eagerly sought out opportunities to tutor and assist other students. This passion led me to pursue a PhD, where I also served as a teaching assistant to support my academic endeavors. During those years, I found immense fulfillment in the traditional classroom setting, fostering connections and facilitating learning. However, with the advent of online learning platforms, I recognized the transformative potential of digital education. In fact, I was actively involved in the development of one such platform at our university. I am deeply committed to integrating traditional teaching principles with innovative digital methodologies. My passion is to create courses that are not only engaging and informative but also accessible to learners in this digital age.
Topics

Learn AI with these courses!

course

Developing LLM Applications with LangChain

3 hr
12.4K
Discover how to build AI-powered applications using LLMs, prompts, chains, and agents in LangChain.
See DetailsRight Arrow
Start Course
See MoreRight Arrow
Related

blog

ChatGPT Projects: A Guide With Examples

Learn to create and manage ChatGPT projects with features like custom instructions and file uploads, improving project management and organization in ChatGPT.
François Aubry's photo

François Aubry

6 min

Illustration of ChatGPT Canvas

blog

ChatGPT Canvas: A Guide With Examples

Learn how to use OpenAI's ChatGPT Canvas to collaborate with ChatGPT on writing and coding tasks.
François Aubry's photo

François Aubry

8 min

blog

ChatGPT Search: A Guide With Examples

Learn how to use ChatGPT Search for various query types (informational, navigational, commercial, and transactional) and explore all its features.
Dr Ana Rojo-Echeburúa's photo

Dr Ana Rojo-Echeburúa

8 min

cheat-sheet

ChatGPT Cheat Sheet for Data Science

In this cheat sheet, gain access to 60+ ChatGPT prompts for data science tasks.

tutorial

A Guide to Using ChatGPT For Data Science Projects

Learn how to use ChatGPT in a real-life end-to-end data science project. We will use it for project planning, data analysis, data preprocessing, model selection, hyperparameter tuning, developing a web app, and deploying it on the Spaces.
Abid Ali Awan's photo

Abid Ali Awan

17 min

tutorial

Introduction to ChatGPT Next Web (NextChat)

Learn everything about a versatile open-source application that uses OpenAI and Google AI APIs to provide you with a better user experience. It's available on desktop and browser and can even be privately deployed.
Abid Ali Awan's photo

Abid Ali Awan

7 min

See MoreSee More