diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..4c8475eeb033b9960e21628ce492deb67f8013b5
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,12 @@
+repos:
+  - repo: https://github.com/codespell-project/codespell
+    rev: v2.2.5
+    hooks:
+      - id: codespell
+        args: []
+  - repo: local
+    hooks:
+      - id: liquidsoap-check
+        name: liquidsoap-check
+        entry: sh -c 'liquidsoap --check src/engine.liq'
+        language: system
diff --git a/Makefile b/Makefile
index d48a80b3ca6042ff3cb1d0c944f2829c7838f90a..e5cc2e2302ca791a914416e4df6fcd0b40186019 100644
--- a/Makefile
+++ b/Makefile
@@ -62,13 +62,16 @@ spell::
 	codespell $(wildcard *.md) docs src tests config contrib
 
 init.app::
-	cp -n config/sample.engine-core.ini config/engine-core.ini
+	cp -n config/sample.engine-core.ini config/engine-core.ini || true
 	mkdir -p audio/fallback
 	mkdir -p audio/playlist
 	mkdir -p audio/source
 
 init.dev:: init.app
 	sudo apt install -y codespell
+	sudo apt install -y pre-commit
+	pre-commit autoupdate
+	pre-commit install
 
 test::
 	(cd tests && liquidsoap engine_test_suite.liq)