Hayyim Vital came to Isaac Luria in Safed in 1570, and Luria was dead by the summer of 1572. Everything that later Judaism means by Lurianic Kabbalah passed through that short apprenticeship and then through fifty years of Vital's writing.
Luria taught orally and left almost nothing written. Vital's answer was to record, arrange and rework, producing the enormous compilation known as Etz Hayyim, the Tree of Life, and the eight-part Shemonah She'arim, the Eight Gates, which distribute the material by subject: the gate of introductions, of principles, of reincarnations, of meditative intentions and the rest. The set was assembled after his death by his son Shmuel Vital at Damascus, while a second recension descending from Israel Sarug circulated in Europe in parallel. The Lurianic corpus therefore reached print by more than one channel, and it does not everywhere agree with itself.
Vital was also possessive about the material. He regarded himself as Luria's authorised transmitter, restricted access to his manuscripts, and the tradition preserves an account of copies being taken without his consent while he lay ill. What that means for a reader is worth stating plainly. The line between what Luria taught and what Vital understood him to have taught cannot be drawn from inside the texts, because there is no independent record against which to test them.