"Though, fwiw, mainstream Christians consider it heretic for some reason."
That's because it's technically a Gnostic writing, not a Christian one. The relationship between Christianity and Gnosticism is complex, but they are quite different belief systems.
The Gospel of Thomas is a good example of this genre. The Zen-to-Magic ratio is much higher than in most Christian texts. Though, fwiw, mainstream Christians consider it heretic for some reason.