How to run replit code in shell?

Question:

Replit Profile: https://replit.com/@SayanRoy12

how to run replit code in shell?

Welcome to Ask @SayanRoy12!

You can run shell commands in the shell by clicking on the terminal and typing.

2 Likes

The command to run your program will differ from repl to repl, but here is a list of common program types:
Python: python main.py
Node.JS: node index.js
You can also find these commands by searching “[programming language name] start command”

Alternatively, you can stick to the run button and configure it to run any shell command by adding/modifying the line that looks like the following in your .replit file (you might need to show hidden files)
Python: run="python main.py"
Node.JS: run="node index.js"
Other: run="[insert your shell command here]"

3 Likes

shell is more or less used at a terminal rather than an index so for example if you’re going to use it in Python you will put “pip install X” In this case x is a variable because I didn’t want to confuse anyone with an example also if you want it to work remove the “”

3 Likes