You only get a HKID when you have a visa, and you only get a visa when you apply to take up residence in Hong Kong. So, about 3-4 months before you wish to move to Hong Kong you should apply for a Dependant Visa. The form is
here and the guidance notes are
here. Read them carefully and make sure that you submit all the paperwork they ask for. As well as the formal stuff (passport, marriage certificate etc) I suspect they will be particularly interested in evidence of the seriousness and longevity of your relationship.
Don't apply too early because you will need to enter HK to take up residence within 3 months of the visa being granted.