Project

cow

0.0
Low commit activity in last 3 years
No release in over a year
Ease to connect console server ports
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2.33
~> 12.3.3

Runtime

>= 0
 Project Readme

Cow

Cow - console server wrapper.

Installation

gem install cow

sudo cow add [hostname] [type] [community]

Usage

Type cow. Then you can see usage.

cow update should be run periodically.

Example

$ cow list
SERVER/PORT                    PORTNAME             COMMAND
console.local/1                tokyo-core01         ssh -l kazubu:7001 console.local
console.local/2                tokyo-core02         ssh -l kazubu:7002 console.local
console.local/3                tokyo-sw01           ssh -l kazubu:7003 console.local
console.local/4                tokyo-sw02           ssh -l kazubu:7004 console.local
console.local/5                tokyo-serv01         ssh -l kazubu:7005 console.local
console.local/6                tokyo-serv02         ssh -l kazubu:7006 console.local
console.local/7                tokyo-serv03         ssh -l kazubu:7007 console.local

$ cow find core
SERVER/PORT                    PORTNAME             COMMAND
console.local/1                tokyo-core01         ssh -l kazubu:7001 console.local
console.local/2                tokyo-core02         ssh -l kazubu:7002 console.local

$ cow connect tokyo-core01
Found on console.local/1. Connecting...
Password:

tokyo-core01 (ttyd0)

login: 

Pico integration with Zsh

In .zshrc:

function peco-select-console() {
  BUFFER=$(cow list | \
           peco --query "$LBUFFER" | \
           awk 'BEGIN{FS=" "}{print "cow c "$2}')
  CURSOR=$#BUFFER
  zle clear-screen
}

zle -N peco-select-console
bindkey '^xc' peco-select-console

Press Ctrl-X C then you can select a port with interactive filtering.