Skip to content
← Back to Community
Replit CLI
Profile icon
h
has Hacker Plan
CoolCoderSJ

Replit CLI

View On Github

Untitled design(3)

pip install repl-cli

Welcome to Replit CLI! With the Replit CLI Application, you can work with your repls locally, including clone, pull, and push, the core features of the CLI. You can code on your repls locally, then push your changes to the server, allowing you to use any IDE you want while also being able to use Replit. The full list of features includes-

PS C:\> replit Usage: replit [OPTIONS] COMMAND [ARGS]... Options: --install-completion [bash|zsh|fish|powershell|pwsh] Install completion for the specified shell. --show-completion [bash|zsh|fish|powershell|pwsh] Show completion for the specified shell, to copy it or customize the installation. --help Show this message and exit. Commands: clone Clone a Repl's contents to your local machine db Edit the Replit DB for a Repl env Interact with the Environment of the Repl of the Current Working... exec Execute a command to run on the remote repl. login Authenticate with Replit CLI. pull Pull the remote contents of the repl inside the working... push Push changes to the server and override remote. run Run, Stop, or Restart a Repl from your local machine. shell Connect to a bash shell with a remote repl. user Lookup the details for a Replit User version Output the current version for Replit CLI PS C:\>

Installation

  • Make sure you have Python 3.6 or higher installed. To do so, type python inside of a Command Prompt/Terminal instance. If you have Python installed, a Python shell will come up with the version number. (type quit() inside of the python shell to quit it) If you do not have Python 3.6+ or do not have Python at all, you can install it by downloading the installer for your platform located here
  • Once you have python, run the following command- pip install repl-cli, preferably with Administrator access (This includes Administrator accounts on macOS, and Run as Administrator on Windows) to make sure that your PC recognizes Replit CLI properly.
  • !! FOR Linux/macOS USERS !!
    • After installing while trying to run, you may get an error from Protobuf. To fix this, run the following commands-
pip install python3-protobuf pip uninstall python3-protobuf pip uninstall protobuf pip install --upgrade protobuf
  • Once installed, type replit into a shell to get started!

Documentation

To see the docs and for information on finding your authorization token, click here

Building From Source

To build from source, run the following commands-

git clone https://github.com/CoolCoderSJ/Replit-CLI.git cd .\repl-cli\repl_cli python main.py
Voters
Profile icon
yodathecoder
Profile icon
NFadhlurrahman
Profile icon
DillonB07
Profile icon
programmeruser
Profile icon
maxina
Profile icon
Whippingdot
Profile icon
SelenaYang1
Profile icon
EpicGamer007
Profile icon
TurtleAndrew
Profile icon
OldWizard209
Comments
hotnewtop
Profile icon
Coder100

Yay
but still i'm going to say it
python :barf:

Profile icon
CyberPy

@Coder100
WYBM
lol

Profile icon
Coder100
Profile icon
xfinnbar

@Coder100 What do you have against Python????? It's a great language.

Profile icon
Coder100
Profile icon
xfinnbar

@Coder100 JS serves a different purpose than Python. JavaScript is pretty much unused outside web development.

Profile icon
CoolCoderSJ

@xfinnbar FYI JS > PY, JS can do webdev, mobile dev, CLI, scripting, etc. Its not only webdev.
Python can do all of those things too but js is just better.

Profile icon
xfinnbar

@CoolCoderSJ Yeah but who does those things using JS, when they have a choice?
Mobile dev: People would use Flutter or Xamarin if they wanted to write an app from scratch, without porting from an existing web app.

CLIs: The only reason people use JS for CLIs is because they want to integrate with the Node ecosystem, which is only used in web and mobile development for the most part.

Scripting: People would use Lua if they wanted performance and Python if they wanted ease of use.

JavaScript is also a fundamentally flawed language because of:

  • Dumb design decisions from the 90s that can't be changed due to forced backwards compatibility, such as "1" == 1 and true + true == 2
  • Inconsistent runtime (Mozilla Spidermonkey and Google v8)
  • Prototypal inheritance is scuffed
  • Hoisting is scuffed
  • Bad class support
  • No type checking support at all (Python has a decent amount of type safety)

Python is better for this type of application in my opinion because:

  • More low-level stuff than Node can provide
  • Large ecosystem
  • Good package system (npm is not cool)
  • Google loves it
  • It does what it says on the tin and does it properly

Just my opinion :D

Profile icon
Coder100

but the thing is you can
you literally can do anything with it

also your idea of dumb design decisions: they are not dumb... the fact that you would do that makes you dumb

and type safety, does it segmentation fault? @xfinnbar

Profile icon
Whippingdot

one thing, anything google loves is bad xD @xfinnbar

Profile icon
maxina
Profile icon
programmeruser

Nice
fyi he forked my repl as a starting point

Profile icon
Whippingdot

I don't understand the push and pull

Awesome anyway and I will try it out.

Profile icon
CoolCoderSJ

@Whippingdot basically, to get started you do

PS C:\> replit clone repl_slug_here

Example:

PS C:\> replit clone CoolCoderSJ/Replit-CLI

Now cd into the dir

PS C:\> cd replit-cli

Now code. When you want to copy changes from local to repl, do

PS C:\replit-cli> replit push

When you want to bring changes to your local files, do

PS C:\replit-cli> replit pull
Profile icon
Whippingdot

oh ok, I know those commands from git and this is the same thing but your explanation above made me confused...

P.S. Wait you have to login before all of that right? Or else anyone can clone anything and push anything... @CoolCoderSJ

Profile icon
CoolCoderSJ

@Whippingdot yes, you have to run the login command first otherwise replit wont let you do anything.

Profile icon
ch1ck3n

I absolutely love the logo

It is a work of art

Profile icon
JBloves27

God thats a lot of imports lol

Haha, nicee!

Profile icon
CoolCoderSJ

@JBloves27 lmaooo yeah, 45 last time i counted

Most of them are dependencies from Protobuf, since technically i only have 4 requirements

Profile icon
JBloves27

loool xD

Ah, ok. lol got it @CoolCoderSJ

Profile icon
CyberPy

I get this error when i run the code:

image

But is this supposed to be a thing where you can save your code to replit even if you are working on a different IDE?

Profile icon
CoolCoderSJ

@CodingEssence ah my bad, i had to rrename the package, so you should cd into .\repl-cli\repl_cli
and yes, its like git for Replit

Profile icon
CyberPy

@CoolCoderSJ oo i get it now thx

Profile icon
AmazingMech2418

So, this is kind of like git for Repl.it? Nice!

Also...

You are a Unix user if you use any distro of Linux or macOS.

GNU/Linux is not Unix!
GNU = GNU's Not Unix!

It is Unix-like, but it is not Unix!

Profile icon
CoolCoderSJ

@AmazingMech2418 mhm my bad always get that mixed up. Fixed it now.