module ArchSpec::CLI
The archspec command line. Backs the exe/archspec executable and dispatches the init, check, explain, and version subcommands.
archspec init archspec check [PATHS...] [--config PATH] [--format text|json] [--update-todo] archspec explain PATH_OR_CONSTANT
run returns the process exit status: 0 when clean, 1 when violations are found.
Constants
- CONFIG_FILE
- TEMPLATE
Public Instance Methods
# File lib/archspec/cli.rb, line 23 def run(argv, output: $stdout, error: $stderr) argv = argv.dup command = argv.shift || 'check' case command when 'init' init(argv, output) when 'check' check(argv, output) when 'explain' explain(argv, output) when 'version', '--version', '-v' output.puts ArchSpec::VERSION 0 else error.puts "Unknown command: #{command}" error.puts usage 64 end rescue Error => e error.puts e.message 1 end