local N=require("\046\046\047\099\108\097\112\112\121\046\108\117\097\117")local f=N.command({name="\116\101\115\116";description="\116\101\115\116 \050",parameters={test=N.parameter({position=1,description="\116\101\115\116",type=N.types.number()})},opts={test2=N.opt({description="\116\101\115\116",type=N.types.string()})}},function(N,f)print(N.test)print(f.test2)end);(((((N.cli("\114\097\110\100\111\109\073\068\076")):defineRootCommand(f)):metadata({description="\121\097\121";version="\049\046\048\046\048",author="\102\102\114\111\115\116\102\097\108\108",afterHelp=""})):defineSubcommand(N.command({name="\114\117\110\116\104\105\110\103",description="\082\117\110\115 \116\104\101 \116\104\105\110\103",parameters={first=N.parameter({position=1,description="\102\105\114\115\116\050";type=N.types.string()})},opts={second=N.opt({description="\115\101\099\111\110\100\050";type=N.types.string()})}},function() end))):defineGlobalOpt("\118\101\114\115\105\111\110","\121\101\097\104",function()print("\121\101\097")end)):run()
local clappy = require("../clappy.luau")

local testCommand = clappy.command({
	name = "test",
	description = "test 2",

	parameters = {
		test = clappy.parameter({
			position = 1,
			description = "test",
			type = clappy.types.number(),
		}),
	},

	opts = {
		test2 = clappy.opt({
			description = "test",
			type = clappy.types.string(),
		}),
	},
}, function(parameters, opts)
	print(parameters.test)
	print(opts.test2)
end)

clappy
	.cli("randomIDL")
	:defineRootCommand(testCommand)
	:metadata({
		description = "yay",
		version = "1.0.0",

		author = "ffrostfall",

		afterHelp = "",
	})
	:defineSubcommand(clappy.command({
		name = "runthing",
		description = "Runs the thing",

		parameters = {
			first = clappy.parameter({
				position = 1,
				description = "first2",
				type = clappy.types.string(),
			}),
		},

		opts = {
			second = clappy.opt({
				description = "second2",
				type = clappy.types.string(),
			}),
		},
	}, function() end))
	:defineGlobalOpt("version", "yeah", function()
		print("yea")
	end)
	:run()
