Skip to main content

init

This document provides an overview of the commands and options available under buck2 init.

buck2 init​

Initialize a buck2 project

Usage: buck2 init [OPTIONS] [PATH]

Arguments:​

  • <PATH> The path to initialize the project in. The folder does not need to exist

    • Default value: .

Common Options:​

Common options are documented on the Common Options page.

Options:​

  • --no-prelude Don't include the standard prelude or generate toolchain definitions

  • --allow-dirty Initialize the project even if the git repo at [PATH] has uncommitted changes

  • --git Also initialize a git repository at the given path, and set up an appropriate .gitignore file

  • --template <TEMPLATE> The sample project to write next to the configuration

    • Default value: genrule
    • Possible values:
      • genrule: A genrule that writes a file
      • kotlin: A Kotlin library and a java_binary that runs it. Needs a JDK
      • android: An Android app written in Kotlin. Needs a JDK and the Android SDK