Skip to content

Clone a Starter Application

This guide walks you through getting started with Viaduct by cloning the CLI starter — the smallest starter application. We use it because it's quick to clone, has no web framework to set up, and exercises the same core Viaduct APIs you'd use in a full server.

Run the CLI starter

Make a local clone of the CLI starter:

git clone https://github.com/viaduct-dev/cli-starter.git

cd into the clone and verify your environment:

./gradlew test

Gradle should report that the build was successful.

Although Viaduct is typically hosted in a web server, the CLI starter calls it directly from the application's main function so the example stays small. Run a query through Gradle:

./gradlew -q run --args="'{ greeting }'"

The starter ships with a tiny schema:

type Query {
   greeting: String @resolver
   author: String @resolver
}

Any query that's valid against this schema can be passed via --args.

Other starter applications

Besides the CLI starter, github.com/viaduct-dev hosts several framework-specific starters:

Pick the one that matches your target framework. Each repo's README has its own setup steps.

What's Next

Continue to Touring the Application to understand the structure of a Viaduct application.