Home Documentation Templates Examples Showcase GitHub
Theme

Start here · 01

Getting started with Nift.

You do not need to learn a framework before you can use Nift. Install the executable, create a tiny project, understand the relationship between content and templates, then choose how much—or how little—Nift you want around the rest of your stack.

The idea in one sentence.

Nift tracks the files you want to build, combines page-specific content with reusable templates/partials, resolves project-aware paths, and rebuilds the outputs affected by your changes.

Before you start

Make sure Nift is installed and visible in your terminal:

nift version

If that command is not available yet, start with the installation guide →.

Your first project in about a minute

nift init

nift init creates a complete barebones HTML project and builds its initial tracked files. Use --ext=.php (or another extension) for a different generic project, or --target=<platform> to initialise a static HTML site prepared for a supported host. You can open the project immediately; there is no package install step required for the Nift layer itself.

Using a coding agent? Make the handover part of initialization.
nift init --handover

This creates the same Nift project plus a root-level HANDOVER.md. Open that directory in your coding agent, have it read the handover, then describe what you want to build. You do not need a special prompt: “Build me a small personal site with Home, About and Projects pages. Use Nift properly and follow HANDOVER.md.” is enough for a useful first experiment.

See the full agent-first workflow →

What Nift creates

content/
  index.html

templates/
  head.html
  template.html
  template.css
  template.js

public/
  index.html
  assets/
    css/
    js/

.nift/
  config.json
  tracked.json

Nift v4 projects use public/ as the default web-facing output directory created by nift init. That keeps generated pages and assets in the convention used throughout these docs and by many deployment platforms.

The project model

1

Tracked name

Nift knows the page/item by a stable name such as /, about or docs/installing.

2

Content

The content file contains what is specific to that page.

3

Template

The template contains the shared document/layout structure.

4

Output

Nift combines them and writes the generated file into the configured output directory.

Content stays ordinary

A page-specific content file can simply be HTML:

<h1>About us</h1>
<p>This markup belongs to this page.</p>

The template owns what repeats

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>$[title]</title>
  </head>
  <body>
    @input('templates/partials/header.html')

    <main>
      @content
    </main>

    @input('templates/partials/footer.html')
  </body>
</html>

@content inserts the current tracked page's content. @input(...) processes and inserts reusable files. That small relationship is the centre of a Nift project.

You can stop here for quite a while.

Add @pathto(...) and these three primitives already cover a surprisingly powerful site architecture. See how far the three-primitives model goes →

Track another page

nift track about "About us"

Nift creates/tracks the corresponding content relationship using the project defaults. Edit the page-specific content, then build:

nift build

With no names supplied, nift build dispatches to the updated-build workflow. During normal development this is usually the command you want: Nift checks what changed and builds affected tracked outputs rather than requiring you to deliberately rebuild everything.

<a href="@pathto('about')">About</a>

<link
  rel="stylesheet"
  href="@pathto('public/assets/css/site.css')">

<img
  src="@pathto('public/assets/images/logo.svg')"
  alt="Site logo">

For tracked names, Nift calculates the correct relative URL from the page being built. For concrete local paths, the target must exist—so a typo can become a build error instead of a broken link or image after deployment.

See why Nift wants to rebuild

nift status

status performs the incremental analysis without writing output. It is useful before a build, while debugging a dependency, and in automation that needs to understand project state.

Choose your starting path

Once Nift is installed, there are three especially easy ways to begin a real project.

Already have a website?

Do not rewrite it just to adopt Nift.

Keep the HTML/CSS/JS you already have. Extract repeated headers, navigation, footers and document structure into templates/partials, keep page-specific markup as content, and preserve the rest of your stack.

See the existing-site migration workflow →

What to learn next

You already know most of what is required.

If you understand HTML files, reusable includes and a build command, the Nift-specific part is intentionally small. Learn additional features when you encounter the problem they solve.