#!/usr/bin/env ruby require_relative "../lib/licensee" path = ARGV[0] || Dir.pwd Licensee.package_manager_files = true project = Licensee::Project.new(path) license = project.matched_file if license puts "Matched file: #{license.path}" puts "License: #{license.match ? license.match.meta['title'] : 'no license'}" puts "Confidence: #{license.confidence}%" puts "Method: #{license.matcher.class}" else puts "Unknown" end