> For the complete documentation index, see [llms.txt](https://shiva.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shiva.gitbook.io/project/shiva/tutorial/how-to-create-a-project-through-the-cli-tools-and-build-it.md).

# How to create a project through the CLI tools and build it

## Using the CLI

### Prerequisites

* You should install shiva with **vcpkg** or with a regular installation before following this tutorial.
* **VCPKG\_ROOT** env variable set to the root directory of your installation of VCPKG
* **Python 3.6**

## Create a project and build it

### If you use VCPKG:

#### Windows

Open powershell and type:&#x20;

```bash
cd "$($env:VCPKG_ROOT)/installed/x64-Windows/share/shiva/tools"
##! syntax
./cli_shiva.py --project_name project_name --project_renderer renderer_name --output_directory path
##! for example
./cli_shiva.py --project_name bomberman --project_renderer sfml --output_directory D:/game_project/bomberman

cd D:/game_project/bomberman
mkdir build
cd build
##! Replace Release by Debug if you prefer Debug
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE="$($env:VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
```

**Linux or OSX**

Open bash and type:

```bash
##! Linux
cd $VCPKG_ROOT/installed/x64-linux/share/shiva/tools

##! OSX
cd $VCPKG_ROOT/installed/x64-osx/share/shiva/tools

##! syntax
./cli_shiva.py --project_name project_name --project_renderer renderer_name --output_directory path
##! for example
./cli_shiva.py --project_name bomberman --project_renderer sfml --output_directory ~/Documents/bomberman

cd ~/Documents/bomberman
mkdir build
cd build

##! Linux (Replace Release by Debug if you need)
cmake -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_C_COMPILER=gcc-8 ..

##! OSX (Replace Release by Debug if you need)
cmake -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..

make
```

### Run the binary

```bash
cd bin 
./bomberman
```

You should see a window appear, you can leave with escape

![](/files/-LJw4BXvjgPOufgwMkCR)

{% hint style="warning" %}
This entire tutorial used the **sfml** rendering module, but when other module will be available you can replace **sfml** with what you want, **Ogre**, **SDL2**, **Vulkan**, **bgfx**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://shiva.gitbook.io/project/shiva/tutorial/how-to-create-a-project-through-the-cli-tools-and-build-it.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
