github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/job/init.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: job init' 4 description: | 5 The job init command is used to generate a skeleton jobspec template. 6 --- 7 8 # Command: job init 9 10 **Alias: `nomad init`** 11 12 The `job init` command creates an example [job specification][jobspec] in the 13 current directory that demonstrates some common configurations for tasks, task 14 groups, runtime constraints, and resource allocation. 15 16 ## Usage 17 18 ```plaintext 19 nomad job init [options] [filename] 20 ``` 21 22 You may optionally supply a filename for the example job to be written to. The 23 default filename for the generated file is "example.nomad". 24 25 Please refer to the [jobspec] and [drivers] pages to learn how to customize the 26 template. 27 28 ## Init Options 29 30 - `-short`: If set, a minimal jobspec without comments is emitted. 31 - `-connect`: If set, the jobspec includes Consul Connect integration. 32 33 ## Examples 34 35 Generate an example job file: 36 37 ```shell-session 38 $ nomad job init 39 Example job file written to example.nomad 40 ``` 41 42 [jobspec]: /docs/job-specification 'Nomad Job Specification' 43 [drivers]: /docs/drivers 'Nomad Task Drivers documentation'