All Projects β†’ amaya382 β†’ anyrc

amaya382 / anyrc

Licence: Apache-2.0 license
🐚 Bring your shell environment to anywhere

Programming Languages

shell
77523 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to anyrc

Dot-It-Up
A collection of dotfile scripts, plugins, and clever hacks so that you can become the master of your own OS! πŸš€
Stars: ✭ 254 (+807.14%)
Mutual labels:  vimrc, bashrc, zshrc, tmux-conf
rc.d
πŸ›  My rc files and other configs. Includes: Bash, Zsh, Vim, Tmux, Git, Terminal (macOS), VS Code
Stars: ✭ 32 (+14.29%)
Mutual labels:  vimrc, bashrc, zshrc, tmux-conf
dotfiles
.foos for foos & more
Stars: ✭ 21 (-25%)
Mutual labels:  vimrc, bashrc, tmux-conf
dotfiles
my personal dotfiles managed by dotbot, zinit
Stars: ✭ 65 (+132.14%)
Mutual labels:  vimrc, zshrc, tmux-conf
dotfiles
/home/yous
Stars: ✭ 43 (+53.57%)
Mutual labels:  vimrc, bashrc, zshrc
dotfiles
πŸ€ Vim/Neovim + Tmux + Zsh + Alacritty = Build your own fantastic development environment
Stars: ✭ 65 (+132.14%)
Mutual labels:  vimrc, zshrc, tmux-conf
dotfiles
πŸ“‘ .dotfiles for Bash (Linux) / ZSH (Linux) / Git Bash (Windows) / Cygwin (Windows) / Bash on Ubuntu on Windows
Stars: ✭ 175 (+525%)
Mutual labels:  vimrc, bashrc, zshrc
dotfiles
There is no place like ~/
Stars: ✭ 19 (-32.14%)
Mutual labels:  vimrc, bashrc, tmux-conf
dotfiles
My dotfiles
Stars: ✭ 22 (-21.43%)
Mutual labels:  vimrc, zshrc, tmux-conf
dotfiles
personal dotfiles with stow
Stars: ✭ 16 (-42.86%)
Mutual labels:  vimrc, bashrc, tmux-conf
dotfiles
A total nord dotfiles used by me. Forever work in progress.
Stars: ✭ 35 (+25%)
Mutual labels:  vimrc, bashrc, zshrc
Dotfiles
My configurations and scripts
Stars: ✭ 82 (+192.86%)
Mutual labels:  vimrc, zshrc
Dotfiles
My configuration files
Stars: ✭ 89 (+217.86%)
Mutual labels:  vimrc, zshrc
Dotfiles
⚑️ Awesome configurations for the development environments
Stars: ✭ 137 (+389.29%)
Mutual labels:  vimrc, zshrc
Dotfiles
Hack away :)
Stars: ✭ 78 (+178.57%)
Mutual labels:  vimrc, zshrc
dotfiles
My amazing vim, zsh and tmux config files
Stars: ✭ 25 (-10.71%)
Mutual labels:  vimrc, zshrc
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+3417.86%)
Mutual labels:  vimrc, zshrc
terminal-themes
rc files for vim, tmux, iterm and zsh
Stars: ✭ 18 (-35.71%)
Mutual labels:  vimrc, zshrc
dotfiles
My personal monorepo: dotfiles, /etc-files, single-file scripts, vim plugins, webexts/userscripts, xmonad config, all that stuff…
Stars: ✭ 84 (+200%)
Mutual labels:  vimrc, bashrc
listbox
πŸ’¬ listbox element for bash
Stars: ✭ 44 (+57.14%)
Mutual labels:  bashrc, zshrc

🐚 anyrc

Bring your .bashrc, .zshrc, .vimrc, etc. into any remote environments, such as ssh, docker container (docker run / docker exec / kubectl exec), and another user (su).

πŸ”œ Usage

Just use *rc commands instead of original commands

  • sshrc xxx instead of ssh xxx
  • surc xxx instead of su xxx
    • e.g., surc foo
  • dockerrc exec -it xxx instead of docker exec -it xxx
    • e.g., dockerrc exec -it foo_running_container bash
  • dockerrc run -it xxx instead of docker run -it xxx
    • e.g., dockerrc run -it foo_image bash
  • kubectlrc exec -it xxx instead of kubectl exec -it xxx
    • e.g., kubectlrc exec -it foo_running_pod -- zsh

Note: Incompatible subcommands (e.g., ps for dockerrc) will be passed to the original command (i.e., docker ps will be executed).

Setup/Upgrade

# If you want to install the latest version, change version to master in the url and set VERSION
# VERSION: anyrc version (default: same as install script version)
# DIR: Where to install (default: /usr/local/bin)
# FORCE: If defined, override .anyrc (default: undefined)
## default installation example
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/0.1.0/install.sh | bash
## fully-customized installation example
curl -sS https://raw.githubusercontent.com/amaya382/anyrc/master/install.sh | VERSION=master DIR=~/.local/bin FORCE=1 bash

# Put your dotfiles or create symlinks of them into $HOME/.anyrc.d
ln -s /path/to/your/dotfiles/.somedotfile $HOME/.anyrc.d/.somedotfile

See example as well.

More options

  • ANYRC_DANYRC: Path to .anyrc. Default is in home dir or curr dir
  • ANYRC_DANYRCD: Path to .anyrc.d. Default is in home dir or curr dir
  • ANYRC_SSH_CMD: ssh command, i.e., you can use autossh instead
  • ANYRC_DOCKER_WO_TAR: If set, will work w/o tar on dockerrc
  • ANYRC_K8S_WO_TAR: If set, will work w/o tar on kubectlrc
  • ANYRC_WO_TAR: If set, will work w/o tar on any remote environment
# sshrc will use autossh internally
ANYRC_SSH_CMD=autossh sshrc user@host

Customize

Config files

  • .anyrc: Pre-configured for zsh, bash, tmux, git, and vim. If you want to support other tools, edit me.
  • .anyrc.d/*: Dotfiles you want to bring into remote. Symlinks are allowed.

Available environment variables (in .anyrc and .anyrc.d/*)

  • ANYRC_ENV: Show remote environment (ssh/su/docker/k8s)
  • ANYRC_ROOT: Path to tmp dir including all anyrc-related files each connection
  • ANYRC_HOME: Path to dir for dotfiles
  • ANYRC_DANYRC: Path to .anyrc
  • ANYRC_DANYRCD: Path to .anyrc.d

Examples

See example

Completion

zsh

compdef dockerrc=docker
compdef kubectlrc=kubectl

πŸ”± Features

Supported remote environments

  • ssh
    • Attach w/ a login shell
  • docker run
    • Attach w/ a specified shell
  • docker exec
    • Attach w/ a specified shell
  • kubectl exec
    • Attach w/ a specified shell
  • su (work w/ sudo)
    • Attach w/ a login shell

Supported tools

  • zsh
  • bash
  • tmux
  • vim
  • git
  • etc. (can support other tools by editing .anyrc)

πŸ™‡ Acknowledgement

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].