-
Notifications
You must be signed in to change notification settings - Fork 2
Project Initialization
make init-bpThis installs all dependencies and runs the interactive project initializer. It is the recommended way to set up a new book project.
Alternatively, step by step:
make lock-install
make init-bpSee the Makefile Overview for all available targets.
You will be prompted to enter:
- Project name (used for folder and export base name)
-
Project description (used in
pyproject.toml) - Book title (used in export metadata)
- Author name (used in export metadata)
- Publication year (default: 2025)
- Language code (default: en)
These values are automatically applied to:
| File | What Gets Updated |
|---|---|
pyproject.toml |
Project name and description |
config/metadata.yaml |
Title, author, description, date, language |
config/init-settings.yaml |
Created with the default project structure (if not present) |
Enter your project name (e.g., 'ai-for-everyone'): my-book
Enter a short description of your project: A journey into friendly AI.
Enter your book title: AI for Everyone
Enter the author's name: Asterios Raptis
Enter publication year [2025]: 2025
Enter language code [en]: en
Result in pyproject.toml:
name = "my-book"
description = "A journey into friendly AI."Result in config/metadata.yaml:
title: "AI for Everyone"
author: "Asterios Raptis"
description: "A journey into friendly AI."
date: "2025"
language: "en"The initializer creates directories and files based on config/init-settings.yaml. If that file does not exist,
built-in defaults are used and the file is created automatically for future customization.
Default directories:
-
manuscript/chapters,manuscript/front-matter,manuscript/back-matter -
assets/covers,assets/author,assets/figures/diagrams,assets/figures/infographics -
config,config/data,output
Default files:
- Chapter placeholders (
01-chapter.md,02-chapter.md) - Front matter:
toc.md,toc-print.md,preface.md,foreword.md - Back matter:
about-the-author.md,acknowledgments.md,appendix.md,bibliography.md,epilogue.md,glossary.md,imprint.md - Config:
metadata.yaml,styles.css,keywords.md,amazon-kdp-info.md,book-description.html, cover page texts -
README.md,LICENSE
After the first run, you will find config/init-settings.yaml in your project. Edit it to control what gets created on
subsequent runs.
Full control (replace defaults entirely):
directories:
- manuscript/chapters
- manuscript/front-matter
- config
- output
files:
- manuscript/chapters/01-intro.md
- manuscript/front-matter/toc.md
- README.mdAdditive (extend defaults):
include_directories:
- manuscript/exercises
- assets/audio
include_files:
- manuscript/chapters/03-chapter.md
- manuscript/chapters/04-chapter.mdSubtractive (remove from defaults):
exclude:
- manuscript/back-matter/appendix.md
- manuscript/back-matter/glossary.md
- config/amazon-kdp-info.md
- config/book-description.htmlCombined (extend and exclude at the same time):
include_directories:
- manuscript/exercises
include_files:
- manuscript/chapters/03-chapter.md
exclude:
- manuscript/back-matter/appendix.md
- config/amazon-kdp-info.mdIf init-settings.yaml is deleted or contains invalid YAML, the initializer falls back to built-in defaults and logs a
warning.
If you exclude items in init-settings.yaml that already exist on disk, the initializer will warn you:
WARNING: 2 excluded items still exist on disk. Run with --clean to remove them.
WARNING: excluded but present: manuscript/back-matter/appendix.md
WARNING: excluded but present: config/amazon-kdp-info.md
To interactively delete them:
poetry run init-bp --cleanThis will list the items and ask for confirmation before deleting anything.
book-project/
├── manuscript/
│ ├── chapters/
│ │ ├── 01-chapter.md
│ │ └── 02-chapter.md
│ ├── front-matter/
│ │ ├── toc.md
│ │ ├── toc-print.md
│ │ ├── preface.md
│ │ └── foreword.md
│ └── back-matter/
│ ├── about-the-author.md
│ ├── acknowledgments.md
│ ├── epilogue.md
│ └── ...
├── assets/
│ ├── covers/
│ └── figures/
├── config/
│ ├── metadata.yaml
│ ├── export-settings.yaml
│ ├── voice-settings.yaml
│ ├── init-settings.yaml
│ └── data/
│ └── image_prompt_generation_template.json
├── output/
├── pyproject.toml
├── Makefile
├── README.md
└── LICENSE
The initializer is idempotent. Running make init-bp again will:
- Create any missing directories and files
- Overwrite
pyproject.tomlname/description andmetadata.yamlwith new input - Not delete existing files or content
- Log what was created vs. what already existed
INFO: Directory already exists: manuscript/chapters
INFO: Created directory: manuscript/exercises
INFO: File already exists: manuscript/chapters/01-chapter.md
INFO: Created file: manuscript/chapters/03-chapter.md
Done: 1 dirs created, 1 files created, 31 already existed.
This makes it safe to re-run after changing your book title or adding new structure via init-settings.yaml.
| Target | Description |
|---|---|
make init-bp |
Initialize a new book project (runs lock-install first) |
make init-project |
Alias for init-bp |
make setup |
Install dependencies and run init-bp |
make lock-install |
Lock and install dependencies |
See the Makefile Overview for the full list of targets.
- Generate Project Structure - Overview of the directory layout
- Makefile Overview - All available make targets
- How to Write a Book - Conventions for chapters and metadata
- Home
- Project Initialization
- Generate Project Structure
- How to Write a Book
- Developer Workflow & Makefile
- Chapter File Generator
- Generate Images
- Convert Markdown Images
- Bulk Change File Extensions
- Restructure Chapters
- Remove Bold from Markdown Headers
- Converting Markdown Bullets to Typographic Bullets
- Translate Markdown with DeepL
- Translate with LM Studio
- Translation CLI Commands
- Shortcuts for Translation
- Automatic Book Export
- Shortcuts for Export
- Export HTML Chapters (Comics)
- Export to EPUB 2
- Pandoc Batch Processor
- Export HTML Books to PDF (KDP Ready)
**Libraries: ** manuscripta | manuscript-tools