We study the homogenization of a class of energies concentrated on lines. In dimension 2 (i.e., in codimension 1) the problem reduces to the homogenization of partition energies studied by L. Ambrosio and A. Braides [Functionals defined on partitions in sets of finite perimeter. II: Semicontinuity, relaxation and homogenization, J. Math. Pures Appl. 69 (1990) 307–333.] There, the key tool is the representation of partitions in terms of BV functions with values in a discrete set. In our general case the key ingredient is the representation of closed loops with discrete multiplicity either as divergence-free matrix-valued measures supported on curves or with 1-currents with multiplicity in a lattice. In the 3 dimensional case the main motivat...