8 Jul 2024 ยท Software Engineering

    Codeium: The Best Github Copilot Alternative

    13 min read
    Contents

    Imagine coding side by side with a tireless teammate, who whispers brilliant Ideas, and suggestions in your ear. That’s the luxury GitHub Copilot provides. GitHub Copilot has provided us with relevant code suggestions, and developer assistance, with other helpful features like suggesting code snippets, comments, and documentation based on patterns found in open-source repositories, all while mimicking your coding style.

    But here’s the issue: Copilot comes with a monthly subscription fee. If budget is a major concern and you still want to keep up with such a high standard of service, there are free alternatives to consider. One strong contender that comes to mind is Codeium, which offers many of the same code completion and suggestion features as Copilot, with no cost at all.

    Goals

    In this article, we will:

    • Explore Codeium in detail.
    • Provide a step-by-step guide for successful installation.
    • Explain how to set up Semaphore with Codeium.
    • Highlight other key functionalities and uses.
    • Compare Codeium free indivdual plan with GitHub Copilot paid individual plan.
    • Discuss how best to use Codeium.

    What is Codeium?

    Codeium is a code completion advanced AI tool, that offers out-of-the-box free toolkits for personal, team, and company usability. With its advancement, Codeium accelerates coding processes, boasting of completing codes in over 70 languages.

    Features of Codeium

    We could debate about AI taking our jobs all day, but there is a strong case for its huge added advantage to our productivity as developers, and Codeium hasn’t fallen short of these qualities. With Codeium you have access to;

    • Limitless single and multi-line code completions indefinitely.
    • Support for over 70 programming languages.
    • Seamlessly integrate into all leading IDEs and web editors, including VS-code, Colab, and Jupyter Notebooks.
    • Receive assistance via Discord Community.
    • Ultra-fast response
    • Chatbot for AI suggestions
    • Fix code errors, within our IDE
    • End-to-end data encryption

    Differences Between Codeium and Github Copilot

    Codeium draws a lot of similarities from Github, but it has its improved uniqueness. We will be comparing Github Copilot’s individual paid plan to Codeiums free individual plan;

    Price

    Copilot operates on a subscription-based model, priced at approximately $10 per month or $100 per year. Codeium’s Individual plan is entirely free and remains so indefinitely, offering users access to its full range of features without any cost.

    Functionality

    Copilot functionality rallies around Single multi-line codegen and chat, on the other hand, Codeium shares the same thing with an added feature of In-IDE integrated search. This integration helps the coding process by allowing developers to have a humanlike convo with the AI or search for additional resources without switching between multiple applications.

    Supported IDES

    Copilot has support for the following IDEs; VSCode, JetBrains, Vim/Neovim, Visual Studio, and Godellum. While Codeium supports; VSCode, JetBrains, Visual Studio, Jupyter/Colab/Deepnote/, Databricks Notebooks, Chrome, Vim/Neovim, Emacs, Eclipse, Sublime Text, and VSCode Web IDEs (ex. Gitpod).

    Support for Languages

    GitHub Copilot and Codeium both offer built-in support for popular languages like Python, Javascript, TypeScript, Ruby, Go, Java, PHP, C++, C, Rust, and Swift. However, Codeium provides an added advantage with its large support for emerging or lesser-known languages of over 70+ of these languages.

    Deployment

    Codeium can be used online, installed on your servers, or within a private network. They’ve passed a security check called SOC 2 Type 2 for their online version. On the other hand, GitHub Copilot has not put out a statement on its security check yet. This could mean that Codeium has been proven to be secure when used online.

    Installation

    To have a developer experience we must first install this software. In terms of installing this application, there are usually two ways we can install codeium;

    • Playground
    • Get Extension

    Playground

    The first method we will explore will be “trying this out in our browser”:

    With this, you can go on a the playground and try codeium in your browser.

    Enough of the talks, let’s see how Codeium works, Javascript will be a better choice for me, cause that is what I prefer, you could use another language of preference, and still get the same result. I made edits to the playground, and made a comment that reads “Write a quick todo app in Js”:

    Then I went ahead to the next line, and immediately suggestions were given;

    You will only need to click tabs to accept suggestions:

    Voila! We have our variables to get started. The usefulness of the playground is to convince you to install it in your IDE, and that takes us to the second form of installation

    Get Extension

    To get the extension running in your code editor click on the “get extension” as highlighted below:

    The tab below will be open, choose your preferred code editor, there about over 20 code editors available, in this case, we will be using Visual Code Editor for illustration purposes.

    When you click your code editor you will be asked to sign up, after signing up you will be able to see the display below, click on a quick install, and it will take you to Visual Studio Code extensions section, follow all instructions and you will have it successfully installed. If you successfully had Codeium’s extension installed your VS code should look like this:

    If you missed out on anything during the installation, when you click on the Codeium icon at the left side of your VS code, you will get an error, this is because you may have missed out on linking Codeium to your IDE properly, to fix that, navigate to your Codeium profile, the token will be provided for you there.

    To finish up, copy the token, and go to VS Code. In VSCode, open the Command Palette (Ctrl/Cmd + Shift + P), type Codeium: Provide Authentication Token, and hit Enter. This will initiate the authentication process.

    Exploring Codeium’s Benefits

    There are various benefits that come with codeium, these benefits are;

    Limitless single and multi-line code completions.

    Codeium can suggest an entire line or even multi-line code blocks. This means Codeium can potentially complete logic structures, or functions without any limitations on the amount of code it proposes.

    Imagine you’re building a music recommendation application. Codeium could suggest the entire array of songs, artists, genres, and moods, including the initialization, condition, and body, all at once. Let’s put this to a test:

    Single Line:

    Multiple Line:

    This is the complete code it generated for that function:

    Codeium Chatbot

    Codeium chat can be used to generate boilerplates, explain Code, refactoring Code, and editing code. One fun thing you need to know is that the Chatbot is also called Codeium university, and this is because you can go on an on having a very interactive learning session with this AI.

    Generate Boilerplates:

    You can easily prompt Codeium to Generate a HTML boilerplate for example and it does this for you. Feel free to copy or Insert directly into your code:

    Explanation, Refracturing, and Editing:

    To leverage this chatbot feature you can easily select the code block you want to understand or improve. You can highlight any code by dragging your mouse over it, and then right-clicking on the highlighted code block.

    This will reveal a context menu with various options, as seen below go down and select either Codeium: refactor selected code or Codeium: explain selected code.

    To enjoy Codeium edits, you will also need to highlight the code and then press ctrl + I, this will open a tab like the one below, feel free to prompt as you wish.

    Intelligent Search:

    Codeium Search helps you find stuff in your code! It currently works with Python, JavaScript, TypeScript, and Go. Here’s how to get started: Go to the Codeium chat prompt it to search your code with natural language, explaining what you want and it will do so!

    Downside: Indexing large amounts of code files can take time and slow down your computer, it happens once so no need to fear.

    Unit Test and API Integration Made Easy

    Codeium has an extensive knowledge of various APIs and can seamlessly insert them into your code, right from your IDE. It doesn’t stop there, it can as well generate unit test for your code.

    Help developers Learn

    Using Codeium you could cut your learning curve so fast. Let’s say for instance you are stuck on a concept or function. Codeium can explain code snippets and logic structures clearly.

    Also, the Contextual Code Completion helps with both basic and complex completions. This can expose you to new coding patterns and approaches in such a short time, mind you since it’s trained on a lot of data it teaches you a widely accepted pattern and good code practices.

    Product review

    Setting up Semaphore with Codeium

    To set up a Semaphore CI build for a web application with Codeium, let’s get a semaphore account. I prefer using GitHub for my authentications, I will advise you to do so. For this exercise, we will consider a simple example of a Node.js web application using Express.js as the framework that renders Hello, Semaphore, Our build works Now! On the browser(LocalHost).

    We can go ahead to create a folder named “semaphorebuild”, doesn’t need to be the best of names. Navigate into the project, Install Express.js, and create an App.js file in the root of our project. Here’s a basic file structure:

    Project file structure;

    -/semaphorebuild
      - app.js
      - package-lock.json
      - package.json
    

    In the app.js file, copy and paste the code below:

    const express = require('express');
    const app = express();
    
    app.get('/', (req, res) => {
      res.send('Hello, Semaphore, Our build works Now!');
    });
    
    const PORT = process.env.PORT || 3000;
    app.listen(PORT, () => {
     console.log(`Server is running on port ${PORT}`);
    });

    You can run this using node app.js. In the root of our project, we will create a .semaphore folder, and in it, we will create semaphore.yml file. This file contains the instructions for Semaphore on how to build, test, and deploy our application. We will be prompting Codeium to help with this. Here is the prompt:

    Codeuim has given us a template, we can now insert it in our semaphore.yml file:

    In our .yml file we need to make a few changes, and here is why; The code template above will only spin up a VM and echo a string “Hello, Semaphore”.

    We could take a step further to build it, start the App.js env, and test with a curl cmd that it’s actually up & running.

    We want to add three key changes;

    • Node.js Installation: This script uses sem-version node to switch to a specific Node.js version.
    • Caching: We will use Semaphore’s caching mechanism to speed up the installation of node modules.
    • Testing: After starting the server, we will need to perform a curl request to the localHost:3000 route, to be sure it’s up and running.

    Feel free to replace the code in the .yml file with this code.

    Going further, we will create a repo in GitHub and push the code there. To test our build, navigate to Semaphore Home page.

    Create a new project, and follow the provided steps to get your newly created repo linked to Semaphore. 

    Choose your repo:

    Semaphore automatically initializes your project, and check if you have a semaphore.yml file:

    Select the “I will use the existing configuration” option above, as Codeium has provided us with that already. You will have to trigger a build by a more recent  push to the repository, afterwards, Semaphore builds and gives its results really fast:

    With this basic example, we have been able to see how Codeium can help in a real-world scenario, here is the GitHub repo.

    Frequently Asked Questions

    When thinking about what Codeium can do and why it might be helpful, it’s crucial to realize that it could be used incorrectly or not fully understood. New users might have questions about how to use it properly.

    Here are some frequently asked questions to consider, along with answers, to emphasize the importance of using Codeium effectively.

    How should developers approach using Codeium, considering it’s an AI?

    Codeium is an AI tool and should be used with a certain mindset, it’s important to note that Codeium is not a replacement for your coding skills and the critical logic that comes with it.

    Use it effectively to boost your productivity and efficiency, but always maintain a focused eye on its suggestions and ensure they align with your coding best practices. While Codeium’s code suggestions are mostly correct, it’s important to remember that it’s an AI tool and may sometimes generate incorrect, repetitive, or instinctive code.

    How does Codeium use artificial intelligence to assist with coding?

    From close experience, Codeium uses AI in two different approaches to become a good coding friend:

    • Code Analysis: Codeium utilizes pre-trained AI models that have been fed lots of public code. This training allows them to understand programming language structures, common coding patterns developers use, and even best practices.
    • Real-time AI Assistance: Whenever you code, Codeium puts this knowledge to work, by analyzing what you’ve typed and the context of your code and then comparing them with pre-known information that it has been fed already, with this level of knowledge it can then provide intelligent suggestions in real-time.

    Is Codeium safe?

    The simple answer is Yes it is safe, the explanatory answer is that Codeium claims to be SOC 2 Type II compliant, which indicates they have security controls in place to protect user data.

    How is Codeium free

    The straightforward answer is, as an individual it is free, but as a team, you will have to patronize with your money. The truth is there is nothing of value that is really free, there will always be a catch, and in this case that catch is, as a team, there is so much you will want to do with software like this, one of its very importance will only be utilized as an organization. This takes us to our next section talking about it’s pricing.

    Codeium Pricing

    Codeium has three prices which are the Individual: Free forever, Teams which starts from $12/month and there is Enterprise plan, but the pricing is not available on the website. You can contact Codeium for more information.

    Here’s a summary of the features included in each plan:

    Individual

    • Rapid code autocomplete
    • In-editor AI chat assistant
    • Repo natural language search
    • Unlimited usage
    • Trained on open-source data
    • Support via Discord.
    • End-to-end data encryption.

    Teams (all features of Individual)

    • Admin usage dashboard
    • Seat management and invites
    • Upto 200 seats
    • Advanced personalization on your codebase.
    • Doc searching (coming soon)

    Enterprise (all features of Teams)

    • Priority support via Slack channel with Codeium team
    • Enterprise support portal with documentation and ticketing
    • Saas, on-prem air-gapped, and self-hosted VPC deployments available (optional)
    • Optional finetuning on your codebase.

    Conclusion

    Codeium offers a promising alternative to Git Copilot, providing developers with an efficient tool for improving coding productivity. While there are other options available, Codeium stands out for its integration with Visual Studio Code and its commitment to data security, Thank you for reading this far, your time was highly appreciated. Please take a look at the Docs as it has extensive use-cases for every IDE.

    2 thoughts on “Codeium: The Best Github Copilot Alternative

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Avatar
    Writen by:
    I have successfully delivered multiple projects on topics such as user guides, blog posts, tutorials, and documentation, using my web development skills and knowledge of different technologies. I graduated with a BSc in Sport Science from the University of Portharcourt in March 2023. I enjoy learning new technologies and writing about them, as well as programming and creating videos. My goal is to combine my passion for web development and writing, and to contribute to the online community with valuable and relevant content.
    Avatar
    Reviewed by:
    I picked up most of my soft/hardware troubleshooting skills in the US Army. A decade of Java development drove me to operations, scaling infrastructure to cope with the thundering herd. Engineering coach and CTO of Teleclinic.