Files command reference
The command-line commands that open files, open diffs and open every changed file in a workspace.
Commands, flags and values are literal — they are not translated.
Selectors and global flags
--workspace <selector>— chooses the workspace. Acceptsid:<id>,name:<name>,path:<path>,active/currentandfocused.--worktreeis a compatibility alias of--workspace.--jsonreturns structured output.
Open a file
elyra file open <path> [--workspace <selector>] [--json]- The path is relative to the selected worktree.
- Without
--workspace, the local call infers the worktree from the current directory. Remote calls require--workspace. - If there is no resolvable worktree and no
--workspace, the call fails instead of opening. - Binary files do not open as text: the response indicates they were not opened and which type was recognized.
Examples:
elyra file open src/App.tsxelyra file open --path docs/readme.md --workspace activeOpen a file’s diff
elyra file diff <path> [--staged] [--workspace <selector>] [--json]- The default is the diff of unstaged differences.
--stagedopens the index diff. - It requires the path and a resolvable worktree.
- A binary file produces no text diff: the response indicates the type instead of comparing content.
Examples:
elyra file diff src/App.tsxelyra file diff --path package.json --staged --workspace name:featureOpen every changed file
elyra file open-changed [--mode edit|diff|both] [--workspace <selector>] [--json]- The source of the changes, in this version, is the selected worktree’s git status.
- The default mode is
diff.--modeacceptsedit,difforboth; any other value is an argument error. - In
editmode, deleted files are skipped — there is no editing target. - Unresolved conflicts are skipped, both in
editand indiff. - With no changed files, the output says there are no changed files.
- The result aggregates opened, skipped and total changed.
Examples:
elyra file open-changedelyra file open-changed --mode bothelyra file open-changed --mode diff --workspace active