Getting Started
This guide assumes you have a basic understanding of the Forge language. If you need an introduction to Forge, check out the Forge language documentation.
Installing CnD
You can install CnD in one of the following ways:
- A stable, but less often updated version of CnD is packaged with the Forge VS Code Extension. This automatically launches CnD at
localhost:3000
. - NPM: CnD is available as an NPM package. You can install and launch CnD as follows:
1 2 |
|
- From a specific GitHub release : Download
CnD
from GitHub releases and runnode index.js
Running CnD with Forge
These instructions assume that you have an actively running CnD
server on port 3000. If you are using the Forge VS Code Extension, you will not have to manually launch CnD.
- Run a Forge specification that includes a
run
statement (an example is available here). - This will open up Sterling, the default Forge visualizer, in a browser window.
Run your command, and then, once Sterling displays a graph, click the
Layout
drawer. SelectLoad Layout
to load the graph in Cope and Drag. If you already have a Cope and Drag specification, you can paste it in here before clicking load layout.

- CnD will now open in a different tab. You can now start adding constraints that define spatial relationships between elements and directives that control visual styling and representation.
These can be expressed both via YAML and a structured, no-code interface.
If you are just starting with
CnD
, we recommend beginning with the No Code interface.


- Once you have clicked 'Apply Layout',
CnD
will apply your specification to generate a new diagram.
Next Steps
- Read about Constraints
- Learn about Directives