The interface for your command-line program.


Please declare a @main struct that conforms to CommandInterface. In the structure, a main() method needs to be implemented, which marks as the entry point.

import CommandInterface

private struct Command: CommandInterface {
    func main() throws {
        let value =, prompt: "value")
        print("Read value: \(value)") {

Getting started

In your command-line tool, please include CommandInterface in your target dependency/

In your package, please use the following:

dependencies: [
    .package(url: "")


Some of the functions only show correct output in Terminal, not Xcode.


View Github