An apparatus comprising: a drill string to drill a borehole in a formation; a liner assembly releasably coupled to the drill string to move with the drill string in the borehole while the drill string drills, and to be releasable from the drill string in the borehole after the drill string drills to a depth; and a latch device, wherein the liner assembly is releasably coupled to the drill string based, at least in part, on the latch device, and wherein the latch device includes: an anchor coupled to the drill string, the anchor including one or more latch keys (325A, 325B) which include one or more lugs and one or more first shoulders; and a latch coupling, the latch coupling including one or more second shoulders corresponding to the one or more first shoulders and one or more pockets for mating engagement with the one or more lugs when the one or more latch keys (325A, 325B) are aligned with the latch coupling and the pockets, wherein if the one or more latch keys (325A, 325B) are not aligned with the latch coupling and the one or more pockets, the anchor, including the one or more latch keys (325A, 325B), may be allowed to pass through the latch coupling, wherein the one or more latch keys (325A, 325B) are spring-loaded, and wherein one or more of the first shoulders, second shoulders, the one or more pockets and the one or more lugs are formed to allow disengaging rotation when the spring force on the one or more latch keys (325A, 325B) is overcome. a drill string to drill a borehole in a formation; a liner assembly releasably coupled to the drill string to move with the drill string in the borehole while the drill string drills, and to be releasable from the drill string in the borehole after the drill string drills to a depth; and a latch device, wherein the liner assembly is releasably coupled to the drill string based, at least in part, on the latch device, and wherein the latch device includes: an anchor coupled to the drill string, the anchor including one or more latch keys (325A, 325B) which include one or more lugs and one or more first shoulders; and a latch coupling, the latch coupling including one or more second shoulders corresponding to the one or more first shoulders and one or more pockets for mating engagement with the one or more lugs when the one or more latch keys (325A, 325B) are aligned with the latch coupling and the pockets, wherein if the one or more latch keys (325A, 325B) are not aligned with the latch coupling and the one or more pockets, the anchor, including the one or more latch keys (325A, 325B), may be allowed to pass through the latch coupling, wherein the one or more latch keys (325A, 325B) are spring-loaded, and wherein one or more of the first shoulders, second shoulders, the one or more pockets and the one or more lugs are formed to allow disengaging rotation when the spring force on the one or more latch keys (325A, 325B) is overcome. an anchor coupled to the drill string, the anchor including one or more latch keys (325A, 325B) which include one or more lugs and one or more first shoulders; and a latch coupling, the latch coupling including one or more second shoulders corresponding to the one or more first shoulders and one or more pockets for mating engagement with the one or more lugs when the one or more latch keys (325A, 325B) are aligned with the latch coupling and the pockets, wherein if the one or more latch keys (325A, 325B) are not aligned with the latch coupling and the one or more pockets, the anchor, including the one or more latch keys (325A, 325B), may be allowed to pass through the latch coupling, wherein the one or more latch keys (325A, 325B) are spring-loaded, and wherein one or more of the first shoulders, second shoulders, the one or more pockets and the one or more lugs are formed to allow disengaging rotation when the spring force on the one or more latch keys (325A, 325B) is overcome.