1DUB-INIT(1) The D Language Foundation DUB-INIT(1)
2
3
4
6 dub-init - Initializes an empty package skeleton
7
9 dub init [<directory> [<dependency>...]] OPTIONS... [-- <application
10 arguments...>]
11
13 Initializes an empty package of the specified type in the given direc‐
14 tory.
15
16 By default, the current working directory is used.
17
18
19
20 Custom templates can be defined by packages by providing a sub-package
21 called "init-exec". No default source files are added in this case.
22
23 The "init-exec" subpackage is compiled and executed inside the destina‐
24 tion folder after the base project directory has been created.
25
26 Free arguments "dub init -t custom -- free args" are passed into the
27 "init-exec" subpackage as app arguments.
28
30 -t, --type=VALUE
31 Set the type of project to generate. Available types:
32
33 minimal - simple "hello world" project (default) vibe.d - minimal
34 HTTP server based on vibe.d deimos - skeleton for C header bind‐
35 ings custom - custom project provided by dub package
36
37 -f, --format=VALUE
38 Sets the format to use for the package description file. Possible
39 values:
40 json (default), sdl
41
42 -n, --non-interactive
43 Don't enter interactive mode.
44
46 0 DUB succeeded
47
48 1 usage errors, unknown command line flags
49
50 2 package not found, package failed to load, miscellaneous error
51
53 dub.sdl, dub.json
54
56 Copyright (c) 1999-2023 by The D Language Foundation
57
59 http://code.dlang.org/docs/commandline
60 ⟨http://code.dlang.org/docs/commandline⟩
61
63 dub(1), dub-add(1), dub-convert(1)
64
65
66
67The D Language Foundation 2023-03-23 DUB-INIT(1)