mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 17:49:37 +00:00
41 lines
895 B
Plaintext
41 lines
895 B
Plaintext
---
|
|
sidebar_label: Project commands (new, init)
|
|
---
|
|
|
|
# Project Commands
|
|
|
|
## `dcr new \<name>`
|
|
|
|
Creates a new project with a standard structure and `dcr.toml`. The `name` argument is required.
|
|
|
|
Only ASCII letters, digits, underscores `_` and hyphens `-` are allowed in the project name.
|
|
|
|
```bash
|
|
dcr new my-app
|
|
dcr new my-app --vcs none
|
|
```
|
|
|
|
Flags:
|
|
|
|
* `--vcs \<git|none>` — Initialize version control system (defaults to `git` if available, or `none`).
|
|
|
|
Generates:
|
|
|
|
* `dcr.toml` with basic fields
|
|
* `src/main.c` with a `main` template
|
|
|
|
## `dcr init`
|
|
|
|
Initializes a DCR project in the current (empty) directory.
|
|
|
|
```bash
|
|
dcr init
|
|
dcr init --vcs none
|
|
```
|
|
|
|
Flags:
|
|
|
|
* `--vcs \<git|none>` — Initialize version control system (defaults to `git` if available, or `none`).
|
|
|
|
The project name is taken from the current directory name. The directory name must follow the same naming rules as `dcr new`.
|