Holmes on the Range is the first in the Holmes on the Range series by Steve Hockensmith. I read this a long time ago in DTB from the library and liked it, and also liked a couple of additional titles I've read in this series. It's a fun sort-of-pastiche series, and was a finalist for a bunch of "Best First" awards. It is free right now at both Kindle US and UK.
Kindle US:
https://www.amazon.com/dp/B0851Q2XXY
Kindle UK:
https://www.amazon.co.uk/dp/B0851Q2XXY