_ _ ____ _ _
___| (_)___ \ ___| | ___ _ _ __| |
/ __| | | __) / __| |/ _ \| | | |/ _` |
| (__| | |/ __/ (__| | (_) | |_| | (_| |
\___|_|_|_____\___|_|\___/ \__,_|\__,_|
cli2cloud - A command line utility to pipe stdout to a web interface
Version: 0.1.0
https://cli2cloud.herokuapp.com/
git clone https://github.com/elliot40404/cli2cloud
cd cli2cloud/cli
go install
# The binaries are also available in the bin directory
or
wget https://github.com/elliot40404/cli2cloud/releases/latest/download/c2c
curl -L -o c2c https://github.com/elliot40404/cli2cloud/releases/latest/download/c2c
chmod +x c2c
sudo ln -s $(pwd)/c2c /usr/local/bin/c2c
This should generate a 8 character long key.
$ c2c
No key found
Creating new key...
Created key: 4MQrxK9p
$ c2c
Cli-2-Cloud
A command line interface for piping output to web
Key: 4MQrxK9p
Web-UI: https://cli2cloud.herokuapp.com/4MQrxK9p
Version: 0.1.0
Usage:
$ command | c2c - pipe stdout to web
$ command | c2c -q - pipe stdout to web quite mode
$ c2c - print this help menu
also generates a new key if none exists
Open up a browser and go to https://cli2cloud.herokuapp.com/#/cli?id=<key>
echo "Hello World" | c2c
echo "Hello World" |& c2c
echo "Hello World" 2>&1 >/dev/null | c2c
Put this snippet in a file. I am calling mine term.sh
#!/bin/bash
while true
do
read -p "$USER@c2c in $(basename $PWD)\$ " p
$p |& c2c -q
done
sudo chmod +x term.sh
sudo ./term.sh
This should run the command in a loop and give you a terminal like interface and piping to the web withouth the need to pipe.
This is in no way an actual terminal interface. It is just a way/hack to pipe to the web without the need to pipe every command. This lacks basic terminal features like history and tab completion, ability backout of a dir. But it is a start.
I am working on an actual way to pipe stdout and stderr with the actual terminal interface.
Default example
Passing the -q flag to c2c will not print the url
NOTE: Your key is stored in the
~/c2c.dat
file. If you want to change the key you can delete the file and runc2c
again.
MIT