Skip to content

Comments

Use comments to annotate your Topolix code without affecting the rendered diagram.

Lines starting with # are treated as comments:

# This line is ignored by the parser
node id="app" title="My App"

Use comments to organize your diagram into logical sections:

# ── Frontend Layer ──
node id="web" title="Web App" shape="browser"
node id="mobile" title="Mobile App" shape="mobile"
# ── Backend Services ──
group id="backend" title="Backend" {
node id="api" title="API Server" shape="server"
node id="worker" title="Worker" shape="gear"
}
# ── Data Layer ──
node id="db" title="PostgreSQL" shape="cylinder"
node id="cache" title="Redis" shape="cylinder"
# ── Connections ──
edge from="web" to="api" label="HTTPS"
edge from="api" to="db" label="SQL"
edge from="api" to="cache" label="Cache" style="dashed"

Comment out elements to temporarily hide them from the diagram:

node id="api" title="API Server"
# node id="debug" title="Debug Service" # hidden for now
edge from="web" to="api"
  • Only full-line comments are supported (the # must be the first non-whitespace character)
  • Inline comments (at the end of a line) are not supported
  • Blank lines are ignored and can be used freely for visual spacing