Kitura is a flexible and high-performance web framework that is designed for the cloud. We want to make it as easy as possible for users to build Kitura applications containing advanced features like built-in monitoring. So weâ€™ve created the Kitura command-line interface to simplify the process and help you get your first app running quickly.
The Kitura command-line interface is installed on macOS through the Homebrew package manager. First, add the Swift@IBM tap to your system. This lets Homebrew access our Homebrew packages.
$ brew tap ibm-swift/kitura
Next, install the Kitura command-line interface. This will provide the
$ brew install kitura
Installing the Kitura command-line interface will also install required prerequisites. Once itâ€™s finished youâ€™ll be back at your command prompt. You can check the installation was successful by running the tool to see the usage information.
$ kitura Usage: kitura [options] [command] Kitura command-line interface Options: -V, --version output the version number -h, --help output usage information Commands: build build the project in a local container create interactively create a Kitura project idt install IBM Cloud Developer Tools init scaffold a bare-bones Kitura project kit download the KituraKit zip file run run the project in a local container help [cmd] display help for [cmd]
To get started quickly with Kitura, run the
kitura init command. This will scaffold a basic Kitura project, and create a
Dockerfile so you can build your application inside a Linux container.
For more flexibility, try the
kitura create command instead. This will start an interactive question and answer tool where you can choose what type of Kitura application you want to create, and which features youâ€™d like to include.
Once youâ€™ve run
kitura init or
kitura create, you can open your application in Xcode by running
open ApplicationName.xcodeproj. In Xcode itâ€™s easy to build and run your Kitura application on macOS.
If you want to build your application in a Linux container as well, youâ€™ll need to install the IBM Cloud Developer Tools (IDT) by running
kitura idt. This will install Docker and other common cloud tools, so youâ€™ll be ready to deploy your application to the cloud.
Once youâ€™ve installed IDT, you can build your Kitura application in a Docker container on Linux by running
kitura build, and run it in the container by running
kitura run. This is a great way to test your application on Linux without the overhead of running a full Linux virtual machine on your Mac.
If youâ€™re also building an iOS application to communicate with your Kitura server, have a look at
KituraKit. This is a client library that makes it easy to interface with Kitura. You can download
KituraKit from the command-line by running
kitura kit. This will save a KituraKit.zip file to disk, which you can easily import into your iOS project in Xcode.
||Join the discussion on Slack||Learn more at kitura.io||Star Kitura on GitHub|