
▲ 5 r/kaggle
I made a CLI tool to stop the "Zip & Upload" loop (modular code -> Kaggle notebook)
I got tired of the constant "Edit locally -> Zip -> Upload to Kaggle -> realize there's a syntax error -> Repeat" cycle. Since I don’t have a crazy GPU at home, I use Kaggle a lot, but I hate working in one giant, messy notebook.
I built repo2nb to fix this. It’s a CLI tool that converts your local repo (with all its folders and files) into a single .ipynb file.
How it works:
- It uses
%%writefileto rebuild your entire directory structure inside/kaggle/working. - It integrates with Kaggle Secrets so you can push/pull to GitHub securely without leaking your token.
- It skips heavy stuff like
.venv,.pt, or datasets automatically to keep the notebook light.
Basically, you run one command locally, upload the notebook, and you have your full modular repo ready to train. I’ve been using it for my graduation project and it saved me so much time.
Check it out if you're tired of the manual setup: https://github.com/David-Magdy/repo2nb
You can just pip install repo2nb and run it. Hope it helps!
u/PolarIceBear_ — 4 days ago