Class: Vaultez::CLI
- Inherits:
-
Thor
- Object
- Thor
- Vaultez::CLI
- Defined in:
- lib/vaultez/cli.rb
Instance Method Summary collapse
- #__version ⇒ Object
- #config ⇒ Object
- #fetch ⇒ Object
- #help(command = nil, subcommand: false) ⇒ Object
- #login ⇒ Object
- #logout ⇒ Object
Instance Method Details
#__version ⇒ Object
81 82 83 |
# File 'lib/vaultez/cli.rb', line 81 def __version puts "vaultez-cli #{Vaultez::VERSION}" end |
#config ⇒ Object
78 |
# File 'lib/vaultez/cli.rb', line 78 def config; super; end |
#fetch ⇒ Object
68 |
# File 'lib/vaultez/cli.rb', line 68 def fetch; super; end |
#help(command = nil, subcommand: false) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/vaultez/cli.rb', line 85 def help(command = nil, subcommand: false) if command super else puts "Vaultez CLI — secure secret management from your terminal" puts puts "Usage: vaultez <command> [options]" puts puts "Commands:" puts " login Authenticate with email, password, and 2FA code" puts " logout Revoke the current session token" puts " fetch Fetch secrets from a project" puts " config Set default company or token" puts " help Show help for any command" puts puts "Options:" puts " --version Show the installed CLI version" puts puts "Examples:" puts " vaultez login" puts " vaultez fetch --project=\"Backend\"" puts " vaultez fetch --project=\"Backend\" --secret=\"DATABASE_URL\"" puts " VAULTEZ_TOKEN=\"vz_...\" vaultez fetch" puts " VAULTEZ_TOKEN=\"vz_...\" vaultez fetch --secret=\"DATABASE_URL\"" end end |
#login ⇒ Object
26 |
# File 'lib/vaultez/cli.rb', line 26 def login; super; end |
#logout ⇒ Object
35 |
# File 'lib/vaultez/cli.rb', line 35 def logout; super; end |