Core Commands

Each command gets its own subsection with usage, examples, and flags:

Install

Initialize a brand-new Genix project in the current (empty) directory by creating the required folders and configuration files.

genix install

Default Working Directory

  • templates/: Site layouts
  • pages/: Your content files
  • widgets/: Reusable components
  • dist/: Compiled output (build target)
  • includes/: Files to be copied to dist/
  • logs/: Contains log files
  • docs/: Local, versioned documentation
  • config.json: Project configuration (globals, paths, etc)
  • mdgen.sh: Linux script will convert markdown to html

Troubleshooting

  • Command not found: ensure the Genix binary is on your PATH.
  • Permission denied (macOS/Linux): make the binary executable.
  • Non-empty directory: run genix install in a new, empty folder to avoid conflicts.

Compile

The genix compile command is used to build your static site from the source files in your Genix project. When you run this command, Genix will:

1. Clear the distribution directory

Any existing files inside dist/ are deleted to ensure the build starts from a clean state. This prevents old or outdated files from lingering in your published site.

2. Copy include files

Every file and folder inside the includes/ directory is copied to dist/ without modification. The folder and file structure is preserved exactly as it appears in includes/. This is useful for static assets such as images, CSS, JavaScript, or downloadable files.

3. Generate Static Pages

Genix scans the pages/ directory for files with a .html extension. Each file is compiled into the dist/ directory, with the same filename and relative path as in pages/. For example:

pages/about/team.html → dist/about/team.html.

During this step, Genix processes any shortcodes, widgets, or dynamic markup in your HTML, replacing them with the final static content.

After the command finishes, the dist/ directory will contain a complete set of static files ready to upload to any web server or hosting service.

Watch

The watch command continuously monitors your working directory for changes. Whenever you save a file, Genix automatically regenerates the corresponding static files—enabling near-instant live updates during development

http://localhost:8080

By default, the port is set to 8080, but can be customized via the config.json file. The file_index parameter controls which file is served when a directory is requested (default: index.html). The file_404. determins which file is shown when a resource is not found.

"parser": {
  "port_number": "8080",
  "file_index": "index.html",
  "file_404": "404.html"
}

Version

Displays the currently installed version of Genix.

genix version

Output:

Current Genix Version: 1.X.X

Flags

Genix supports several global flags that can be used alongside any command. These allow you to control logging, debugging, and system resource output.

Verbose Mode

genix -v

Enables additional output for debugging and logging purposes. This is useful during development to understand the build process in greater detail.

Debug Mode

genix -d

Enables a dedicated debug channel for logging. This helps keep debug output separate from standard logs, reducing the chance of accidentally including debug messages in release builds. This feature is used by the compiler development team and provides additional feedback on user specific errors.

Memory Usage

genix -memory compile

Displays memory usage statistics in the info logs after the command completes. This can help diagnose performance issues or track resource usage, and is primarily used by the compiler development team.

INFO: Alloc = 0 MiB
INFO: TotalAlloc = 0 MiB
INFO: Sys = 6 MiB
INFO: NumGC = 0
Scroll To Top