Quickstart
Running mercury in a folder opens Mercury's interactive interface, and that folder is the project. The first run collects an appearance and a provider sign-in, or a choice to sign in later, and then asks for workspace trust.
A release installation requires git. Its archive carries its own Node runtime and ripgrep. Release archives cover Apple silicon and Intel Macs, Linux x64 and Windows x64. No archive is supplied for Linux arm64 or Windows arm64, and the installer says so and points at building from source. On Windows arm64 the x64 build runs under emulation. The repository's source-build guide covers building a copy.
The installation channels have these properties:
- curl and PowerShell: The scripts fetch the newest release for the machine and verify its checksum before running the archive's installer.
- Homebrew and npm: Each package names a release and can trail the newest release until it is republished.
- mise: This channel installs the npm package.
Every channel installs for the current user without administrator access. Running an installation command again is safe.
Install with curl
To install with curl, follow these steps:
Run the channel command:
curl -fsSL https://mercury-cli.ai/install | sh # macOS and Linux x64
The script installs the release archive for macOS or Linux x64.
Install with PowerShell
To install with PowerShell, follow these steps:
Run the channel command:
irm https://mercury-cli.ai/install.ps1 | iex # Windows x64, in PowerShell 7
The script installs the Windows x64 release archive.
Install with Homebrew
To install with Homebrew, follow these steps:
Run the channel command:
brew install Whq02/mercury/mercury # Homebrew: macOS and Linux x64
Homebrew installs the release named by the formula.
Install with npm
To install with npm, follow these steps:
Run the channel command:
npm install -g mercury-tech-cli # npm; `bun install -g mercury-tech-cli` is the same package
The npm launcher downloads the release named by the package.
Install with mise
To install with mise, follow these steps:
Run the channel command:
mise use -g npm:mercury-tech-cli # mise, through the npm package
mise installs Mercury through the npm package.
Check the installation
To check the installation, follow these steps:
- Open a new terminal.
- Run
mercury --version.
The command prints the installed version.
The installer adds its command directory to PATH once, with one guarded line in the shell's startup file or the user PATH on Windows. The terminal used for installation needs the line printed by the installer. A new terminal finds the command through the updated configuration.
Start the first session
To start the first session, follow these steps:
- Open a terminal in the project folder.
- Run
mercury. - Choose an appearance.
- Sign in to a provider, or choose sign in later.
- Accept the trust dialog.
- Select New Session on the Boot face.
- Press
Enter.
Mercury creates a blank session for the folder and opens its chat.
The trust dialog names the directory and states that Mercury will read, edit and run the files there. Inside a repository, acceptance covers the whole repository. Declining exits Mercury. A grant accepted in the home directory is kept for the session only. Before trust is granted, no hook runs, the file-suggestion command does not run, project-scope credential helpers do not run, and workspace reads wait. Choosing sign in later permits looking around logged out.
Related pages
Overview, Using Mercury, Install and update, Providers and sign-in, Workspace trust and permissions