ritcs

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 7 Imported by: 0

README

ritcs

build release lint report card

Seamlessly run commands on RIT CS machines with automatic upload, execution, and sync of your local directory.

Demo

Checkout the demo video on YouTube

Install

[!NOTE] ritcs has been tested on macOS only. It should work perfectly fine on linux but might not work in windows. Please report a GitHub issue if you encounter an issue with ritcs on your system.

You can either install directly using go:

go install go.mattglei.ch/ritcs@latest

or using homebrew:

brew install gleich/homebrew-tap/ritcs

Prerequisites

SSH Key

Before using ritcs you need to have created an ssh key and have it copied over to the cs machine you want to ssh into. This can be done using the following terminal commands:

ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh-copy-id username@remote_host

When running the first command it will ask you to enter a password. You can do this if you want, but you will have to enter this password every time you run ritcs. Having no password is ok.

rsync

rsync is used to sync directories to the RIT CS machines. On macOS this comes installed by default. If your linux distribution doesn't come preinstalled with rsync please install it using your system's package manager.

Setup

ritcs can be setup automatically using the following terminal command:

ritcs setup

This then creates a configuration file in ~/.config/ritcs/config.toml.

Configuration

Here is an example configuration file that is found in ~/.config/ritcs/config.toml:

# required
home = "/home/stu4/s1/mwg2345"           # home directory on the cs machine
host = "glados.cs.rit.edu"               # hostname of the cs machine
key_path = "/Users/matt/.ssh/id_ed25519" # path to the ssh key

# optional
port = 2021      # ssh port of the cs machine. defaults to 22
silent = true    # if the program should not output logs. defaults to false
download = false # if files should be downloaded from the cs machine or not. defaults to true
Flags

You can also specify configuration flags when running ritcs like so:

ritcs --silent make

This flag will make ritcs not output logs, only the output of the command. Other supported flags are:

  • -h or --help to output all commands that ritcs has to offer
  • --skip-download to only upload the files and run the command

Uninstall

Tried out ritcs and found it wasn't for you? Simply run following command to remove the local configuration and to remove the remote directories created on the CS machine. You can then uninstall the ritcs binary and it is as if it was never on your system.

ritcs uninstall

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳