Skip to content

bastienleonard/hutte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Hutte

A super simple and flexible Ruby DSL for writing scripts that execute on remote servers, through SSH. This is useful for automating various tasks, such as deployments.

Hutte aims to be a sort of port of Fabric. As such, its API is very close.

This is currently in alpha stage, I'm mostly experimenting and trying to see what's the best way to provide this kind of API in Ruby. However, I maintain a stable branch in an attempt to prevent new features from introducing bugs in your projects. Please note that stable is currently massively lagging behind master.

Documentation

Documentation for the master branch is available here: https://bastienleonard.github.io/hutte

Make sure you read the Caveats page!

Bug tracker

https://github.com/bastienleonard/hutte/issues

Example

require 'hutte'

Hutte::SshSession.run('user', 'host') do
  # Execute some local commands, from /tmp
  lcd '/tmp' do
    local 'pwd'
    local 'ls -l'
  end

  # Execute some remote commands, from /home
  cd '/home' do
    run 'pwd'
    run 'ls -l'
  end

  # Use Rsync to synchronize a directory
  rsync(
    remote_dir: '/some/remote/dir',
    local_dir: '/some/local/dir',
    delete: false,
    exclude: %w(test a b c)
  )
end

About

Simple SSH execution in Ruby, heavily based on Python's Fabric

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages