migrate to Ruby and add new `do` command