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

NAME

6       dune - composable build system for OCaml
7

SYNOPSIS

9       dune build [--watch]
10       dune runtest [--watch]
11       dune exec NAME
12       dune utop [DIR]
13       dune install
14       dune init project NAME [PATH] [--libs=l1,l2 --ppx=p1,p2 --inline-tests]
15

DESCRIPTION

17       Dune is a build system designed for OCaml projects only. It focuses on
18       providing the user with a consistent experience and takes care of most
19       of the low-level details of OCaml compilation. All you have to do is
20       provide a description of your project and Dune will do the rest.
21
22       The scheme it implements is inspired from the one used inside Jane
23       Street and adapted to the open source world. It has matured over a long
24       time and is used daily by hundreds of developers, which means that it
25       is highly tested and productive.
26

COMMAND ALIASES

28       promote [OPTION]… [FILE]…
29           An alias for promotion apply.
30
31       test [OPTION]… [DIR]…
32           An alias for runtest.
33

COMMANDS

35       build [OPTION]… [TARGET]…
36           Build the given targets, or all installable targets if none are
37           given.
38
39       cache COMMAND …
40           Manage the shared cache of build artifacts
41
42       clean [OPTION]…
43           Clean the project.
44
45       coq COMMAND …
46           Command group related to Coq.
47
48       describe [OPTION]… [STRING]…
49           Describe the workspace.
50
51       diagnostics [OPTION]…
52           fetch and return errors from the current build
53
54       exec [OPTION]… PROG [ARGS]…
55           Execute a command in a similar environment as if installation was
56           performed.
57
58       external-lib-deps [OPTION]… [TARGET]…
59           Removed command.
60
61       fmt [OPTION]…
62           Format source code.
63
64       format-dune-file [--dune-version=VERSION] [OPTION]… [FILE]
65           Format dune files
66
67       help [--build-info] [--man-format=FMT] [OPTION]… [TOPIC]
68           Additional Dune help
69
70       init COMMAND …
71           Command group for initializing dune components
72
73       install [OPTION]… [PACKAGE]…
74           Install packages.
75
76       installed-libraries [OPTION]…
77           Print out libraries installed on the system.
78
79       internal COMMAND …
80
81
82       ocaml COMMAND …
83
84
85       ocaml-merlin [OPTION]…
86           Start a merlin configuration server
87
88       printenv [OPTION]… [PATH]
89           Print the environment of a directory
90
91       promotion COMMAND …
92           Control how changes are propagated back to source code.
93
94       rpc COMMAND …
95           Dune's RPC mechanism. Experimental.
96
97       rules [OPTION]… [TARGET]…
98           Dump internal rules.
99
100       runtest [OPTION]… [DIR]…
101           Run tests.
102
103       shutdown [OPTION]…
104           cancel and shutdown any builds in the current workspace
105
106       subst [--build-info] [OPTION]…
107           Substitute watermarks in source files.
108
109       top [OPTION]… [DIR]
110           Print a list of toplevel directives for including directories and
111           loading cma files.
112
113       uninstall [OPTION]… [PACKAGE]…
114           Uninstall packages.
115
116       upgrade [OPTION]…
117           Upgrade jbuilder projects to dune
118
119       utop [OPTION]… [DIR] [ARGS]…
120           Load library in utop
121

COMMON OPTIONS

123       These options are common to all commands.
124
125       --help[=FMT] (default=auto)
126           Show this help in format FMT. The value FMT must be one of auto,
127           pager, groff or plain. With auto, the format is pager or plain
128           whenever the TERM env var is dumb or undefined.
129
130       --version
131           Show version information.
132

MORE HELP

134       Use `dune COMMAND --help' for help on a single command.
135

EXIT STATUS

137       dune exits with the following status:
138
139       0   on success.
140
141       123 on indiscriminate errors reported on standard error.
142
143       124 on command line parsing errors.
144
145       125 on unexpected internal errors (bugs).
146

ENVIRONMENT

148       These environment variables affect the execution of dune:
149
150       CLICOLOR
151           If different than 0, ANSI colors are supported and should be used
152           when the program isn’t piped. If equal to 0, don’t output ANSI
153           color escape codes
154
155       CLICOLOR_FORCE
156           If different than 0, ANSI colors should be enabled no matter what.
157

BUGS

159       Check bug reports at https://github.com/ocaml/dune/issues
160

EXAMPLES

162       1.  Initialise a new project named `foo':
163
164             dune init project foo
165
166       2.  Build all targets in the current source tree:
167
168             dune build
169
170       3.  Run the executable named `bar':
171
172             dune exec bar
173
174       4.  Run all tests in the current source tree:
175
176             dune runtest
177
178       5.  Install all components defined in the project:
179
180             dune install
181
182       6.  Remove all build artefacts:
183
184             dune clean
185
186
187
188Dune n/a                                                               DUNE(1)
Impressum