# Codegen

<div className="cli-command">
  {<pre>Usage: settlemint codegen <br />Examples:<br /><br />  # Generate GraphQL types and queries for your dApp<br />  $ settlemint codegen<br /><br />  # Generate GraphQL types and queries for specific TheGraph subgraphs<br />  $ settlemint codegen --thegraph-subgraph-names subgraph1 subgraph2<br /><br />  # Generate Viem resources<br />  $ settlemint codegen --generate-viem<br /><br />Generate GraphQL and REST types and queries<br /><br />Options:<br />  --prod                                         Connect to your production environment<br />  --thegraph-subgraph-names &lt;subgraph-names...&gt;  The name(s) of the TheGraph subgraph(s) to generate (skip if you want to generate all)<br />  --generate-viem                                Generate Viem resources<br />  --bun                                          Generate Bun SQL code instead of PostgreSQL pool for Hasura<br />  -h, --help                                     display help for command<br /></pre>}
</div>
