How do I get article properties from query in a merge replication
This is covered in View and Modify Article Properties, in the section To view the properties of an article belonging to a merge publication:

Execute sp_helpmergearticle, specifying the name of the
publication for the @publication parameter and the name of the
article for the @article parameter. If you do not specify these
parameters, information will be returned for all articles in a
publication or at the publisher.

If you want to generate scripts to create replication components, this is covered in Scripting Replication.