#!/usr/bin/env ruby require 'rbpw' require 'thor' module Rbpw class CLI < Thor desc "new [item]", "add new your id & password set with key item" def new(name) puts "What's your id?" id = "#{$stdin.gets.chomp!}" puts "What's your pw? " pw = "#{$stdin.gets.chomp!}" save_pw(new_pw(name, id, pw)) end desc "list", "show site_name" def list show_list end desc "update [item]", "update items id or password" def update show_list end desc "delete [item]", "delete item" def delete(item) delete_item(item) end desc "copy [item] [id or pw]", "copy item" def cp(item, value) clip_board_copy(item, value) end end end