Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
.idea
node_modules
dist
npm/dist
19 changes: 3 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ jobs:
load: true
build-args: VERSION=${{ steps.tags.outputs.version }}
- name: Test container
run: docker run --rm ${{ steps.build.outputs.imageid }} -V
# The version is stamped in at build time; a binary reporting anything else was built
# without it.
run: test "$(docker run --rm ${{ steps.build.outputs.imageid }} -V)" = "${{ steps.tags.outputs.version }}"
- name: Run container smoke tests
run: |
docker run --rm -v "$PWD/e2e:/e2e" --entrypoint sh \
Expand Down Expand Up @@ -142,35 +144,20 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@12
- name: Binaries, archives and the GitHub release
uses: goreleaser/goreleaser-action@v7
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: npm packages from the same binaries
run: go run ./internal/tools/npmpkg -version "${GITHUB_REF_NAME}" -dist dist -out npm/dist
- name: Publish to npm
# The platform packages first: `steadybit` depends on them.
run: |
for dir in npm/dist/cli-*; do
(cd "$dir" && npm publish --provenance --access public)
done
(cd npm/dist/steadybit && npm publish --provenance --access public)
- name: 'snyk monitor'
uses: snyk/actions/golang@master
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ build/Release
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
/dist
/npm/dist

/.steadybit.yml
.idea
Expand Down
7 changes: 3 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2026 Steadybit GmbH

# Builds the release binaries, archives and checksums. The npm packages and the container
# image are made from these binaries by the release workflow, so every channel ships the
# same build.
# Builds the release binaries, archives and checksums, and the GitHub release that carries
# them. The container image is built by the docker-build job.
version: 2
project_name: steadybit

Expand All @@ -17,7 +16,7 @@ builds:
goarch: [amd64, arm64]
flags: [-trimpath]
ldflags:
- -s -w -X github.com/steadybit/cli/internal/platform.Version={{ .Version }}
- -s -w -X github.com/steadybit/cli/v6/internal/platform.Version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'

archives:
Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

## v6.0.0

- **The CLI is now a single binary written in Go.** It runs without Node.js, and is installed
the same ways: `npm install -g steadybit`, which now installs the binary for your platform
and works with any Node.js from 18 on, or the `steadybit/cli` container image, now 18 MB
instead of 249 MB. It can also be downloaded directly from the GitHub releases. Commands,
- **The CLI is now a single binary written in Go, and no longer needs Node.js.** It is
downloaded from the GitHub releases, installed with `go install`, or used as the
`steadybit/cli` container image, now 18 MB instead of 249 MB.
- **Breaking:** the CLI is no longer published to npm; `steadybit@5.0.0` there is the last
version. Uninstall it with `npm uninstall -g steadybit` and install the binary. Commands,
flags, messages, exit codes, profiles in `~/.steadybit` and the `STEADYBIT_*` variables
are unchanged, and experiment, schedule and service files are written byte for byte as
before.
Expand Down
6 changes: 2 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ go test ./...
| `internal/platform` | The HTTP client: authentication, retries, rate limiting, errors |
| `internal/jsyaml` | YAML and JSON output byte-compatible with the former TypeScript CLI |
| `api` | The platform client, generated from `openapi/platform-api.json` |
| `internal/tools` | The spec fetcher and the npm package builder, used by CI |
| `npm/steadybit` | The launcher the `steadybit` npm package runs |
| `internal/tools` | The spec fetcher, used by CI |

## Tests

Expand Down Expand Up @@ -96,8 +95,7 @@ not generated structs, so that fields the spec does not know yet are never dropp
## Releasing

Releases are published by CI, not from a workstation: pushing a `v*` tag builds the
binaries with goreleaser, creates the GitHub release, publishes the npm packages (one per
platform, and `steadybit`, which installs the right one), and pushes the Docker image.
binaries with goreleaser, creates the GitHub release with them, and pushes the Docker image.

```sh
# 1. Head the CHANGELOG.md entry with the version being released
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY api ./api
COPY cmd ./cmd
COPY internal ./internal
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -trimpath \
-ldflags "-s -w -X github.com/steadybit/cli/internal/platform.Version=${VERSION}" \
-ldflags "-s -w -X github.com/steadybit/cli/v6/internal/platform.Version=${VERSION}" \
-o /steadybit ./cmd/steadybit

# Alpine rather than scratch: pipelines use the image with a shell, and the e2e suite
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ You need a Steadybit account. You can create a free account [via our website](ht

The CLI is a single binary for Linux, macOS and Windows, on amd64 and arm64.

Via npm, which installs the binary for your platform (any Node.js from 18 on):

```sh
npm install -g steadybit
```

Or download the archive for your platform from the
Download the archive for your platform from the
[releases](https://github.com/steadybit/cli/releases) (`checksums.txt` lists their SHA-256)
and put `steadybit` on your `PATH`:

Expand All @@ -33,6 +27,19 @@ curl -sL https://github.com/steadybit/cli/releases/latest/download/steadybit_lin
sudo mv steadybit /usr/local/bin/
```

With Go installed:

```sh
go install github.com/steadybit/cli/cmd/steadybit@latest
```

The CLI is also available as the [container image](#container-image) `steadybit/cli`, and
in GitHub Actions through [`steadybit/cli`](#github-actions).

Up to version 5, the CLI was installed with `npm install -g steadybit`. That package is no
longer updated; uninstall it with `npm uninstall -g steadybit` and install the binary instead.
Profiles in `~/.steadybit` keep working.

Shell completion is available for bash, zsh, fish and PowerShell, see `steadybit completion --help`.

## Authorization
Expand Down
4 changes: 2 additions & 2 deletions cmd/steadybit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package main
import (
"os"

"github.com/steadybit/cli/internal/cli"
"github.com/steadybit/cli/v6/internal/cli"
// Imported for its signal handling, which every command needs from the start.
_ "github.com/steadybit/cli/internal/interrupt"
_ "github.com/steadybit/cli/v6/internal/interrupt"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/steadybit/cli
module github.com/steadybit/cli/v6

go 1.26.2

Expand Down
10 changes: 5 additions & 5 deletions internal/accesstoken/accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"net/http"
"strings"

"github.com/steadybit/cli/api"
"github.com/steadybit/cli/internal/jsyaml"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/internal/table"
"github.com/steadybit/cli/v6/api"
"github.com/steadybit/cli/v6/internal/jsyaml"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
"github.com/steadybit/cli/v6/internal/table"
)

func notFoundOr(err error, id, format string) error {
Expand Down
4 changes: 2 additions & 2 deletions internal/accesstoken/accesstoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"testing"

"github.com/steadybit/cli/internal/accesstoken"
"github.com/steadybit/cli/internal/platformtest"
"github.com/steadybit/cli/v6/internal/accesstoken"
"github.com/steadybit/cli/v6/internal/platformtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
8 changes: 4 additions & 4 deletions internal/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"net/http"
"strings"

"github.com/steadybit/cli/api"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/internal/table"
"github.com/steadybit/cli/v6/api"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
"github.com/steadybit/cli/v6/internal/table"
)

type ListOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/action/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"testing"

"github.com/steadybit/cli/internal/action"
"github.com/steadybit/cli/internal/platformtest"
"github.com/steadybit/cli/v6/internal/action"
"github.com/steadybit/cli/v6/internal/platformtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/advice/advice.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"regexp"
"strings"

"github.com/steadybit/cli/api"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/table"
"github.com/steadybit/cli/v6/api"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/table"
)

type Options struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/advice/advice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"
"testing"

"github.com/steadybit/cli/internal/advice"
"github.com/steadybit/cli/internal/platformtest"
"github.com/steadybit/cli/v6/internal/advice"
"github.com/steadybit/cli/v6/internal/platformtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
12 changes: 6 additions & 6 deletions internal/auditlog/auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"fmt"
"net/http"

"github.com/steadybit/cli/api"
"github.com/steadybit/cli/internal/jsyaml"
"github.com/steadybit/cli/internal/output"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/internal/table"
"github.com/steadybit/cli/v6/api"
"github.com/steadybit/cli/v6/internal/jsyaml"
"github.com/steadybit/cli/v6/internal/output"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
"github.com/steadybit/cli/v6/internal/table"
)

type Options struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/auditlog/auditlog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"testing"

"github.com/steadybit/cli/internal/auditlog"
"github.com/steadybit/cli/internal/platformtest"
"github.com/steadybit/cli/v6/internal/auditlog"
"github.com/steadybit/cli/v6/internal/platformtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"context"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/accesstoken"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/v6/internal/accesstoken"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/advice.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/advice"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/v6/internal/advice"
"github.com/steadybit/cli/v6/internal/platform"
)

func newAdvice() *cobra.Command {
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"context"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/auditlog"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/v6/internal/auditlog"
"github.com/steadybit/cli/v6/internal/platform"
)

func newAuditLog() *cobra.Command {
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"time"

"github.com/spf13/cobra"
"github.com/steadybit/cli/api"
"github.com/steadybit/cli/internal/config"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/v6/api"
"github.com/steadybit/cli/v6/internal/config"
"github.com/steadybit/cli/v6/internal/platform"
)

// Shell completion offers what exists on the platform: experiment keys, team keys and
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/complete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/platformtest"
"github.com/steadybit/cli/v6/internal/platformtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/config"
"github.com/steadybit/cli/internal/output"
"github.com/steadybit/cli/internal/prompt"
"github.com/steadybit/cli/v6/internal/config"
"github.com/steadybit/cli/v6/internal/output"
"github.com/steadybit/cli/v6/internal/prompt"
)

func newConfig() *cobra.Command {
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"context"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/environment"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/v6/internal/environment"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
)

const environmentID = "0190d7b2-1c5e-7f3a-8e4b-2d6f9a1c3e57"
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"time"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/execution"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/internal/resource"
"github.com/steadybit/cli/v6/internal/execution"
"github.com/steadybit/cli/v6/internal/platform"
"github.com/steadybit/cli/v6/internal/resource"
)

func runID(cmd *cobra.Command, id *int64) {
Expand Down
8 changes: 4 additions & 4 deletions internal/cli/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"strings"

"github.com/spf13/cobra"
"github.com/steadybit/cli/internal/experiment"
"github.com/steadybit/cli/internal/gitops"
"github.com/steadybit/cli/internal/jsyaml"
"github.com/steadybit/cli/internal/platform"
"github.com/steadybit/cli/v6/internal/experiment"
"github.com/steadybit/cli/v6/internal/gitops"
"github.com/steadybit/cli/v6/internal/jsyaml"
"github.com/steadybit/cli/v6/internal/platform"
)

func newExperiment() *cobra.Command {
Expand Down
Loading
Loading