# Getting Started
Welcome to the exciting world of AI-enhanced coding with Codebuddy! This blog post will guide you through the initial steps of using Codebuddy and help you understand how to unlock its full potential.
If you haven't already installed the Jetbrains plugin, please do so by going to the [Codebuddy Jetbrains Plugin Page](https://plugins.jetbrains.com/plugin/22666-codebuddy) and installing the plugin into any Jetbrains IDE.
Once installed, you will see the Codebuddy icon on the left or right side of the IDE.
![Screenshot of Codebuddy icon](https://i.imgur.com/hi1V4kQ.png)
You can click there to open the Codebuddy AI panel. You will need to login to your Codebuddy account before you can start using it. Simply click anywhere on the Codebuddy panel to start that process. It's a very quick and easy process if you already have a Github account. If not, create a Github account and continue this process.
Keep in mind that your IDE will need to be fully indexed before anything displays on the Codebuddy panel, even after you've authenticated successfully.
# Understanding Codebuddy
Codebuddy is an AI-powered coding tool designed to assist you in your software development journey. It can make sweeping, multi-tiered changes across your existing projects, create new files, and even engage in a detailed conversation about your code. Think of Codebuddy as a full-stack developer at your disposal!
It is important to understand however that you control the context of each message you send to Codebuddy. You select which files to include, whether or not to include the filesystem list, and you control how much chat history Codebuddy sees with each message through conversation controls.
## Key Points to Remember
1. **A replacement for ChatGPT**: Codebuddy is based on OpenAI's GPT4 and all of your communication with the AI uses GPT4. Rather than copying files into a ChatGPT prompt, you can simply select files to include in your prompt, or use the Filesystem checkbox to include the file and folder structure as part of your prompt. Codebuddy is much more than that however as it is also capable of applying code changes directly to your files as you discussed them with the AI.
2. **Context is Key**: This is the context space dial. It tells you how much context memory space is available for you to fill with your prompt. Each time you speak with the AI, your prompt/message (including any files, previous conversation, and other inclusions) must fit within the context space of a single request to GPT4. This dial helps you to maintain control over that.
![Screenshot of the context space dial](https://i.imgur.com/LbM3MrL.png)
Codebuddy relies on the context you provide to understand your project. You can include your project's context by selecting files or checking the "Filesystem" checkbox. When creating new files, don't forget to select this checkbox to include the filesystem directory structure with your prompt. However, only the folders expanded in the left panel will be included. This feature helps you control the usage of your context memory. The context memory dial in the bottom-left corner of the screen indicates how much of your context memory you are using. If it's too much, you can reduce the amount of context memory left for your prompt and Codebuddy's response by unchecking files, removing messages in your conversation, starting a new conversation, or unchecking the filesystem checkbox. The context dial tells you how much context memory your prompt is going to use but make sure you leave some space for Codebuddy's reply!
3. **Conversations as context**: We attempt to organize your conversations with Codebuddy in a smart way so you never include too much chat history with each change. When Codebuddy responds with file code changes, it assumes that the conversation is complete. However, you can continue from where you left off by using the Reply button on a message. This will ensure that your next message will be part of the same conversation and the entire conversation will be included with your prompt as context. If you wish to start a new conversation (with a fresh chat history) use the Clear Chat button to force starting a fresh conversation with the AI. You can also use the trash button to remove specific messages from the chat history. This can be useful if parts of the conversation are repetitive, taking up context space unnecessarily.
![Screenshot of the bottom of a conversation with controls](https://i.imgur.com/UaJvstz.png)
6. **Creating New Files**: Codebuddy excels at creating new files from scratch or using reference files that exist in your project already. However, at the very least you will need to let Codebuddy know about your directory structure. You can do this by selecting the "Include Filesystem" checkbox. This checkbox will include all of the files and folders that are currently expanded in the Project Hierarchy panel in your project. **Only folders that have been expanded will be included in the filesystem**. We do it this way so that you can control how much context space is being used since some projects may have thousands of files and folders and this would quickly overflow the context memory size constraints.
![Screenshot of the Include Filesystem checkbox](https://i.imgur.com/ViDRvWa.png)
If you're starting a new project from nothing, simply discuss the basic directory tree first before creating new files.
## Voice Input Capability
We're excited to introduce the Voice Input feature to Codebuddy's JetBrains plugin. This innovative feature allows you to communicate with Codebuddy using your voice, making the experience hands-free and more natural. By speaking directly to Codebuddy, you can express your ideas more thoroughly, which can significantly enhance the code generation process. The feature is especially useful when you find yourself explaining coding problems out loud, as it allows for clearer and more diverse expressions of your needs.
To activate Voice Input, use the default keyboard shortcut CTRL + Windows Key (or the equivalent on a Mac). Alternatively, you can click on the Codebuddy icon labeled "Ready" in the status bar at the bottom of the IDE to start speaking.
![Voice input feature screenshot](https://i.imgur.com/YZ97fCx.png)
## Web Page Prompt Inclusions
The Web Page Prompt Inclusions feature is another exciting addition to the Codebuddy JetBrains plugin. With this feature, you can incorporate the content of any web page directly into your conversation with Codebuddy. Simply paste the URL of the web page - whether it's a blog post, online documentation, or a tutorial - and Codebuddy will convert it into a text document. This text becomes part of your prompt, allowing you to ask Codebuddy to implement the functionality described on the page or to discuss its content in depth, enriching your coding experience.
![Web page prompt inclusions feature screenshot](https://i.imgur.com/O7tT8JX.png)
## Codebuddy's Additional Editor Features
In addition to the usual workflow of talking to Codebuddy about your files and making code changes through the main panel, there are 2 other handy features that you will certainly make use of periodically.
![Right-click context menu](https://i.imgur.com/avM0S8l.png)
### Explain This
Select a section of code in the editor, right-click on it and go to Codebuddy -> Explain This. You will be prompted to ask a question about this specific area of the code. Your selected code snippet will be included along with your question in the usual conversational workflow, which makes it easier to target specific parts of your code without having to explain to Codebuddy where you're referring to. This can also be handy for files that are too large for the AI context memory size.
### Quick Recode
This feature will prompt you to state what you wish to change about the selected code snippet. This unique feature will not enter into the usual Codebuddy conversational workflow and instead will execute your request immediately and quickly. This also means that none of the selected files will be included in your Quick Recode prompt. This feature is useful when the change you wish to make does not rely on any other parts of the code, usually for simple syntax or code structure changes.
![Quick recode feature screenshot](https://i.imgur.com/xCYIymO.png)