The Zed CLI binary.
This CLI is a separate binary that invokes Zed.
Examples:
`zed`
Simply opens Zed
`zed --foreground`
Runs in foreground (shows all logs)
`zed path-to-your-project`
Open your project in Zed
`zed -n path-to-file `
Open file/folder in a new window
Usage: zed [OPTIONS] [PATHS_WITH_POSITION]...
Arguments:
[PATHS_WITH_POSITION]...
The paths to open in Zed (space-separated).
Use `path:line:column` syntax to open a file at the given line and column.
Options:
-w, --wait
Wait for all of the given paths to be opened/closed before exiting.
When opening a directory, waits until the created window is closed.
-a, --add
Add files to the currently open workspace
-n, --new
Create a new workspace
-e, --existing
Open in existing Zed window
--user-data-dir
Sets a custom directory for all user data (e.g., database, extensions, logs). This
overrides the default platform-specific data directory location: `$XDG_DATA_HOME/zed`
-v, --version
Print Zed's version and the app path
--foreground
Run zed in the foreground (useful for debugging)
--zed
Custom path to Zed.app or the zed binary
--dev-server-token
Run zed in dev-server mode
--system-specs
Not supported in Zed CLI, only supported on Zed binary Will attempt to give the correct
command to run
--dev-container
Open the project in a dev container.
Automatically triggers "Reopen in Dev Container" if a `.devcontainer/` configuration is
found in the project directory.
--diff
Pairs of file paths to diff. Can be specified multiple times. When directories are
provided, recurses into them and shows all changed files in a single multi-diff view
--completions
Generate shell completions for Zed
[possible values: bash, elvish, fish, nushell, powershell, zsh]
--uninstall
Uninstall Zed from user system
-h, --help
Print help (see a summary with '-h')
To read from stdin, append '-', e.g. 'ps axf | zed -'