Command line
vix [OPTIONS] [FILES]... — see vix --help for the definitive, always-current
list; this page adds usage detail and the git integration snippets.
Arguments
| Form | Effect |
|---|---|
vix | Open the editor rooted at the current directory, restoring the previous session for this workspace (if restore_session is on). |
vix FOLDER | Open that folder as the workspace (vix ., vix ~/src/app), as if Vix had been started inside it. |
vix FILE... | Open one or more files; the last one is focused. |
vix FILE:LINE:COL | Open FILE and jump straight to LINE, column COL (both 1-based). |
vix - | Read standard input into an unsaved scratch buffer instead of opening a file — e.g. git show HEAD:path/to/file | vix -. |
vix ssh://[USER@]HOST[:PORT]/PATH | Experimental (T712). Work on a folder (or file) on another machine over SSH: the remote directory becomes the workspace, and its files, explorer, search, git and tasks go through ssh. TRAMP’s /ssh:[USER@]HOST[#PORT]:/PATH works too, and ssh://HOST/~/src starts from the remote home. Vix connects before the editor starts, so ssh can ask for a password or a host-key confirmation as usual; later commands share that connection. Nothing is installed remotely: it needs a POSIX sh and the usual commands (cat, stat, find, mv). Settings, themes and keybindings stay local. See remote editing. |
Options
| Flag | Effect |
|---|---|
-l, --locale <LOCALE> | UI language for this run only (e.g. en, es, fr, de, cy) — overrides the saved locale setting without persisting the change. |
--diff <OLD> <NEW> | Compare the two files side by side, both editable (Tools → Compare). This is the shape a git difftool driver invokes with ($LOCAL $REMOTE) — see below. |
--tutor | Launch straight into the interactive tutorial (also reachable from a running session via Help → Tutorial), in place of any files also passed — see crates/vix-tutor/spec/index.md. |
--doctor | Check the environment for common setup friction (git on PATH, configured LSP servers spawnable, the active locale’s spellcheck dictionary loadable, terminal color support) and print a plain pass/fail report, then exit without starting the editor. Also reachable via Help → Run Diagnostics — see crates/vix-doctor/spec/index.md. |
--export-settings <PATH> | Bundle config.toml, macros, keybindings, the user dictionary, and the active custom theme into one file at PATH, then exit. Also reachable via Vix → Export Settings… — see crates/vix-settings-bundle/spec/index.md. |
--import-settings <PATH> | Restore a bundle written by --export-settings from PATH (backing up any file it replaces first), then exit. Also reachable via Vix → Import Settings…. |
--mcp [DIR] | Serve the Model Context Protocol over stdin/stdout instead of starting the editor, so an AI agent can read the workspace (DIR, or the current directory) as Vix sees it: open buffers, symbols, outline, offline diagnostics and SQLite schemas. Read-only — see MCP server. |
--remote-agent | Serve Vix’s remote-agent protocol over stdin/stdout instead of starting the editor. A Vix on another machine starts this over SSH to work on this machine’s files faster; not for interactive use — see Remote editing. |
--plugin <COMMAND> [ARG] | Manage Rhai plugins, then exit: install <git-url>[@rev], list, update [name], remove <name>. A new plugin is disabled until enabled in Vix → Plugins… — see docs/scripting/index.md and crates/vix-script/spec/index.md. |
--version | Print the version and exit. |
--version --json | Print {"name":"vix","version":"…","capabilities":[…]} instead of plain text, for scripts/tooling. capabilities lists the optional areas compiled into this build. |
--help | Full flag reference (clap-generated, always in sync with the binary). |
git difftool
Point git difftool at vix --diff:
# ~/.gitconfig
[difftool "vix"]
cmd = vix --diff \"$LOCAL\" \"$REMOTE\"
[diff]
tool = vix
git difftool # every changed file, one at a time
git difftool HEAD~1 # against a specific revision
git difftool --dir-diff # not applicable — vix compares one file pair
Both sides open as ordinary, editable tabs side by side: Tools → Compare →
Next/Previous Difference step through the changes, Copy Change to
Left/Right copy the change at the cursor across (like vimdiff do/dp), and
saving a side saves that file. Git passes the old version as a temporary copy
($LOCAL), so edits worth keeping go on the right ($REMOTE, your working-tree
file). Show as Unified Diff opens the read-only unified view.
git mergetool
Merge-conflict resolution doesn’t need a dedicated flag: a file with
unresolved <<<<<<</=======/>>>>>>> markers opens normally, and Vix’s
built-in conflict tool (crates/vix-conflict-tool/spec/index.md) resolves
the block under the cursor with ours/theirs/both — no special CLI shape
required, just point mergetool at the merged file:
# ~/.gitconfig
[mergetool "vix"]
cmd = vix \"$MERGED\"
trustExitCode = false
[merge]
tool = vix
git mergetool
trustExitCode = false is intentional: Vix doesn’t report a resolved/
unresolved outcome via its exit code (a TUI editor’s exit code reflects
whether it launched and ran, not whether the user finished resolving
anything), so git should ask whether the merge succeeded rather than
trust the process result — its normal behavior for trustExitCode = false.
Man page
man vix
is available wherever Vix was installed via a package manager (Homebrew,
the shell/PowerShell installers) — see
docs/getting-started/index.md.
It’s generated from this same flag set (cargo run --example generate_man, see spec/ci/index.md), so it never drifts from what
--help above actually shows.