Installation#

The Smithy CLI is supported on the following platforms:

  • MacOS (x86, ARM)
  • Linux (x86, ARM)
  • Windows (x64)

Releases of the Smithy CLI can be found on the Smithy GitHub releases page.

You can get the CLI via Homebrew by first tapping the official Smithy Homebrew Tap, and then installing the smithy-cli formula.

/bin/sh#
brew tap smithy-lang/tap && brew install smithy-cli

After the install completes, you may run smithy --help to verify your installation.

First, retrieve the latest smithy installation from the Smithy GitHub releases.

/bin/sh#
mkdir -p smithy-install/smithy && \
    curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-darwin-x86_64.zip -o smithy-install/smithy-cli-darwin-x86_64.zip && \
    unzip -qo smithy-install/smithy-cli-darwin-x86_64.zip -d smithy-install && \
    mv smithy-install/smithy-cli-darwin-x86_64/* smithy-install/smithy

See also

Please refer to Verification (Optional) for instructions on how to verify downloaded artifacts.

Now, run the installer (./install) located in the newly created directory (smithy-install/smithy).

Important

The following command typically requires using sudo to install the CLI in the default location (/usr/local/smithy). Alternatively, you may set your own install path, which should mitigate permissions issues when not running with sudo.

/bin/sh#
sudo smithy-install/smithy/install

Note

If you've already installed the CLI and want to update to the latest version, you can use the --update flag. You may also choose where to install the CLI - for more information, run the installer using the --help flag.

After the install completes, you may run smithy --help to verify your installation. You may also delete all the files downloaded for performing the installation (under smithy-install/):

/bin/sh#
rm -rf smithy-install/

First, retrieve the latest smithy installation from the Smithy GitHub releases.

/bin/sh#
mkdir -p smithy-install/smithy && \
    curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-darwin-aarch64.zip -o smithy-install/smithy-cli-darwin-aarch64.zip && \
    unzip -qo smithy-install/smithy-cli-darwin-aarch64.zip -d smithy-install && \
    mv smithy-install/smithy-cli-darwin-aarch64/* smithy-install/smithy

See also

Please refer to Verification (Optional) for instructions on how to verify downloaded artifacts.

Now, run the installer (./install) located in the newly created directory (smithy-install/smithy).

Important

The following command typically requires using sudo to install the CLI in the default location (/usr/local/smithy). Alternatively, you may set your own install path, which should mitigate permissions issues when not running with sudo.

/bin/sh#
sudo smithy-install/smithy/install

Note

If you've already installed the CLI and want to update to the latest version, you can use the --update flag. You may also choose where to install the CLI - for more information, run the installer using the --help flag.

After the install completes, you may run smithy --help to verify your installation. You may also delete all the files downloaded for performing the installation (under smithy-install/):

/bin/sh#
rm -rf smithy-install/

First, retrieve the latest smithy installation from the Smithy GitHub releases.

/bin/sh#
mkdir -p smithy-install/smithy && \
    curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip && \
    unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install && \
    mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy

See also

Please refer to Verification (Optional) for instructions on how to verify downloaded artifacts.

Now, run the installer (./install) located in the newly created directory (smithy-install/smithy).

Important

The following command typically requires using sudo to install the CLI in the default location (/usr/local/smithy). Alternatively, you may set your own install path, which should mitigate permissions issues when not running with sudo.

/bin/sh#
sudo smithy-install/smithy/install

Note

If you've already installed the CLI and want to update to the latest version, you can use the --update flag. You may also choose where to install the CLI - for more information, run the installer using the --help flag.

After the install completes, you may run smithy --help to verify your installation. You may also delete all the files downloaded for performing the installation (under smithy-install/):

/bin/sh#
rm -rf smithy-install/

First, retrieve the latest smithy installation from the Smithy GitHub releases.

/bin/sh#
mkdir -p smithy-install/smithy && \
    curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-linux-aarch64.zip -o smithy-install/smithy-cli-linux-aarch64.zip && \
    unzip -qo smithy-install/smithy-cli-linux-aarch64.zip -d smithy-install && \
    mv smithy-install/smithy-cli-linux-aarch64/* smithy-install/smithy

See also

Please refer to Verification (Optional) for instructions on how to verify downloaded artifacts.

Now, run the installer (./install) located in the newly created directory (smithy-install/smithy).

Important

The following command typically requires using sudo to install the CLI in the default location (/usr/local/smithy). Alternatively, you may set your own install path, which should mitigate permissions issues when not running with sudo.

/bin/sh#
sudo smithy-install/smithy/install

Note

If you've already installed the CLI and want to update to the latest version, you can use the --update flag. You may also choose where to install the CLI - for more information, run the installer using the --help flag.

After the install completes, you may run smithy --help to verify your installation. You may also delete all the files downloaded for performing the installation (under smithy-install/):

/bin/sh#
rm -rf smithy-install/

You can get the CLI via Scoop by first adding the official Smithy Scoop Bucket, and then installing from the smithy-cli manifest.

powershell#
scoop bucket add smithy-lang https://github.com/smithy-lang/scoop-bucket; `
    scoop install smithy-lang/smithy-cli

After the install completes, you may run smithy --help to verify your installation.

First, retrieve the latest smithy installation from the Smithy GitHub releases.

powershell#
New-Item -Type Directory -Path smithy-install\smithy -Force; `
    Invoke-WebRequest -Uri https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-windows-x64.zip `
                      -OutFile smithy-install\smithy-cli-windows-x64.zip

See also

Please refer to Verification (Optional) for instructions on how to verify downloaded artifacts.

Now, unzip the installation in the newly created directory and run the installer (install.bat).

Important

The following command typically requires running powershell with administrator access in order to install the CLI into the default location (<Letter>:\Program Files\Smithy). Alternatively, you may specify your own path, which can mitigate permissions issues when not running as administrator.

powershell#
Expand-Archive smithy-install\smithy-cli-windows-x64.zip -DestinationPath smithy-install\; `
    Move-Item -Path smithy-install\smithy-cli-windows-x64\* -Destination smithy-install\smithy; `
    smithy-install\smithy\install

Follow the installer prompts accordingly to complete the installation.

After the install completes, you may run smithy --help to verify your installation. You may also delete all the files downloaded for performing the installation (under smithy-install\):

powershell#
rm -r -force smithy-install\

Important

If the location where the CLI is installed is not captured in your PATH environment variable, you will have to run the executable with the full path.

Verification (Optional)#

The Smithy CLI distributables are PGP-signed and hashed before they are released. You should verify the signatures and hashes of the archives to ensure the validity and integrity of what you are downloading. You can follow the steps below to do so for your given platform.

Before proceeding, please make sure you have both the GnuPG utility (gpg) and a sha256-checksum utility (sha256sum) installed on your system. We'll be using these to perform the verification.

Note

This is only applicable to manual installations - Homebrew and Scoop verify checksums before install.

Download the detached signature file (.asc) and the sha256-checksum file (.sha256) corresponding to the zip file (which you already downloaded) from the Smithy GitHub releases.

/bin/sh#
curl -L 'https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-darwin-x86_64.zip.{asc,sha256}' -o 'smithy-install/smithy-cli-darwin-x86_64.zip.#1'

Verify the checksum of the zip file using the sha256sum utility.

/bin/sh#
(cd smithy-install && sha256sum -c smithy-cli-darwin-x86_64.zip.sha256)

Now, retrieve the public PGP key from the release, and import it into your key-chain.

/bin/sh#
curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy.asc -o smithy-install/smithy.asc && \
    gpg --import smithy-install/smithy.asc

Finally, after importing the key, verify the signature of the zip file with gpg.

/bin/sh#
gpg --verify smithy-install/smithy-cli-darwin-x86_64.zip.asc smithy-install/smithy-cli-darwin-x86_64.zip
/bin/sh#
curl -L 'https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-darwin-aarch64.zip.{asc,sha256}' -o 'smithy-install/smithy-cli-darwin-aarch64.zip.#1'

Verify the checksum of the zip file using the sha256sum utility.

/bin/sh#
(cd smithy-install && sha256sum -c smithy-cli-darwin-aarch64.zip.sha256)

Now, retrieve the public PGP key from the release, and import it into your key-chain.

/bin/sh#
curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy.asc -o smithy-install/smithy.asc && \
    gpg --import smithy-install/smithy.asc

Finally, after importing the key, verify the signature of the zip file with gpg.

/bin/sh#
gpg --verify smithy-install/smithy-cli-darwin-aarch64.zip.asc smithy-install/smithy-cli-darwin-aarch64.zip

Download the detached signature file (.asc) and the sha256-checksum file (.sha256) corresponding to the zip file (which you already downloaded) from the Smithy GitHub releases.

/bin/sh#
curl -L 'https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-linux-x86_64.zip.{asc,sha256}' -o 'smithy-install/smithy-cli-linux-x86_64.zip.#1'

Verify the checksum of the zip file using the sha256sum utility.

/bin/sh#
(cd smithy-install && sha256sum -c smithy-cli-linux-x86_64.zip.sha256)

Now, retrieve the public PGP key from the release, and import it into your key-chain.

/bin/sh#
curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy.asc -o smithy-install/smithy.asc && \
    gpg --import smithy-install/smithy.asc

Finally, after importing the key, verify the signature of the zip file with gpg.

/bin/sh#
gpg --verify smithy-install/smithy-cli-linux-x86_64.zip.asc smithy-install/smithy-cli-linux-x86_64.zip
/bin/sh#
curl -L 'https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-linux-aarch64.zip.{asc,sha256}' -o 'smithy-install/smithy-cli-linux-aarch64.zip.#1'

Verify the checksum of the zip file using the sha256sum utility.

/bin/sh#
(cd smithy-install && sha256sum -c smithy-cli-linux-aarch64.zip.sha256)

Now, retrieve the public PGP key from the release, and import it into your key-chain.

/bin/sh#
curl -L https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy.asc -o smithy-install/smithy.asc && \
    gpg --import smithy-install/smithy.asc

Finally, after importing the key, verify the signature of the zip file with gpg.

/bin/sh#
gpg --verify smithy-install/smithy-cli-linux-aarch64.zip.asc smithy-install/smithy-cli-linux-aarch64.zip

Download the detached signature file (.asc) and the sha256-checksum file (.sha256) corresponding to the zip file (which you already downloaded) from the Smithy GitHub releases.

powershell#
Invoke-WebRequest -Uri https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-windows-x64.zip.asc `
    -OutFile smithy-install\smithy-cli-windows-x64.zip.asc
Invoke-WebRequest -Uri https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy-cli-windows-x64.zip.sha256 `
    -OutFile smithy-install\smithy-cli-windows-x64.zip.sha256

Compute the actual checksum of the zip file using certutil.

powershell#
certutil -hashfile smithy-install\smithy-cli-windows-x64.zip SHA256

Now, print out the expected checksum from the file that you downloaded (.sha256).

powershell#
cat smithy-install\smithy-cli-windows-x64.zip.sha256

Verify that the output from the two commands matches. There may be a file-path appended to the latter command output - you may safely ignore that.

Now, retrieve the public PGP key from the release, and import it into your key-chain.

powershell#
Invoke-WebRequest -Uri https://github.com/smithy-lang/smithy/releases/download/1.53.0/smithy.asc `
    -OutFile smithy-install\smithy.asc; `
    gpg --import smithy-install\smithy.asc

Finally, after importing the key, verify the signature of the zip file with gpg.

powershell#
gpg --verify smithy-install\smithy-cli-windows-x64.zip.asc smithy-install\smithy-cli-windows-x64.zip

Warning

Upon verifying the signature, you will receive a WARNING message:

gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.

This is expected since there is no established chain of trust between you and the smithy key. For more information on this topic, see the key validation section from the GNU Privacy Handbook.