Simple Odin project init from templates
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-27 23:52:55 +00:00
bubbletext formatting changes 2026-09-28 23:48:29 +01:00
templates add missing quartz library for macOS on C raylib template 2026-10-27 23:52:55 +00:00
tools formatting changes 2026-09-28 23:48:29 +01:00
vendoring download straight to pipe rather than buffer 2026-10-27 21:14:19 +00:00
.gitignore change from Makefile to build.odin 2026-09-28 22:13:55 +01:00
ATTRIBUTIONS change raylib c template to makefile and use vendored raylib 2026-10-27 21:04:58 +00:00
LICENSE completed template generator 2026-06-09 18:47:54 +01:00
main.odin small formatting changes 2026-10-27 23:43:58 +00:00
PLANS change from Makefile to build.odin 2026-09-28 22:13:55 +01:00
README change raylib c template to makefile and use vendored raylib 2026-10-27 21:04:58 +00:00

        __                         __
.-----.|  |_.-----.--------.-----.|  |
|  _  ||   _|  -__|        |  _  ||  |
|_____||____|_____|__|__|__|   __||__|
                           |__|

---

Simple personal CLI tool for generating Odin projects from either a Basic
(hello world), Raylib, or Library template. C and Go hello-world projects are
also available with the Basic template. C also supports Raylib, using Make
to link the raylib 6.2 static library downloaded into vendor/ during project
creation.
Both C templates use unity builds: main.c includes the project helper
implementations and is the only application source compiled.

You must have the following CLI tools installed:

 - tar with gzip support for extracting vendored libraries (C Raylib projects)
 - go for "--lang go"
 - jj (Jujutsu VCS) for "--with-jj" flag
 - fj (Forgejo CLI) for "--create-repo" flag

otempl also requires the system libcurl and zlib libraries. The current Linux
build dynamically links libcurl.so.4 and libz.so.1; curl is not statically
bundled. Downloads use libcurl directly, so the curl CLI is not required.
When building from source, install the development packages for libcurl and
zlib as well as the Odin compiler.

To build the project, compile the Odin build script once, then run a target:

 > odin build tools/build.odin -file -out:build
 > ./build build
 > ./build run hello-odin

Other targets are `release`, `debug`, `bubbletext-font`, `install`, and `clean`.
The `install` target writes to `~/.local/bin`.

Usage example:

 > otempl some-game                             \
 >     --type raylib                            \
 >     --description "Description for the game" \
 >     --with-jj                                \
 >     --create-repo

 > otempl hello-c --lang c

 > otempl hello-go --lang go

 > otempl my-game --lang c --type raylib
 > cd my-game
 > make debug
 > make run

The C Raylib template requires GNU Make, a C17 compiler, and platform graphics
development libraries. Project creation downloads the prebuilt raylib release
for Linux amd64/arm64 or macOS into vendor/. Builds use vendor/raylib-* without
further downloads. See the generated README for other build options.