# Install Semifold

Install the latest published Semifold CLI and verify that the smif command is available.

Source: https://semifold.noctisynth.org/docs/getting-started/installation/
Language: en

The published command is available as both `smif` and `semifold`. This documentation uses the shorter `smif` form.

Unless you need to reproduce an older environment, install the latest release. The installation scripts query GitHub Releases and select the newest published stable binary release whose tag matches `semifold-vX.Y.Z`. They do not use the repository-wide `latest` pointer, which may refer to another package in the Semifold monorepo.

## Recommended: installation script [#recommended-installation-script]

<Tabs items={['macOS / Linux', 'Windows PowerShell']}>
  <Tab>

```bash
curl -L https://semifold.noctisynth.org/install/install.sh | sh
```

The script installs to `$HOME/.local/bin` by default. If that directory is not already on `PATH`, add it in your shell configuration.

  </Tab>
  <Tab>

```powershell
irm https://semifold.noctisynth.org/install/install.ps1 | iex
```

The script installs to `%USERPROFILE%\.local\bin` by default. Add that directory to `PATH` if necessary.

  </Tab>
</Tabs>

To change the installation directory, pass an argument to the downloaded script:

<Tabs items={['macOS / Linux', 'Windows PowerShell']}>
  <Tab>

```bash
curl -L https://semifold.noctisynth.org/install/install.sh | \
  sh -s -- --install-dir "$HOME/bin"
```

  </Tab>
  <Tab>

```powershell
& ([scriptblock]::Create((irm https://semifold.noctisynth.org/install/install.ps1))) `
  -InstallDir "$HOME\bin"
```

  </Tab>
</Tabs>

## Install a specific version [#install-a-specific-version]

Pass a version only when you need to reproduce a particular environment. Both `0.3.1` and `v0.3.1` resolve to the `semifold-v0.3.1` GitHub Release:

<Tabs items={['macOS / Linux', 'Windows PowerShell']}>
  <Tab>

```bash
curl -L https://semifold.noctisynth.org/install/install.sh | \
  sh -s -- 0.3.1
```

  </Tab>
  <Tab>

```powershell
& ([scriptblock]::Create((irm https://semifold.noctisynth.org/install/install.ps1))) `
  -Version 0.3.1
```

  </Tab>
</Tabs>

Prerelease versions are never selected by the default installation. Pass the complete prerelease version explicitly when one is required.

## Package-manager alternatives [#package-manager-alternatives]

Choose the registry already trusted in your environment:

<Tabs items={['Cargo', 'npm', 'PyPI']}>
  <Tab>

```bash
cargo install semifold
```

Use an up-to-date stable Rust toolchain when compiling from source. The prebuilt CLI and npm packages do not require Rust. For this repository's Bun workspaces and N-API artifact generation on Windows, use a filesystem with directory-link and hard-link support, such as NTFS; these tools cannot create their required links on exFAT. This does not prevent the prebuilt Semifold CLI from accessing shared repositories there.

  </Tab>
  <Tab>

```bash
npm install --global @semifold/cli
```

  </Tab>
  <Tab>

```bash
pipx install semifold
```

  </Tab>
</Tabs>

The npm package requires Node.js 20 or newer. It installs a platform-specific N-API binding for macOS, Windows, or glibc-based Linux on x64 and arm64. Linux musl distributions are not supported by this package yet; use the installation script or Cargo there.

## Verify the command [#verify-the-command]

Open a new shell after changing `PATH`, then run:

```bash
smif --version
```

If the command prints the installed Semifold version without an error, the installation is ready.

You can now continue to [your first release](https://semifold.noctisynth.org/docs/getting-started/first-release/) or read [what Semifold manages](https://semifold.noctisynth.org/docs/introduction/) first.

## Git repositories and shared drives [#git-repositories-and-shared-drives]

Semifold uses the embedded Rust `gix` library for local repository discovery, status checks, history, and release commits. These operations do not require a Git executable. Ownership checks remain enabled: explicitly authorize shared repositories in protected system or global Git configuration, for example:

```ini
[safe]
    directory = E:/Projects/*
```

On Linux, use the mounted path, such as `/shared/projects/*`. Exact repository paths, `*`, and empty entries that reset earlier trust settings are also supported. A repository cannot grant itself trust through its local config. The gix directory-prefix rule also includes a repository at the prefix directory itself; keep the configured root limited to repositories you trust. Semifold does not change your global Git configuration.

`smif ci` still uses libgit2 for remote push. Its push preflight can reject a shared repository that local gix operations accept when only a directory wildcard is configured. This check runs before release files or refs change. Ordinary `status`, `version`, `publish`, and MCP operations do not use that push adapter. See [CI](https://semifold.noctisynth.org/docs/commands/ci/) for the workflow boundary. Configured publish commands, credential helpers, and attribute filters may require their own external tools.

