init creates a new project definition in the selected directory. It does not start the application or configure production servers. After init, you can define the model in the UI or CLI and obtain source files later through Generate.
Create a project without a dialog
admingen-cli --path ./docs-demo init \
--name docs-demo --title "База знаний" \
--module example.com/docs-demo --generator-version 0.8.1 \
--deployment --ci-provider gitlab --media-storage local
The example enables deployment and GitLab CI: their files appear after Generate. Omit these parameters for a simple local project. Choosing s3 instead of local sets the media storage type; access secrets are not supplied at this stage.
In interactive mode, init suggests values and asks for confirmation. In a script, pass required parameters explicitly and stop subsequent actions on an error. Without a TTY, the command must not wait for an answer forever.
Do not confuse the two kinds of module: example.com/docs-demo is the Go module path for the entire application, while content is an entity group in navigation that you create separately.
Open a project in the browser
admingen-cli --path ./docs-demo doctor
admingen --path ./docs-demo start --addr 127.0.0.1:8080 --open=false
doctor helps check that the correct directory is selected. With --open=false, open the browser yourself at the address in the command or output. For a local API without an embedded page, use admingen-cli ... serve.
If the port is occupied, stop the previous process or select another port. This is the generator's port, not the generated application's backend port.
Changes in Project settings and Deployment save settings in the manifest. Selecting a CI provider does not create a remote repository. Files update only through Generate. An old project contract is rejected before mutation; changing a version number alone does not upgrade a project.
Available commands
| Command | Invocation |
|---|---|
doctor |
admingen-cli doctor [flags] |
init |
admingen-cli init [flags] |
serve |
admingen-cli serve [flags] |
start |
admingen start [flags] |
ui |
admingen ui [flags] |
Global --path, --output and --help are described in CLI basics. Replace angle-bracket arguments with your own values.
Init and startup parameters
| Parameter | Used by | Default | Meaning |
|---|---|---|---|
--ci-provider VALUE |
init |
empty string | Choose CI: none, gitlab or github. None keeps manual release through deploy/control. |
--deployment |
init |
false | Enable server-deployment files; CI files are created only for the selected GitLab/GitHub provider. |
--generator-version VALUE |
init |
binary build version (dev in a build without a specified version) |
The generatorVersion value in the manifest. The example sets0.8.1; this is not a command for upgrading an old contract. |
--media-storage VALUE |
init |
"local" | Image storage: local is the application filesystem; s3 is object storage. Access keys are configured when starting the application. |
--module VALUE |
init |
empty string | For init, the Go module path; for an entity/projection, an existing navigation module. In update, moves the item. |
--name VALUE |
init |
empty string | Technical name of the new project. |
--title VALUE |
init |
empty string | A human-readable project or field title. |
--addr VALUE |
serve, start, ui |
"127.0.0.1:8080" | Local HTTP server address and port. |
--open |
start, ui |
true | Open the browser after the server is ready. |
Use start for new commands: ui remains as a deprecated compatibility alias. start accepts a loopback address. To avoid clarification prompts, pass --path, --addr and --open explicitly as in the example.
What init does with Git
After successfully creating the model, the generator checks whether the directory is already in a Git repository. If it is, no nested repository is created. Otherwise, it runs git init.
A Git failure is shown as a warning and does not undo the created manifest. The generator does not stage files, create a commit or configure a remote.
The current project and lock contract is 0.8.1. --generator-version writes a version into the model and does not migrate an old contract. Change subsequent settings in Project settings or the manifest, checking them through plan.
Deployment without mandatory CI or registry
For a manual build on one VPS, create a project as follows:
admingen-cli --path ./example-project init --name example_project --module example.com/example-project --deployment --ci-provider none --server-layout single --delivery source --backup local --media-storage local
| Init parameter | Values |
|---|---|
--server-layout |
single, split |
--delivery |
source, archive, registry |
--backup |
none, local, s3 |
--registry-provider |
custom, gitlab, ghcr, dockerhub |
--backend-repository, --admin-repository, --ops-repository |
Full repositories for three images on one registry host |
Source is allowed for single and CI provider none. Archive/registry support single/split and manual release or CI. Passwords, SSH keys and S3 access parameters are not supplied through init. After init, open Deployment → Deployment environments, create a profile with domains and paths, save it and run Generate. JSON examples remain an alternative for manually managing configuration. Having files does not mean the application has been deployed.