Skip to content

juliend2/toi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toi

toi is a command line utility and tcl DSL that helps you write scripts to interact with remote servers via SSH.

Example

Put this into your toi.tcl file:

set host "user@myserverhost.com"

proc deploy {} {
  ssh "git pull origin master"
}

(Note: toi.tcl must be executable)

And on in the command line:

toi deploy

Installation

  1. cd ~/bin (or somewhere else)
  2. git clone git://github.com/juliend2/toi.git
  3. now add this line to your .bashrc file: export PATH=$PATH:~/bin/toi/bin
  4. source ~/.bashrc

Available commands

  1. ssh: execute the specified $command remotely, on the $host specified in the toi.tcl file.
  2. in: changes the current $directory on the remote host, for the commands executed in the $body block.
  3. local: execute a $command locally.
  4. rsync: use rsync to synchronize the $src directory with the $target directory. Optionally accepts rsync-compatible $options.
  5. scp: use scp to synchronize the $src directory with the $target directory. Optionally accepts scp-compatible $options.

Changelog

0.5.2

  • catch standard errors in ssh command

0.5.1

  • add some example 'toi' files
  • modified the directory structure to add bin/ and lib/

0.5

  • initial (working) version.

To do

  • write some tests
  • write more comments

About

toi is a command line tool for automating SSH tasks

Resources

Stars

Watchers

Forks

Packages

No packages published