We present an accurate textit{ab-initio} tight-binding hamiltonian for the transition-metal dichalcogenides, MoS$_2$, MoSe$_2$, WS$_2$, WSe$_2$, with a minimal basis (the textit{d} orbitals for the metal atoms and textit{p} orbitals for the chalcogen atoms) based on a transformation of the Kohn-Sham density function theory (DFT) hamiltonian to a basis of maximally localized Wannier functions (MLWF). The truncated tight-binding hamiltonian (TBH), with only on-site, first and partial second neighbor interactions, including spin-orbit coupling, provides a simple physical picture and the symmetry of the main band-structure features. Interlayer interactions between adjacent layers are modeled by transferable hopping terms between the chalcogen textit{p} orbitals. The full-range tight-binding hamiltonian (FTBH) can be reduced to hybrid-orbital k $cdot$ p effective hamiltonians near the band extrema that captures important low-energy excitations. These textit{ab-initio} hamiltonians can serve as the starting point for applications to interacting many-body physics including optical transitions and Berry curvature of bands, of which we give some examples.