SSH wrapper script that brings your dotfiles always with you on Linux and OSX
Kyrat - A simple ssh wrapper script that brings your dotfiles always with you on Linux and OSX
|Project Status|Communication|
|:-----------:|:-----------:|
| |
|
Table of Contents - Description - Quickstart - Installation - Dependencies - Linux - OSX - Troubleshooting - Contributing - Donating - Authors - Last words
kyrat is a ssh wrapper that allows to source local dotfiles on a ssh session to a remote host. No installations or root access on the remote host are required. It works either from/to a Linux or OSX machines.
kyrat can transfer to the remote host and source the following dotfiles:
~/.config/kyrat/bashrcor inside the directory
~/.config/kyrat/bashrc.d/).
~/.config/kyrat/inputrcor inside the directory
~/.config/kyrat/inputrc.d/)
~/.config/kyrat/vimrcor inside the directory
~/.config/kyrat/vimrc.d/).
~/.config/kyrat/tmux.confor inside the directory
~/.config/kyrat/tmux.conf.d/).
~/.config/kyrat/zshrcor inside the directory
~/.config/kyrat/zshrc.d/).
KYRAT_SHELLcan be used to set which shell to spawn remotely (default is
bash). The allowed shells are
bash,
zshand
sh.
KYRAT_TMPDIRremote location to store the dotfiles (default
/tmp).
The following summarizes the Kyrat features:
bashrc,
vimrc,
inputrc,
tmux.conf,
zshrc
gzip
base64
/tmp(configurable via
KYRAT_TMPDIRenv variable)
bash,
zshor
sh(configurable via
KYRAT_SHELLenv variable)
This is the sequence of steps that occur when running Kyrat:
KYRAT_TMPDIRvariable)
bash,
zshor
shaccording to
KYRAT_SHELLvariable)
Write locally in either
~/.config/kyrat/bashrcor any files inside
~/.config/kyrat/bashrc.d/:
alias q=exitfunction processof(){ ps -U $1 -u $1 u }
export PATH=$PATH:/sbin:/usr/sbin
Now, just access to your remote host:
$> kyrat [email protected] myserver.com $> processof feel feel 20567 0.3 0.0 14748 952 pts/5 S+ 12:44 0:13 ping www.google.com feel 23458 0.0 0.0 12872 1372 pts/9 R+ 13:49 0:00 ps -U feel -u feel umyserver.com $> q exit
Or even inline:
$> kyrat [email protected] -- processorof feel
Write locally in either
~/.config/kyrat/vimrcor any files inside
~/.config/kyrat/vimrc.d/:
nnoremap e :Explore
Now, just access to your remote host via
kyrat, run vim and you will have the shortcut
\efor running the vim file explorer.
Write locally in either
~/.config/kyrat/inputrcor any files inside
~/.config/kyrat/inputrc.d/:
set completion-ignore-case On
Now, just access to your remote host via
kyratand the terminal will have case insensitive tab completion.
Write locally in either
~/.config/kyrat/tmux.confor any files inside
~/.config/kyrat/tmux.conf.d/:
bind e setw synchronize-panes on \; display "Synchronization ON" bind E setw synchronize-panes off \; display "Synchronization OFF"
Now, just access to your remote host via
kyratand run the following:
tmux -f "$TMUX_CONF"
This will open a tmux session and you can now toggle synchronization between panes on the same window with the keys
e/E.
Before installing Kyrat be sure that all dependencies are properly installed in your system. The Kyrat dependencies are the following:
Assuming all Kyrat dependencies are properly installed in the system, to install Kyrat run the following:
sh git clone https://github.com/fsquillace/kyrat ~/.local/share/kyrat export PATH=$PATH:~/.local/share/kyrat/bin
In order to install all Kyrat dependencies, you first need to install Homebrew.
To install all the needed dependencies via Homebrew:
sh brew update brew install bash coreutils
Once all Kyrat dependencies are properly installed in the system, to install Kyrat run the following:
sh git clone https://github.com/fsquillace/kyrat ~/.local/share/kyrat export PATH=$PATH:~/.local/share/kyrat/bin
This section has been left blank intentionally. It will be filled up as soon as troubles come in!
You could help improving Kyrat in the following ways:
To sustain the project please consider funding by donations through the GitHub Sponsors page.
Kyrat was originally created in April 2014 by Filippo Squillace ([email protected]).
Here is a list of really appreciated contributors!
Consider your origins: You were not born to live like brutes but to follow virtue and knowledge. [verse, Dante Alighieri, from Divine Comedy]