These docs are new.
Expect rough edges. If something is missing or hard to follow, tell us on Discord or by mail at hallo@knecht.works.
Usage

Projects

Add a project, run it through Knecht, and manage it afterward.

A project is a GitHub repository connected to Knecht, together with what it needs to boot: environment variables, a database dump, and a few settings. This page covers what kind of projects work, how to add one, and what you can do with it afterward.

Supported Stacks

Knecht boots projects with DDEV. These are tested on real projects and run in our test suite:

Any other repository is expected to work too. A .ddev/config.yaml boots from that file as it is, with the framework, PHP version, and database read straight from it.

Without one, Knecht generates an environment from:

  • The PHP version from composer.json.
  • The Node version from .nvmrc, engines.node, a mise config, or .tool-versions.
  • The package manager from the lockfile.
  • The database from the project settings: MariaDB, MySQL, or PostgreSQL in the versions DDEV supports, or none. Without a choice the environment has no database container.
If a project outside the tested list misbehaves, that is a bug worth reporting. One known difference to local DDEV concerns Vite dev servers, which in some setups need one line of config. The cases are collected on Troubleshooting.

Adding a Project

"New project" on the projects page opens a short guided setup. The project is created only at the end.

Connect the Repository

Pick a repository from those the GitHub App is installed on, and a branch. It defaults to the repository's default branch. Runs check out this branch and open pull requests against it. The branch is fixed per project, another branch can be chosen per run.

Set Environment Variables

Paste the project's .env, one KEY=value per line, or skip and add them later. For a project without a ddev config, also pick a database here and upload a dump as .sql, .gz, .zip, .bz2, .xz, .tar, or .mysql.

Values can use $KNECHT_PREVIEW_URL and $KNECHT_DEV_SERVER_URL. Knecht fills them per run, so a variable such as APP_URL=$KNECHT_PREVIEW_URL always points at the current preview. The preview URL also resolves from inside the environment, so a server-rendered frontend that fetches from its own URL reaches itself.

Some systems keep their base URL in the database or content instead, so no env variable can move them to the preview origin. For those, the project settings have a "URL mode" switch, "In database", that makes Knecht rewrite every response instead. WordPress, Shopware, and Magento projects start in that mode automatically.

Set Boot Commands

These commands boot up the preview. Boot commands set up the environment, for example installing dependencies, and the dev server command with its port starts something like Vite for hot reloading.

"Create project" here creates the project with everything set so far.

The done screen offers "Open project", which shows the project page, and "Test boot", which starts a session with a preview right away so you can confirm the project comes up.

Working with a Project

Everything from the guided setup lives in the project settings and can be changed there. "Settings" in the top right of the project page opens them. Beyond the setup values, the settings hold the agent instructions and the Mentions panel, preview access, a link panel for each connected issue tracker, and "Persistent folders" for files that should survive across runs.

To control AI costs per project, a project can use its own AI key or provider. Set it under "Advanced" > "AI connection", see AI Connection per Project.

Was this page helpful?