1DUNE-INIT(1)                      Dune Manual                     DUNE-INIT(1)
2
3
4

NAME

6       dune-init - Command group for initializing Dune components.
7

SYNOPSIS

9       dune init proj NAME [PATH] [OPTION]...
10       dune init exec NAME [PATH] [OPTION]...
11       dune init lib NAME [PATH] [OPTION]...
12       dune init test NAME [PATH] [OPTION]...
13

DESCRIPTION

15       dune init COMPONENT NAME [PATH] [OPTION]... initializes a new dune
16       configuration for a component of the kind specified by the subcommand
17       COMPONENT, named NAME, with fields determined by the supplied OPTIONs.
18
19       Run a subcommand with  --help for for details on it's supported
20       arguments
21
22       If the optional PATH is provided, the component will be created there.
23       Otherwise, it is created in the current working directory.
24
25       Any prefix of a COMMAND's name can be supplied in place of full name
26       (as illustrated in the synopsis).
27
28       For more details, see
29       https://dune.readthedocs.io/en/stable/usage.html#initializing-components
30

COMMANDS

32       executable [OPTION]… NAME [PATH]
33           A binary executable.
34
35       library [OPTION]… NAME [PATH]
36           An OCaml library.
37
38       project [OPTION]… NAME [PATH]
39           A project is a predefined composition of components arranged in a
40           standard directory structure. The kind of project initialized is
41           determined by the value of the --kind flag and defaults to an
42           executable project, composed of a library, an executable, and a
43           test component.
44
45       test [OPTION]… NAME [PATH]
46           A test harness. (For inline tests, use the --inline-tests flag
47           along with the other component kinds.)
48

COMMON OPTIONS

50       --help[=FMT] (default=auto)
51           Show this help in format FMT. The value FMT must be one of auto,
52           pager, groff or plain. With auto, the format is pager or plain
53           whenever the TERM env var is dumb or undefined.
54
55       --version
56           Show version information.
57

EXIT STATUS

59       init exits with the following status:
60
61       0   on success.
62
63       1   if an error happened.
64
65       130 if it was interrupted by a signal.
66

EXAMPLES

68       1.  Generate a project skeleton for an executable named `myproj' in a
69           new directory named `myproj', depending on the bos library and
70           using inline tests along with ppx_inline_test:
71
72             dune init proj myproj --libs bos --ppx ppx_inline_test --inline-tests
73
74       2.  Configure an executable component named `myexe' in a dune file in
75           the current directory:
76
77             dune init exe myexe
78
79       3.  Configure a library component named `mylib' in a dune file in the
80           ./src directory depending on the core and cmdliner libraries, the
81           ppx_let and ppx_inline_test preprocessors, and declared as using
82           inline tests:
83
84             dune init lib mylib src --libs core,cmdliner --ppx ppx_let,ppx_inline_test --inline-tests
85
86       4.  Configure a test component named `mytest' in a dune file in the
87           ./test directory that depends on `mylib':
88
89             dune init test mytest test --libs mylib
90

SEE ALSO

92       dune(1)
93
94
95
96Dune n/a                                                          DUNE-INIT(1)
Impressum