Skip to content

Getting Started with Command

The Command module is provided as a part of Vapor's Console package (vapor/console). This module provides APIs for creating command-line interfaces (CLIs). It's what powers the Vapor Toolbox.


For an in-depth look at all of Command's APIs, check out the Command API docs.


This package is included with Vapor and exported by default. You will have access to all Command APIs when you import Vapor.

import Vapor // implies import Command


The Command module, part of the larger Vapor Console package, can also be used on its own with any Swift project.

To include it in your package, add the following to your Package.swift file.

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "Project",
    dependencies: [
        /// 💻 APIs for creating interactive CLI tools.
        .package(url: "", from: "3.0.0"),
    targets: [
      .target(name: "Project", dependencies: ["Command", ... ])

Use import Command to access the APIs.


Continue to Command → Overview for an overview of Command's features.