https://github.com/theonlyamos/runit
A terminal client for creating and running serverless functions
https://github.com/theonlyamos/runit
cloud serverless
Last synced: 3 months ago
JSON representation
A terminal client for creating and running serverless functions
- Host: GitHub
- URL: https://github.com/theonlyamos/runit
- Owner: theonlyamos
- Created: 2022-05-12T23:50:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-05T10:29:27.000Z (about 1 year ago)
- Last Synced: 2024-05-19T00:03:18.617Z (about 1 year ago)
- Topics: cloud, serverless
- Language: Python
- Homepage:
- Size: 4.42 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Runit CLI 
The Runit Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Runit project from the command line.
- Create new runit project
- Run a local web server for your runit project
- publish code and assets to your runit-server domain
- Interact with data in your runit-server database## Supported Languages
  ## Installation
### Python Package
You can install the Runit CLI using pip (Python package manager). Note that you will need to install [Python](https://python.org).
To download and install the runit CLI run the following command:
```shell
pip install runit
```
This will provide you with the globally accessible ```runit``` command.### Install from source
```shell
git clone https://github.com/theonlyamos/runit.git
cd runit
pip install .
```## Usage
Run the below command to print out usage message.
```shell
runit --help
```
**Create New Project**
Run the following in the command line to create a new runit project.
> Supported languages include: [Python](), [Javascript](), [PHP]()
```shell
runit new --language
```
Run ```runit new --help``` for all options**Run project locally**
***Access functions on local server****
Running the command ```runit``` in a project directory spins up a local webserver which can be used to access the funtions in project.
```shell
cd
runit
```
Point your browser to the address provided followed by the function name to access that function.
```http://localhost:5000/``` will be the default address.
Visiting ```http://localhost:5000/hello_world``` will run the ```hello_world``` function in the project.***Run function and print output to shell***
Output function result to shell. Required arguments include:
> ```--function ```: Function name to call
> ```--shell```: sets shell output to true
> [Optional] ```--arguments|-x```: Arguments for the function if required. Can be called multiple times for multiple arguments```shell
cd
runit --function --shell
```### Publishing Project
Before you can publish any of your projects, you must setup the backend for your runit. You must also be logged in.**Setup Backend Details**
The backend must be running ***[runit-server](https://github.com/theonlyamos/runit-server)***.
Run ```runit setup --help``` for help message.
***Follow the prompts to complete the setup after running the below comman.***
```shell
runit setup
```**Account Login**
```shell
runit login --help
```
```shell
runit login --email --password
```
**or**
***Follow the commands after running below command***
```shell
runit login
```**Deploy/Publish Project**
```shell
cd
runit publish
```## License
**Free Software, Hell Yeah!**