GithubHelp home page GithubHelp logo

mikalv / kyrat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fsquillace/kyrat

0.0 2.0 0.0 72 KB

SSH wrapper script that brings your dotfiles always with you on Linux and OSX

License: GNU General Public License v2.0

Shell 100.00%

kyrat's Introduction

kyrat

Kyrat - An ssh wrapper script that brings your dotfiles always with you on Linux and OSX

Project Status Communication
Build status Join the gitter chat at https://gitter.im/fsquillace/kyrat

Table of Contents

Description

kyrat is a ssh wrapper that allows to source local dotfiles on a ssh session to a remote host. It works either from/to a Linux or OSX machine.

kyrat transfers the content of a bash user-defined module (located in either ~/.config/kyrat/bashrc or in the directory ~/.config/kyrat/bashrc.d/) to the remote host and open a bash session by sourcing the transferred modules.

Similarly, kyrat can transfer inputrc files (located in either ~/.config/kyrat/inputrc or inside the directory ~/.config/kyrat/inputrc.d/) and vimrc files (located in either ~/.config/kyrat/vimrc or inside the directory ~/.config/kyrat/vimrc.d/).

Quickstart

Bash

Write locally in either ~/.config/kyrat/bashrc or any files inside ~/.config/kyrat/bashrc.d/:

alias q=exit

function 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 u

myserver.com $> q
exit

Or even inline:

$> kyrat [email protected] -- processorof feel

Vim

Write locally in either ~/.config/kyrat/vimrc or any files inside ~/.config/kyrat/vimrc.d/:

nnoremap <silent> <Leader>e :Explore<CR>

Now, just access to your remote host via kyrat, run vim and you will have the shortcut \e for running the vim file explorer.

Inputrc

Write locally in either ~/.config/kyrat/inputrc or any files inside ~/.config/kyrat/inputrc.d/:

set completion-ignore-case On

Now, just access to your remote host via kyrat and the terminal will have case insensitive tab completion.

Comparison with sshrc

sshrc is a program that performs a similar task as Kyrat. Despite its popularity, at the time of writing, there are significant drawbacks on using sshrc.

The following table shows the comparison between Kyrat and sshrc:

Dotfile types supported Platform Unit tests Integration tests Compression Portability Default remote shells Automatic removal of the remote dotfiles Remote dotfiles location
Kyrat bash, vim, inputrc Linux, OSX YES YES YES Small number of coreutils executables required ANY YES /tmp and fallback to $HOME
sshrc bash (the rest requires additional work) Unknown NO NO YES Big number of executables required (tar, awk, openssl, and more) bash only YES /tmp only

Installation

Dependencies

Before installing Kyrat be sure that all dependencies are properly installed in your system. The Kyrat dependencies are the following:

Linux

Assuming all Kyrat dependencies are properly installed in the system, to install Kyrat run the following:

    git clone https://github.com/fsquillace/kyrat ~/.local/share/kyrat
    export PATH=$PATH:~/.local/share/kyrat/bin

OSX

In order to install all Kyrat dependencies, you first need to install Homebrew.

To install all the needed dependencies via Homebrew:

brew update
brew install coreutils

Once all Kyrat dependencies are properly installed in the system, to install Kyrat run the following:

    git clone https://github.com/fsquillace/kyrat ~/.local/share/kyrat
    export PATH=$PATH:~/.local/share/kyrat/bin

Troubleshooting

This section has been left blank intentionally. It will be filled up as soon as troubles come in!

Contributing

You could help improving Kyrat in the following ways:

Authors

Last words

Consider your origins:
You were not born to live like brutes
but to follow virtue and knowledge.
[verse, Dante Alighieri, from Divine Comedy]

kyrat's People

Contributors

fsquillace avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.