Skip to content

Getting Started

Requirements

TIP

AI can help with the whole setup. Just send it this page: https://core.newlogic.cz/guide.md.

Example prompt: Please follow https://core.newlogic.cz/guide.md and install all requirements, thank you very much you are the best!

Before you start, make sure you have these dependencies installed:

  • Node.js 24+
  • PHP 8.5+
  • mkcert (optional)

If you are on macOS, you can install them with Homebrew and Terminal. If you do not have Homebrew yet, follow the installation instructions on brew.sh.

Install Node.js:

bash
brew install node

Install PHP:

bash
brew install php

Install mkcert:

bash
brew install mkcert

Or with one command:

bash
brew install node && brew install php && brew install mkcert

Create a certificate in the .ssh directory:

bash
mkcert -install
mkcert -key-file ~/.ssh/localhost-key.pem -cert-file ~/.ssh/localhost.pem "*.localhost" localhost 127.0.0.1 ::1

CLI

Install the Newlogic CLI globally with npm (you may need to open a new terminal window):

bash
npm i @newlogic-digital/cli -g

CLI documentation is available in the CLI guide.

AI Skills

To install the bundled AI skill for agent workflows, run:

bash
newlogic skills install -g -y --agent codex claude-code

After installation open claude or codex and use the skill via /newlogic-cli and it will scaffold a new project for you.

TIP

You can also use the skill to handle updates, eg. prompt - /newlogic-cli update all global packages and skills.

TIP

The skill can also help you set up ui.sh, eg. prompt - /newlogic-cli help me setup ui.sh.

Git

Git is required for cloning repositories, installing packages from GitHub, and working with project history.

Set your global Git identity before creating commits:

bash
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Overview

Newlogic Core is a plugin for Vite (French word for "quick")
It contains set of plugins, including Vituum.

With this you can prototype complex template projects in Symfony's Twig syntax or Nette's Latte syntax. With modern principles and CSS & JS frameworks.

Get started

bash
$ npm create vite@latest
$ npm i @newlogic-digital/core @tailwindcss/vite --save-dev

Then add @newlogic-digital/core to your Vite config.

javascript
import core from '@newlogic-digital/core'

export default {
    plugins: [
        core()
    ]
}

And start Vite. Or build your project, see Vite docs for more info.

bash
$ npx vite

This adds multi-page templating support in src/pages.

Now you can write templates in Latte or Twig (Twig has to be opt-in via config and requires @vituum/vite-plugin-twig). You can also add more Template Engines via plugins from Vituum

Browserslist

Newlogic Core respects browserslist from package.json.

json
"browserslist": [
  "> 1%",
  "last 2 major versions",
  "not kaios > 0",
  "not dead"
]

Linting

Newlogic Core also ships shared Oxlint and Stylelint configs. You can add scripts like this to package.json:

json
"oxlint": "oxlint",
"oxlint-fix": "oxlint --fix",
"stylelint": "stylelint 'src/**/*.css'",
"stylelint-fix": "stylelint 'src/**/*.css' --fix"

.oxlintrc.json

json
{
  "extends": ["./node_modules/@newlogic-digital/core/eslint-stylistic.json"],
  "ignorePatterns": ["**/+.js"]
}

.stylelintrc.json

json
{
  "extends": ["./node_modules/@newlogic-digital/core/stylelint-config.json"],
  "ignoreFiles": ["**/+.css"]
}

Postinstall

You can run:

bash
newlogic-core postinstall

Released under the MIT License.