Skip to content

How To: Initialize a Project

Auto-Detection

Run plissken init in your project root:

plissken init

plissken inspects the current directory for:

  • Cargo.toml — detects Rust crate or workspace
  • pyproject.toml — detects Python package name and source directory
  • Workspace members from [workspace].members
  • Python source directory from [tool.maturin].python-source

The generated plissken.toml includes everything it found.

Overwrite an Existing Config

If plissken.toml already exists, init refuses to overwrite it. Use --force to replace it:

plissken init --force

Manual Configuration

If auto-detection doesn't match your layout, create plissken.toml manually. The minimal required configuration depends on your project type.

Pure Python

[project]
name = "mypackage"
version_from = "pyproject"

[output]
path = "docs/api"
template = "mkdocs-material"

[python]
package = "mypackage"

Pure Rust

[project]
name = "mycrate"
version_from = "cargo"

[output]
path = "docs/api"
template = "mkdocs-material"

[rust]
crates = ["."]

Hybrid (PyO3)

[project]
name = "myproject"
version_from = "cargo"

[output]
path = "docs/api"
template = "mkdocs-material"

[rust]
crates = ["."]

[python]
package = "mypackage"
source = "python"

[python.modules]
"mypackage" = "pyo3"

After Initialization

Validate the configuration:

plissken check

Then generate documentation:

plissken render

See the Configuration Reference for all available options.