IDE, inspect, and validate
Neo provides three views of an application’s model: source inspection in the terminal, a saved event-model.json, and the browser IDE. They serve different checks. Inspection helps you see what Neo recognizes in the code; validation checks the saved model’s structure. Neither runs a command decision or proves that an external service completed its work.
This reference covers Neo 0.18.0. Run these commands from the application root, beside neo.json and src/. Event models and features explains the source declarations; Neo commands covers building and running the application.
Source and saved model
Section titled “Source and saved model”When reviewing the mug shop, we might ask whether the shipping integration names the right receiving command. neo inspect integrations exposes the integration information discovered in source. The IDE reads a saved model, which can also contain layout and grouping. Synchronization updates that saved representation from recognized source declarations.
event-model.jsonA valid saved file can still omit business behavior or differ from source. Compilation, tests and application requests answer those separate questions.
Inspection output
Section titled “Inspection output”neo inspectneo inspect integrationsneo inspect wiringWithout a subcommand, inspect prints a JSON document containing the workspace root, discovered domains and derived wiring. The read-only filters are domains, commands, events, queries, integrations and wiring. They inspect the current directory; Neo does not search parent directories for the application root. An empty result can mean the source layout was not recognized, rather than that the application has no behavior.
Integration entries include name, file, kind, handlesEvents and emitsCommands. In the mug-shop shipping example, inspection recognizes BookShipment and its RecordShipment target, but returns an empty handlesEvents array for the typed handler. That output does not establish an event-to-integration connection. Read the Integration contracts alongside the handler and registration when checking the actual runtime path.
wiring groups recognized relationships by event: produced_by lists commands, feeds_queries lists queries, and triggers_integrations lists integrations with their command targets. These relationships come from source scanning, not execution tracing. In particular, kind: "reactive" in the inspection output is not proof that a worker uses the current typed inbound API.
Synchronization
Section titled “Synchronization”neo inspect syncUnlike the inspection filters, sync writes event-model.json. It requires an existing parseable model file. Existing recognized record fields can update without moving nodes; adding recognized nodes can invoke structural healing and layout. The IDE’s source watcher uses the same synchronization engine.
A second invocation on an unchanged synchronized project reports that the file is already in sync. Review the file diff after a synchronization, especially when new nodes cause layout changes. Synchronization is source-to-model work; it does not generate Haskell implementations from a diagram.
The browser IDE
Section titled “The browser IDE”neo ideNeo serves the bundled IDE at http://127.0.0.1:2323 and keeps the process running until you stop it with Ctrl+C. The IDE is a separate listener from your application. Starting it does not start the application’s HTTP transport.
--port changes the listener port. --host accepts a literal IPv4 or IPv6 address, with loopback as the default; localhost is not accepted as a host argument.
neo ide --host 127.0.0.1 --port 2324Select a feature to inspect its chapters and slices. Saved grouping affects what appears in that feature: nodes can remain under Ungrouped even when a feature has no chapters. Check the selected feature and the saved model before interpreting an empty canvas as missing application behavior.
The native model supports inbound and outbound integration nodes and connections for event inputs and receiving commands. At this revision, the typed BookShipment example is labeled inbound in the saved model despite being an outbound handler; its receiving-command edge is present but its event-input edge is absent. What appears depends on what the source scanner recognizes and what is saved in the model. An explanatory integration figure in a guide does not guarantee matching native edges. Use the source handler, inspection output and saved node connections together when reviewing a flow. The Create a reusable integration and Manage integration resources guides explain the application work behind those representations.
Validation and exit codes
Section titled “Validation and exit codes”neo validateneo validate event-model.json --jsonValidation is read-only. With no path it reads event-model.json in the current directory; an explicit path selects another file. Neo uses the shared model validator to check the embedded JSON Schema and referential rules, such as whether an edge references an existing node. It does not compare every model declaration with compiled application behavior.
| Exit | Meaning |
|---|---|
0 |
Valid model |
1 |
Read or tool failure, including a directory passed as the file |
2 |
Invalid schema or references |
3 |
Malformed JSON |
4 |
File does not exist |
With --json, model outcomes appear as a JSON object on standard output. A valid file produces:
{"status":"valid"}Other model statuses are invalid, malformedJson and notFound. Invalid results include error locations and messages; malformed results include the parse error. Read failures still use the tool’s error diagnostic and exit 1, so a script must check the process status rather than assuming every failure has a JSON body.
For an invalid reference, repair the reported node or edge relationship. For malformed JSON, repair the syntax at the reported position before synchronizing. A missing file needs an existing model created or saved through the IDE, or an explicit path to one. Rerun validation after the repair; success establishes the saved model’s structural validity.