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       123 on indiscriminate errors reported on standard error.
64
65       124 on command line parsing errors.
66
67       125 on unexpected internal errors (bugs).
68

EXAMPLES

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

SEE ALSO

94       dune(1)
95
96
97
98Dune n/a                                                          DUNE-INIT(1)
Impressum