diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 987609cc..38bac425 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -24,6 +24,9 @@ jobs:
           toolchain: ${{ matrix.rust }}
           components: clippy
           cache: true
+      - if: matrix.rust == 'stable'
+        run: cargo fmt -- --check
+
       # test project with default + extra features
       - if: matrix.rust == 'stable' || matrix.rust == 'beta'
         run: cargo test --features image,ndarray,sop-class,rle,cli,jpegxl
diff --git a/.rustfmt.toml b/.rustfmt.toml
new file mode 100644
index 00000000..68e6a267
--- /dev/null
+++ b/.rustfmt.toml
@@ -0,0 +1,2 @@
+newline_style = "Unix"
+max_width = 100
\ No newline at end of file
diff --git a/.rustfmt_nightly.toml b/.rustfmt_nightly.toml
new file mode 100644
index 00000000..ea96b99e
--- /dev/null
+++ b/.rustfmt_nightly.toml
@@ -0,0 +1,6 @@
+newline_style = "Unix"
+max_width = 100
+
+# Enable only with nightly channel via - cargo +nightly fmt
+imports_granularity = "Crate"
+group_imports = "StdExternalCrate"
\ No newline at end of file
diff --git a/justfile b/justfile
new file mode 100644
index 00000000..ed030eab
--- /dev/null
+++ b/justfile
@@ -0,0 +1,11 @@
+check:
+    cargo fmt -- --check
+    cargo clippy
+
+fix:
+    cargo fmt
+    cargo clippy --fix --allow-dirty --allow-staged
+
+fix_nightly:
+    cargo +nightly fmt -- --config-path .rustfmt_nightly.toml
+    #cargo +nightly clippy --fix --allow-dirty --allow-staged # To enable, after running format on nightly
\ No newline at end of file