Skip to main content

Getting Started in 5 minutes

Its simple, install the CLI into your project or machine, setup the Codegen configuration file to include all the code your heart desire, customize it, and generate it at build time or whenever you feel like it.

Install

Installing the CLI can be done inside a project or within your system.

Package managerMacOS x64MacOS arm64Windows x64Windows x32Linux (Debian)Linux (Others)

NPM

npm install --save-dev @the-codegen-project/cli

npm install -g @the-codegen-project/cli

Yarn

yarn add @the-codegen-project/cli

Pnpm

pnpm add @the-codegen-project/cli

Bun

bun add @the-codegen-project/cli

Download

curl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.x64.pkg

Install

sudo installer -pkg codegen.x64.pkg -target /

Download

curl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.arm64.pkg

Install

sudo installer -pkg codegen.arm64.pkg -target /

Download

curl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.deb

Install

sudo apt install ./codegen.deb

Download

curl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.tar.gz

Install

tar -xzf codegen.tar.gz
ln -s <absolute-path>/bin/codegen /usr/local/bin/codegen

You can find all the possible commands in the usage documentation.

Initialize

Add a configuration file, either manually or through the CLI;

codegen init

Initialize The Codegen Project

Customize it to your heart's desire! Each generator has unique set of options

Integrate

With your configuration file in hand, time to integrate it into your project and generate some code! Checkout all the integrations for inspiration how to do it.

Or manually generate some code;

codegen generate