{"result":{"depiction_url":null,"edges":{"hasreference":{"objects":[{"created":"2026-10-07T11:13:49Z","object_id":{"id":2500,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_rsc_export","title":"rsc_export","uri":"https:\/\/zotonic.com\/id\/2500"},"seq":1},{"created":"2026-10-07T11:13:49Z","object_id":{"id":1278,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_rsc","title":"rsc","uri":"https:\/\/zotonic.com\/id\/1278"},"seq":2},{"created":"2026-10-07T11:13:49Z","object_id":{"id":1297,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_edge","title":"edge","uri":"https:\/\/zotonic.com\/id\/1297"},"seq":3}],"predicate":{"id":2774,"is_a":["meta","predicate"],"name":"hasreference","title":{"_type":"trans","tr":{"en":"Documentation reference"}},"uri":"https:\/\/zotonic.com\/id\/hasreference"}},"refers":{"objects":[{"created":"2026-10-07T11:13:03Z","object_id":{"id":1278,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_rsc","title":"rsc","uri":"https:\/\/zotonic.com\/id\/1278"},"seq":1000000},{"created":"2026-10-07T11:13:03Z","object_id":{"id":1297,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_edge","title":"edge","uri":"https:\/\/zotonic.com\/id\/1297"},"seq":1000000},{"created":"2026-10-07T11:13:03Z","object_id":{"id":1639,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_shell","title":{"_type":"trans","tr":{"en":"Connect to the running Erlang shell"}},"uri":"https:\/\/zotonic.com\/id\/1639"},"seq":1000000},{"created":"2026-10-07T11:13:03Z","object_id":{"id":2500,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_rsc_export","title":"rsc_export","uri":"https:\/\/zotonic.com\/id\/2500"},"seq":1000000},{"created":"2026-10-07T11:13:03Z","object_id":{"id":2949,"is_a":["text","documentation","developerguide"],"name":"developer_site_context","title":{"_type":"trans","tr":{"en":"Work with a site context"}},"uri":"https:\/\/zotonic.com\/id\/2949"},"seq":1000000},{"created":"2026-10-07T11:13:03Z","object_id":{"id":2950,"is_a":["text","documentation","developerguide"],"name":"developer_resource_identifiers","title":{"_type":"trans","tr":{"en":"Use stable resource names"}},"uri":"https:\/\/zotonic.com\/id\/2950"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-05-30T05:47:43Z","object_id":{"id":1547,"is_a":["text","documentation","reference"],"name":"doc_reference_cli_index","title":{"_type":"trans","tr":{"en":"Command-line reference"}},"uri":"https:\/\/zotonic.com\/id\/1547"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-10-07T11:13:49Z","object_id":{"id":2554,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_how_to_guide","title":"How-to guide","uri":"https:\/\/zotonic.com\/id\/2554"},"seq":1},{"created":"2026-10-07T11:13:49Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-10-07T11:13:49Z","object_id":{"id":2613,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_development_and_debugging","title":"Development and debugging","uri":"https:\/\/zotonic.com\/id\/2613"},"seq":3},{"created":"2026-10-07T11:13:49Z","object_id":{"id":2670,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_erlang_otp","title":"Erlang\/OTP","uri":"https:\/\/zotonic.com\/id\/2670"},"seq":4}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1639,"is_a":["text","documentation","developerguide"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1639"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_developerguide_shell","page_url":{"en":"https:\/\/zotonic.com\/docs\/1639\/connect-to-the-running-erlang-shell","x-default":"https:\/\/zotonic.com\/docs\/1639\/connect-to-the-running-erlang-shell"},"preview_url":null,"resource":{"body":{"_type":"trans","tr":{"en":"<pre class=\"notranslate\"><code class=\"notranslate language-sh\">bin\/zotonic shell\n<\/code><\/pre>\n<p>This attaches to the live node. Expressions run against that node&#39;s actual code and data, so start with read-only inspection.<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">C = z:c(garden).\nz_context:site(C).\n<\/code><\/pre>\n<p>Expect the site name <code>garden<\/code>. A fresh site context is not automatically an administrator context. Use an authenticated request context or deliberate, local-only elevation when testing mutations.<\/p>\n<p>Leave the remote shell with <strong>Ctrl-C twice<\/strong>. Do not call <code>q().<\/code> or <code>halt().<\/code> to detach: they can stop the shared node.<\/p>\n<p>If connection fails, check the target node name, Erlang distribution setup, and cookie configuration. See <a href=\"\/id\/2949\">Work with a site context<\/a> and <a href=\"\/id\/1639\">Inspect content from the Erlang shell<\/a>.<\/p>\n<h2>Inspect content from the Erlang shell<\/h2>\n<p>With <code>C = z:c(garden)<\/code> in an attached shell:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">Id = m_rsc:rid(&lt;&lt;&quot;page_home&quot;&gt;&gt;, C).\nm_rsc:p(Id, title, C).\nm_edge:objects(Id, haspart, C).\n<\/code><\/pre>\n<p>The named resource must exist on that site; <code>undefined<\/code> can mean the chosen name is absent. Use the generated site&#39;s real resource names rather than assuming every skeleton creates identical content.<\/p>\n<p>Inspect individual properties first instead of dumping an entire resource containing private fields. Use models for normal content access, and understand the ACL context before interpreting missing results.<\/p>\n<p>For a portable representation, inspect <a href=\"\/id\/2500\" class=\"doc-reference doc-reference-model\"><code>model#rsc_export<\/code><\/a>. For changes, use <a href=\"\/id\/1278\" class=\"doc-reference doc-reference-model\"><code>model#rsc<\/code><\/a> and <a href=\"\/id\/1297\" class=\"doc-reference doc-reference-model\"><code>model#edge<\/code><\/a>, then check the public result separately. See <a href=\"\/id\/2950\">Use stable resource names<\/a>.<\/p>"}},"category_id":{"id":317,"is_a":["meta","category"],"name":"developerguide","title":"Developer guide","uri":"https:\/\/zotonic.com\/id\/developerguide"},"content_group_id":{"id":339,"is_a":["meta","content_group"],"name":"default_content_group","title":{"_type":"trans","tr":{"en":"Default Content Group"}},"uri":"https:\/\/zotonic.com\/id\/default_content_group"},"created":"2020-05-30T05:47:29Z","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"doc_editorial_bundle":true,"doc_editorial_edges":{"hasreference":[1278,1297,2500],"subject":[2554,2564,2613,2670]},"github_url":"https:\/\/github.com\/zotonic\/zotonic\/tree\/master\/doc\/developer-guide\/shell.rst","is_authoritative":true,"is_dependent":false,"is_featured":false,"is_protected":false,"is_published":true,"is_unfindable":false,"language":["en"],"modified":"2026-10-07T20:45:38Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"name":"doc_developerguide_shell","pivot_geocode":null,"pivot_location_lat":null,"pivot_location_lng":null,"privacy":0,"publication_end":"9999-06-01T00:00:00Z","publication_start":"2022-02-15T10:01:34Z","slug":"connect-to-the-running-erlang-shell","summary":{"_type":"trans","tr":{"en":"From the checkout root:"}},"title":{"_type":"trans","tr":{"en":"Connect to the running Erlang shell"}},"title_slug":{"_type":"trans","tr":{"en":"connect-to-the-running-erlang-shell"}},"tz":"UTC","uri":null,"version":42,"visible_for":0},"uri":"https:\/\/zotonic.com\/id\/1639","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1639"}},"status":"ok"}