2015-07-30 11:59:08 +02:00
# The init command
2015-09-24 22:19:14 +02:00
The `init` command is used like this:
2015-07-30 11:59:08 +02:00
```
mdbook init
```
2015-09-24 22:19:14 +02:00
It will create a couple of files and directories in the working directory so that you can
2015-07-30 11:59:08 +02:00
spend more time writing your book and less setting it up.
The files set up for you are the following:
2015-09-24 22:19:14 +02:00
2015-07-30 11:59:08 +02:00
```
book-test/
├── book
└── src
├── chapter_1.md
└── SUMMARY.md
```
The `src` directory is were you write your book in markdown. It contains all the source files,
configuration files, etc.
The `book` directory is where your book is rendered. All the output is ready to be uploaded
2015-09-24 22:19:14 +02:00
to a server to be seen by the internet.
The `SUMMARY.md` file is the most important file, it's the skeleton of your book and is discussed in more detail in another [chapter ](../format/summary.html ).
2015-07-30 11:59:08 +02:00
2015-09-24 22:19:14 +02:00
When a `SUMMARY.md` file already exists, the `init` command will generate the files according to the paths used in the `SUMMARY.md`
2015-07-30 11:59:08 +02:00
#### Specify a directory
2015-09-24 22:19:14 +02:00
When using the `init` command, you can also specify a directory, instead of using the current working directory,
2015-07-30 11:59:08 +02:00
by appending a path to the command:
```
mdbook init path/to/book
```
2015-08-11 22:55:51 +02:00
## --theme
2015-08-11 17:15:54 +02:00
When you use the `--theme` argument, the default theme will be copied into a directory
called `theme` in your source directory so that you can modify it.
The theme is selectively overwritten, this means that if you don't want to overwrite a
specific file, just delete it and the default file will be used.