Skip to main content
CLI

Install the CLI

Install the restward CLI from source today - or, once the first release ships, as a .NET global tool or standalone binary - then verify, update or uninstall it.

restward is the RestWard command-line client. It logs in to the platform, connects a database, generates its REST API and lists the API keys - from your terminal or a CI job.

Not yet published. The .NET global tool (Option 1) and the standalone binaries (Option 2) come with the first CLI release. There is no NuGet package and no GitHub Release yet, so both routes are unavailable today. Until a release exists, building from source is the only way to get the CLI.

Build from source

Requires the .NET 10 SDK. Clone the repository, build the CLI and run it:

Shell
git clone https://github.com/J2-Consult/restward.git
cd restward
dotnet build src/RestWard.Cli
dotnet run --project src/RestWard.Cli -- --help

For regular use, run the built binary directly - src/RestWard.Cli/bin/Debug/net10.0/restward on Linux and macOS, restward.exe on Windows - or publish a self-contained one:

Shell
dotnet publish src/RestWard.Cli -c Release --self-contained --runtime linux-x64 -o restward
./restward/restward --help

Option 1: .NET global tool (coming with the first release)

Not yet published - coming with the first release. There is no restward package on NuGet yet, so this command fails today. The steps below become the install once the first release exists.

If you have the .NET 10 SDK installed, this is the simplest route on every OS, and the only one that updates with a single command.

Shell
dotnet tool install -g restward

.NET puts global tools in ~/.dotnet/tools (Windows: %USERPROFILE%\.dotnet\tools). If your shell cannot find restward afterwards, add that folder to your PATH.

Option 2: standalone binary (coming with the first release)

Not yet published - coming with the first release. No GitHub Release exists yet, so there is nothing to download. When the first release ships, each one will provide:

Self-contained binaries need no .NET installation. Each release ships:

Platform Asset
Linux (x64) restward-linux-x64
macOS (Apple silicon) restward-osx-arm64
Windows (x64) restward-win-x64.exe

Download the asset for your platform from the release, then:

Linux

Shell
chmod +x restward-linux-x64
sudo mv restward-linux-x64 /usr/local/bin/restward

macOS

Shell
chmod +x restward-osx-arm64
sudo mv restward-osx-arm64 /usr/local/bin/restward

The binary is not notarized. If you downloaded it with a browser, macOS quarantines it and refuses to run it:

Shell
xattr -d com.apple.quarantine /usr/local/bin/restward 2>/dev/null || true

(No quarantine flag is set for curl downloads.) On an Intel Mac, use the .NET tool.

Windows

Download restward-win-x64.exe and save it as restward.exe in a folder on your PATH. In PowerShell, this saves it to %USERPROFILE%\bin and adds that folder to your user PATH (open a new terminal afterwards):

powershell
New-Item -ItemType Directory -Force "$env:USERPROFILE\bin" | Out-Null
Copy-Item .\restward-win-x64.exe "$env:USERPROFILE\bin\restward.exe"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\bin", "User")

Verify

Shell
restward --version
restward --help

--version prints the version the binary was built with, for example restward 0.1.0+e1e0e62: the part after + is the source commit it was built from (releases are versioned from their cli-v* tag, e.g. restward 0.2.0).

Updating

  • .NET tool (once published): dotnet tool update -g restward
  • Standalone binary (once published): download the new release asset and replace the old file.
  • Built from source: rebuild from a newer commit.

The CLI does not update itself. Your login and settings live in a separate config file (see Getting started), so updating keeps you signed in.

Uninstall

  • .NET tool (once published): dotnet tool uninstall -g restward
  • Standalone binary: delete the restward file.
  • Built from source: delete the clone (or just the built binary).

To remove your stored session as well, run restward logout first, or delete ~/.config/restward/config.json.

Next steps

Reconnecting to server...

Please wait while we restore your connection

Connection lost

Retrying in seconds...

Unable to reconnect

The server connection has been lost.
You may need to log in again.

Session Paused

The server has temporarily paused your session.

Session Expired

Your session could not be resumed.
Please reload the page to continue.