Skip to content

Files command reference

The command-line commands that open files, open diffs and open every changed file in a workspace.

View Markdown

Commands, flags and values are literal — they are not translated.

Selectors and global flags

  • --workspace <selector> — chooses the workspace. Accepts id:<id>, name:<name>, path:<path>, active/current and focused.
  • --worktree is a compatibility alias of --workspace.
  • --json returns 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.tsx
elyra file open --path docs/readme.md --workspace active

Open a file’s diff

elyra file diff <path> [--staged] [--workspace <selector>] [--json]
  • The default is the diff of unstaged differences. --staged opens 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.tsx
elyra file diff --path package.json --staged --workspace name:feature

Open 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. --mode accepts edit, diff or both; any other value is an argument error.
  • In edit mode, deleted files are skipped — there is no editing target.
  • Unresolved conflicts are skipped, both in edit and in diff.
  • With no changed files, the output says there are no changed files.
  • The result aggregates opened, skipped and total changed.

Examples:

elyra file open-changed
elyra file open-changed --mode both
elyra file open-changed --mode diff --workspace active