Replit is a popular free online IDE that you can use to create your projects with very little setup. This editor supports over 50 languages and many programming courses use it, including freeCodeCamp.

In this article, I will show you how to get started with Replit and show you how to use a lot of the basic features.

Here is a list of topics discussed in the article:

How to create a free Replit account

To get started, you will first need to go to the Replit homepage. In the top right hand corner, click on Sign Up.

Screen-Shot-2021-11-03-at-11.37.09-AM

You can create an account with your own username, email, and password. Or you can create an account using your Google, Facebook, or GitHub account.

Screen-Shot-2021-11-03-at-11.38.16-AM

Once you are logged in, then it should take you to your account homepage.

Screen-Shot-2021-11-03-at-11.39.37-AM

What is a Repl and how do you create one?

Repl stands for read-eval-print loop and it is an interactive programming environment for developers to create small projects.

In Replit, there are three places where you can create a new repl.

One way is to click on the Create Repl button located at the top left hand corner of the homepage.

Screen-Shot-2021-11-03-at-11.55.53-AM

You can also create a repl by clicking on the + icon under the Create section.

Screen-Shot-2021-11-03-at-12.12.35-PM

The last option is the click on the + icon located at the upper right hand corner.

Screen-Shot-2021-11-03-at-3.19.31-PM

Then you can choose from one of Replit's many templates including Python, Node, Java, HTML & CSS, Ruby, and more.

Screen-Shot-2021-11-03-at-11.58.45-AM

Once you choose your language, pick a name for your project.

Screen-Shot-2021-11-03-at-11.59.58-AM

For the free version of Replit, you are not allowed to create private projects. If you want a private repl, then you will need to upgrade to the paid subscription.

Screen-Shot-2021-11-03-at-12.01.10-PM

Once you are done naming your repl, click on the blue Create Repl button.

Screen-Shot-2021-11-03-at-12.02.50-PM

Then you should be taken to the editor.

Screen-Shot-2021-11-03-at-12.03.49-PM

Basic features of the Replit editor

In this section, I will go over some of the basic features you can use in the Replit editor. These features include a debugger, files and folders, version control, unit tests, and more.

Replit Files and Folders

In the upper left hand corner, you can click on the file icon to add files and folders to your project.

Screen-Shot-2021-11-03-at-12.20.09-PM

To add a file, click on the Add file icon.

Screen-Shot-2021-11-03-at-12.21.17-PM

To add a folder, click on the Add folder icon.

Screen-Shot-2021-11-03-at-12.22.01-PM

If you want to upload files or folders from your computer, click on the three vertical dots icon.

Screen-Shot-2021-11-03-at-12.23.15-PM
Screen-Shot-2021-11-03-at-12.23.41-PM

If you need to delete files or folders, then click on the three dots icon located next to the file you want to delete. Then from there, choose the delete option.

You can also right click on the file and you should see the list of options.

Screen-Shot-2021-11-03-at-2.07.43-PM

Version control in Replit

You also have the ability to connect to your GitHub account and create a repository for this project. At the time of this writing, this feature is currently in beta.

First click on the version control icon on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-12.27.30-PM

You should then see an option to connect to your GitHub account.

Screen-Shot-2021-11-03-at-12.28.20-PM

You will be prompted to grant Replit permission to create new repositories on GitHub.

Screen-Shot-2021-11-03-at-12.29.18-PM

Enter in your login information for GitHub.

Screen-Shot-2021-11-03-at-12.30.32-PM

If you have multiple accounts linked to your profile, choose the account where you want to install Replit.

Screen-Shot-2021-11-03-at-12.31.44-PM

You will then need to authorize Replit to install.

Screen-Shot-2021-11-03-at-12.33.12-PM

After you Install and Authorize Replit, you should be directed back to the Replit editor.

Now all of our changes will be tracked and we can push those changes to GitHub. Write a short commit message and click on the Commit & push button.

Screen-Shot-2021-11-03-at-12.37.15-PM

You should see all of your commit messages in the version control panel.

Screen-Shot-2021-11-03-at-12.38.12-PM

Then click on the Connect to GitHub button so you can create a new repository.

Screen-Shot-2021-11-03-at-12.39.59-PM

You can add a description for the repo and then click on the Create GitHub repository button.

Screen-Shot-2021-11-03-at-12.41.02-PM

Once it is created, you should see the name of the repository in the version control panel.

Screen-Shot-2021-11-03-at-12.42.00-PM

You can also see your new repository in GitHub.

Screen-Shot-2021-11-03-at-12.42.39-PM

Replit Debugger

The Replit editor has a debugger tool, where you can walk through your code step by step to see what is happening and fix errors. This is also a Beta feature.

You can find this feature on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-12.47.14-PM
Screen-Shot-2021-11-03-at-12.47.37-PM

How to install packages in Replit

You can also install different packages into your projects like morgan, express or cors using the Packages panel on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-12.51.02-PM

Search for the package that you want to use and click on the + icon to install it into your project.

Screen-Shot-2021-11-03-at-12.52.16-PM

Inside the console, which is located on the right hand side of the screen, you should see the package being installed.

Screen-Shot-2021-11-03-at-12.53.14-PM

Secrets (Environment variables) in Replit

Replit no longer supports creating .env files.

Screen-Shot-2021-11-03-at-12.57.28-PM

Instead, you will have to use the Secrets tab to store your environment variables. You can find this Secrets icon on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-12.59.07-PM

You will write the name of your key in the Key input field and write the value in the value input field. Then click on Add new secret.

Screen-Shot-2021-11-03-at-1.02.36-PM

Then you should see your newly created environment variable in the Secrets tab.

Screen-Shot-2021-11-03-at-1.03.59-PM

If you need to edit that variable, hover your mouse over the variable name and click on the pencil icon.

Screen-Shot-2021-11-03-at-1.05.12-PM
Screen-Shot-2021-11-03-at-1.05.41-PM

Now you should be able to use that environment variable inside your code.

How to customize Replit settings

If you need to customize the editor settings for your project, click on the settings icon on the left hand side of the editor page..

Screen-Shot-2021-11-03-at-1.07.56-PM
Screen-Shot-2021-11-03-at-1.08.24-PM

Replit Database

If you want to use Replit's key-value storage, then click on the Database icon on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-1.10.38-PM
Screen-Shot-2021-11-03-at-1.13.40-PM

To learn more about how to use the Replit Database, please visit the documentation.

How to add unit tests in Replit

If you need to add Unit tests to your project, click on the Unit tests icon on the left hand side of the editor page.

Screen-Shot-2021-11-03-at-1.15.35-PM

Then click on the Add test button.

Screen-Shot-2021-11-03-at-1.17.24-PM

Then you can create your Unit tests by providing a name, the code, and a failure message. Click save when you are done.

This is a screenshot using the Replit example unit tests for adding two numbers:

Screen-Shot-2021-11-03-at-1.19.47-PM

Then click on the Run tests button.

Screen-Shot-2021-11-03-at-1.46.37-PM

Inside the console, you will see the tests running with the results.

Screen-Shot-2021-11-03-at-1.47.41-PM

How to use the Run button in Replit

If you want to start the server for your project, then click on the green Run button located at the top of the editor page.

Screen-Shot-2021-11-03-at-1.53.10-PM

When you click on the Run button then you should see the results of your code in the preview window and console located on the right hand side of the editor page.

Screen-Shot-2021-11-03-at-1.57.10-PM

How to clear the console in Replit

If you need to clear out the console, then click on the x icon located at the right hand side of the console window.

Screen-Shot-2021-11-03-at-1.59.38-PM

What is the Replit Shell console?

If you need to type in commands, such as removing or adding folders, then you can use the Shell console.

Screen-Shot-2021-11-03-at-2.05.23-PM

How to add a custom domain in Replit

In the preview editor, you can add a custom domain for your project. Click on the pencil icon next to the preview URL.

Screen-Shot-2021-11-03-at-2.21.46-PM

Then you can add your custom domain and CNAME information:

Screen-Shot-2021-11-03-at-2.23.42-PM

How to publish your project in Replit

Once you are finished creating your project, then you can publish it and have it displayed in the collection of Replit Apps.

First click on the name of the project, which is located in the top left hand corner.

Screen-Shot-2021-11-03-at-2.24.52-PM

Then you can provide a short description of the project and click on Publish.

Screen-Shot-2021-11-03-at-2.26.19-PM

You will then have the option to provide a description, cover image, and tag information. When you are finished, click on the publish button.

Screen-Shot-2021-11-03-at-2.28.01-PM
Screen-Shot-2021-11-03-at-2.28.58-PM

If you want to publish an update, then you can click on your project and then click on Publish update.

Screen-Shot-2021-11-03-at-2.24.52-PM
Screen-Shot-2021-11-03-at-2.33.18-PM

If you need to unpublish your project, click on the three dots icon to the right of the publish page and choose the unpublish option.

Screen-Shot-2021-11-03-at-2.34.14-PM
Screen-Shot-2021-11-03-at-2.34.41-PM
Screen-Shot-2021-11-03-at-2.34.53-PM

How to share Replit project URLs

If you want to share your project URL, you will first need to click on green Run button followed by the Open in new tab button located in the preview window.

Screen-Shot-2021-11-03-at-1.53.10-PM
Screen-Shot-2021-11-03-at-2.38.24-PM

Then you should see your page in a new tab.

Screen-Shot-2021-11-03-at-2.39.09-PM

If you want to share your URL which contains the editor and preview window, use the link found in the top of the browser.

Screen-Shot-2021-11-03-at-2.40.21-PM

If you visit the link, you should see this result:

Screen-Shot-2021-11-03-at-2.41.44-PM

If you need help on a project and want other developers to see your code and files, then you share that browser link. Others won't be able to see your environment variables when you share your project.

How to invite others to edit your repls

Replit has a feature where you can invite other developers to join your project and edit the code.

First, click on the Invite button located at the top right hand side of the editor page.

Screen-Shot-2021-11-03-at-3.08.24-PM

In the search field, you can add users from replit or add the email addresses of those you want to invite.

Screen-Shot-2021-11-03-at-3.10.39-PM

Then click on the blue Invite button to send invites for users.

Screen-Shot-2021-11-03-at-3.11.16-PM

You will see that their invitation is pending.

Screen-Shot-2021-11-03-at-3.13.20-PM

You can also send out a join link to the user you want to add to the project. Click on the Generate a join link button located at the bottom.

Screen-Shot-2021-11-03-at-3.13.56-PM
Screen-Shot-2021-11-03-at-3.16.06-PM

If you need to remove invited users, then click on the x icon located next to their name.

Screen-Shot-2021-11-03-at-3.16.50-PM

What is included with the Replit paid subscription?

The Hacker paid subscription level comes with more memory, storage, speed and private repls.

The Teams paid subscription level comes with educational projects for students and teachers to work with.

To learn more, please visit Replit's pricing page.

Screen-Shot-2021-11-03-at-3.50.22-PM

I hope you enjoyed this Replit starter guide and best of luck on your developer journey.