Inspecting commands and context
Reference for two read-only commands: the command registry and the discovery of where you are.
Two pure-read commands that help you find out what exists and where you are. Neither of them changes anything.
elyra agent-context
elyra agent-context [--json]It prints the command registry in machine-readable form: commands, arguments and known options.
| Characteristic | Detail |
|---|---|
| Pure local read | Does not need the app running |
| Safe in a remote context | Works over SSH and in an environment without an interface |
| What it describes | Commands, arguments and flags — not the results |
Do not infer the product’s API from this registry. It describes the command surface; it does not represent the response format of each command, nor is it an HTTP API contract.
elyra context
elyra context [--json]It says where you are. Two different pieces of information come together:
| Field | What it means |
|---|---|
screen |
The screen the person is looking at right now: Canvas, Conversation, Terminal or Browser |
caller.surface |
Where you are hosted: canvas (you are a card) or terminal (you are a tab of the Terminal screen) |
The two can disagree. That is exactly why they are separate fields: the person may be looking at the Canvas while the process runs in a Terminal tab.
Outside an Elyra terminal, caller.surface comes as unknown and there is no card — nothing fails
because of that.
The practical rule
Run elyra context before creating a terminal, a conversation or a note:
- With
screen=canvasorcaller.surface=canvas, prefer creating a card on the Canvas. - Otherwise, creating a Terminal tab is the way.
Result
- You know which commands exist and which options each one accepts.
- You know the difference between the visible screen and the surface where the process lives.
Limits
- The registry is not an output schema. It does not describe the commands’ response JSON.
- Do not guess the surface from the screen. Especially over SSH, or in a session that keeps running after you switch screens.
- The
contextcommand does not fail outside the app. It returnsunknownand moves on.