The NVMe Specifications can be found here.
Examples in several programming languages can be found at GitHub