Skip to content
Merged
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
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nais/cli

go 1.26.9
go 1.26.4

tool (
github.com/Khan/genqlient
Expand All @@ -26,12 +26,12 @@ require (
github.com/lestrrat-go/jwx/v3 v3.1.1
github.com/lib/pq v1.12.3
github.com/mailgun/raymond/v2 v2.0.48
github.com/mark3labs/mcp-go v0.54.1
github.com/mark3labs/mcp-go v1.2.1
github.com/mitchellh/go-ps v1.0.0
github.com/nais/device v1.16.1
github.com/nais/krakend/pkg/migration v0.0.0-20260828065656-ff6408beb421
github.com/nais/liberator v0.0.0-20260526061822-791cc0e0457c
github.com/nais/naistrix v0.37.1
github.com/nais/naistrix v0.38.0
github.com/pterm/pterm v0.12.83
github.com/quic-go/quic-go v0.59.1
github.com/stretchr/testify v1.12.1
Expand Down Expand Up @@ -119,8 +119,8 @@ require (
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-git/go-git/v5 v5.19.1 // indirect
github.com/go-git/go-billy/v5 v5.9.2 // indirect
github.com/go-git/go-git/v5 v5.19.3 // indirect
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
Expand Down Expand Up @@ -156,7 +156,6 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.19.0 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
github.com/lestrrat-go/dsig v1.2.1 // indirect
Expand Down Expand Up @@ -187,7 +186,7 @@ require (
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pb33f/ordered-map/v2 v2.3.1 // indirect
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
github.com/pjbgf/sha1cd v0.6.0 // indirect
github.com/pjbgf/sha1cd v0.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
Expand Down Expand Up @@ -267,5 +266,5 @@ require (
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
software.sslmate.com/src/go-pkcs12 v0.7.1 // indirect
software.sslmate.com/src/go-pkcs12 v0.7.3 // indirect
)
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ github.com/go-chi/chi/v5 v5.2.5 h1:Eg4myHZBjyvJmAFjFvWgrqDTXFyOzjj7YIm3L3mu6Ug=
github.com/go-chi/chi/v5 v5.2.5/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
github.com/go-git/go-billy/v5 v5.9.0 h1:jItGXszUDRtR/AlferWPTMN4j38BQ88XnXKbilmmBPA=
github.com/go-git/go-billy/v5 v5.9.0/go.mod h1:jCnQMLj9eUgGU7+ludSTYoZL/GGmii14RxKFj7ROgHw=
github.com/go-git/go-billy/v5 v5.9.2 h1:OXFSRyz4g20upsGDJgQG9Bak1l/ZEv8GHVYB52O71sE=
github.com/go-git/go-billy/v5 v5.9.2/go.mod h1:ExsU+jcGwXTBOnyilvAnEM1wug1IxHr4yP2ZXsNRtV0=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.19.1 h1:nX27AnaU43/K5bKktKwgBmR9lawoYVe1Ckg0rgzzN00=
github.com/go-git/go-git/v5 v5.19.1/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ=
github.com/go-git/go-git/v5 v5.19.3 h1:qHttbZ+Am7wEjdTpR1XMQ4rl42FK9SIXzZ4o9x7s6M4=
github.com/go-git/go-git/v5 v5.19.3/go.mod h1:Ye4C8dVigkqrv9UsB4NMdSLV4yAIkLiIhW61gcOyhl4=
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down Expand Up @@ -367,8 +367,8 @@ github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqA
github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18=
github.com/mailru/easyjson v0.9.2 h1:dX8U45hQsZpxd80nLvDGihsQ/OxlvTkVUXH2r/8cb2M=
github.com/mailru/easyjson v0.9.2/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
github.com/mark3labs/mcp-go v0.54.1 h1:Ap/ptEB9FtWzFKM8NDsTA7QDxerQOC06eZigrTldVj0=
github.com/mark3labs/mcp-go v0.54.1/go.mod h1:+8WclSK1ZUweCP3hvktSji8n8ABG/95QaEkeVE/Uwas=
github.com/mark3labs/mcp-go v1.2.1 h1:gd8VD3feMAVycwAM0x1nhv42Q1oLLjfOyowoUzHULB8=
github.com/mark3labs/mcp-go v1.2.1/go.mod h1:r2fW4o3wsoJ7IMsx1Wuq5xeP8PRGXPDfNveoGAYbb/s=
github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ=
github.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
github.com/mattn/go-runewidth v0.0.31 h1:1oCV4ReTlosDBc6rYRw5cL8S/4y8iv5oRl4SJ5IBgwo=
Expand Down Expand Up @@ -413,8 +413,8 @@ github.com/nais/krakend/pkg/migration v0.0.0-20260828065656-ff6408beb421 h1:nEcK
github.com/nais/krakend/pkg/migration v0.0.0-20260828065656-ff6408beb421/go.mod h1:Siwxo1B39dMTFYEwTzPwr1+Rg5r/0OAtHC3BbKh/XPA=
github.com/nais/liberator v0.0.0-20260526061822-791cc0e0457c h1:IS4qWh2Of5rV7UY4YnQKg7rxP9lx5BzfFv1XNMZbCtI=
github.com/nais/liberator v0.0.0-20260526061822-791cc0e0457c/go.mod h1:MT3N4X8eK6cJ94zoybdIY8JCaPrHCnw4Pde8piMS/v4=
github.com/nais/naistrix v0.37.1 h1:cDEvy88FslqPHTNoNWhOet30rKliTZKzgozthHkwofs=
github.com/nais/naistrix v0.37.1/go.mod h1:yrDLe3FbYjsPmyF+X6ax9Afw2jWPjc0ihwwvcm5McDU=
github.com/nais/naistrix v0.38.0 h1:nzgvr7EnAnG/+pRER7+GfE3x1JRbqN48JUYKw1IcLqc=
github.com/nais/naistrix v0.38.0/go.mod h1:yrDLe3FbYjsPmyF+X6ax9Afw2jWPjc0ihwwvcm5McDU=
github.com/nais/pgrator v0.0.0-20260113113020-3944d387b42d h1:Ciq0quRhHOeeOTWy9WNmLe04uNYhe7l9qIrFTpFC5y0=
github.com/nais/pgrator v0.0.0-20260113113020-3944d387b42d/go.mod h1:jpksYq94zmmjIIhjOBl+9GpEkTbaeLrrcINPQx9REx4=
github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw=
Expand All @@ -431,8 +431,8 @@ github.com/pb33f/ordered-map/v2 v2.3.1 h1:5319HDO0aw4DA4gzi+zv4FXU9UlSs3xGZ40wcP
github.com/pb33f/ordered-map/v2 v2.3.1/go.mod h1:qxFQgd0PkVUtOMCkTapqotNgzRhMPL7VvaHKbd1HnmQ=
github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY=
github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/pjbgf/sha1cd v0.6.0 h1:3WJ8Wz8gvDz29quX1OcEmkAlUg9diU4GxJHqs0/XiwU=
github.com/pjbgf/sha1cd v0.6.0/go.mod h1:lhpGlyHLpQZoxMv8HcgXvZEhcGs0PG/vsZnEJ7H0iCM=
github.com/pjbgf/sha1cd v0.7.0 h1:ZRNPKHj+gfkLBf0KJv/p1Hmz+7bqCT5o311YX0nq+DA=
github.com/pjbgf/sha1cd v0.7.0/go.mod h1:pKR5Li+qTCo+ebqITZfwPlJGoCFCvSO00qxjbNtTUFQ=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down Expand Up @@ -781,5 +781,5 @@ sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80
sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
software.sslmate.com/src/go-pkcs12 v0.7.1 h1:bxkUPRsvTPNRBZa4M/aSX4PyMOEbq3V8I6hbkG4F4Q8=
software.sslmate.com/src/go-pkcs12 v0.7.1/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI=
software.sslmate.com/src/go-pkcs12 v0.7.3 h1:JBQD3FDqYjTeyDAeZQklj2ar88ykBLtALloPJHyAauU=
software.sslmate.com/src/go-pkcs12 v0.7.3/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI=
10 changes: 7 additions & 3 deletions internal/activity/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ func TestPostgresActivityEntriesCanBeListed(t *testing.T) {
{"__typename":"PostgresBranchCreatedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:21:46Z","message":"Postgres branch created: restore","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresBranchActivatedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:23:46Z","message":"Postgres branch activated: restore","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresBranchDeletedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:25:46Z","message":"Postgres branch deleted: main","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresBranchActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:26:46Z","message":"Postgres branch created: legacy","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresCreatedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:26:46Z","message":"Created Postgres","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresUpdatedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:27:42Z","message":"Updated Postgres","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"},
{"__typename":"PostgresDeletedActivityLogEntry","actor":"user@example.com","createdAt":"2026-10-05T08:31:16Z","message":"Deleted Postgres","environmentName":"dev-gcp","resourceType":"POSTGRES","resourceName":"relay-test"}
]}`
var entries gql.GetTeamActivityTeamActivityLogActivityLogEntryConnection
if err := json.Unmarshal([]byte(response), &entries); err != nil {
t.Fatalf("decoding branch and historical Postgres activity: %v", err)
t.Fatalf("decoding Postgres branch and instance activity: %v", err)
}
for i, want := range []string{"Postgres branch created: restore", "Postgres branch activated: restore", "Postgres branch deleted: main", "Postgres branch created: legacy", "Updated Postgres", "Deleted Postgres"} {
wantMessages := []string{"Postgres branch created: restore", "Postgres branch activated: restore", "Postgres branch deleted: main", "Created Postgres", "Updated Postgres", "Deleted Postgres"}
if got := len(entries.Nodes); got != len(wantMessages) {
t.Fatalf("got %d entries, want %d", got, len(wantMessages))
}
for i, want := range wantMessages {
if got := entries.Nodes[i].GetMessage(); got != want {
t.Errorf("entry %d: got %q, want %q", i, got, want)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/alpha/postgres/command/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func psqlCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "psql", Title: "Connect to Nais Postgres via psql (experimental).",
Description: "Request personal access, open a local relay tunnel and start psql with end-to-end TLS verification. If --reason is omitted, prompt for an audit reason interactively.",
Args: []naistrix.Argument{{Name: "postgres"}}, Flags: f,
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to connect to"}}, Flags: f,
AutoCompleteFunc: autoCompletePostgresNames(f.Postgres),
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
request, err := prepareAccessRequest(args.Get("postgres"), f, out)
Expand Down Expand Up @@ -98,7 +98,7 @@ func proxyCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "proxy", Title: "Expose a Nais Postgres relay tunnel locally (experimental).",
Description: "Request personal access and listen on loopback. If --reason is omitted, prompt for an audit reason interactively. PostgreSQL clients must verify the server certificate; use psql for automatic TLS setup. Credentials are not printed unless --print-password is set.",
Args: []naistrix.Argument{{Name: "postgres"}}, Flags: f,
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to proxy"}}, Flags: f,
AutoCompleteFunc: autoCompletePostgresNames(f.Postgres),
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
if net.ParseIP(f.Host) == nil || !net.ParseIP(f.Host).IsLoopback() {
Expand Down
8 changes: 4 additions & 4 deletions internal/alpha/postgres/command/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func branchListCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "list", Title: "List branches of a Postgres.",
Description: "List the branches of a Postgres with their status and whether each one is active.",
Args: []naistrix.Argument{{Name: "postgres"}}, Flags: f,
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to list branches for"}}, Flags: f,
AutoCompleteFunc: autoCompletePostgresNames(parent),
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
env, err := branchEnvironment(ctx, parent, args.Get("postgres"))
Expand Down Expand Up @@ -86,7 +86,7 @@ func branchCreateCommand(parent *flag.Postgres) *naistrix.Command {
{Description: "Restore from the active branch at a UTC timestamp (Z means UTC).", Command: "my-postgres restored --at 2026-10-06T10:00:00Z"},
{Description: "Restore from a specific source branch.", Command: "my-postgres restored --from main --at 2026-10-06T10:00:00Z"},
},
Args: []naistrix.Argument{{Name: "postgres", Repeatable: true}},
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance; optionally add a new branch name next", Repeatable: true}},
AutoCompleteFunc: autoCompletePostgresNames(parent),
ValidateFunc: naistrix.ValidateFuncs(
validation.RequireTeam(f),
Expand Down Expand Up @@ -161,7 +161,7 @@ func branchActivateCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "activate", Title: "Request activation of a Postgres branch.", Flags: f,
Description: "Request that a branch becomes the active branch of the Postgres. Activation continues asynchronously; use branch list to check progress.",
Args: []naistrix.Argument{{Name: "postgres"}, {Name: "branch"}},
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance"}, {Name: "branch", Prompt: "Name of the branch to activate"}},
AutoCompleteFunc: autoCompletePostgresBranches(parent),
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
env, err := branchEnvironment(ctx, parent, args.Get("postgres"))
Expand Down Expand Up @@ -203,7 +203,7 @@ func branchDeleteCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "delete", Title: "Delete an inactive Postgres branch.", Flags: f,
Description: "Delete an inactive branch, even if workloads still use it. Referring apps/jobs are listed with a warning before confirmation. --yes skips confirmation, not the usage check or warning.",
Args: []naistrix.Argument{{Name: "postgres"}, {Name: "branch"}},
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance"}, {Name: "branch", Prompt: "Name of the inactive branch to delete"}},
AutoCompleteFunc: autoCompletePostgresBranches(parent),
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
env, err := branchEnvironment(ctx, parent, args.Get("postgres"))
Expand Down
2 changes: 1 addition & 1 deletion internal/alpha/postgres/command/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func instanceGetCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "get", Title: "Get Postgres details and readiness.",
Description: "Show configured settings and a coarse platform-reported status, not SQL connectivity, workload readiness, or completion of end-to-end resource updates. Omitted resource requests are not configured; defaults are not inferred. Detailed provisioning stages are unavailable. Use branch commands to inspect branches.",
Args: []naistrix.Argument{{Name: "postgres"}}, Flags: f,
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to inspect"}}, Flags: f,
AutoCompleteFunc: autoCompletePostgresNames(parent),
Examples: []naistrix.Example{
{Description: "Describe a Postgres in a specific environment.", Command: "my-postgres -t my-team -e dev-gcp"},
Expand Down
6 changes: 3 additions & 3 deletions internal/alpha/postgres/command/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func instanceCreateCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "create", Title: "Create a Postgres instance.", Flags: f,
Description: "Create a new Postgres instance. Provisioning continues asynchronously.",
Args: []naistrix.Argument{{Name: "postgres"}},
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the new Postgres instance"}},
Examples: []naistrix.Example{
{Description: "Select the destination environment interactively and create a Postgres with platform defaults.", Command: "my-postgres -t my-team"},
{Description: "Create a Postgres in a specific environment.", Command: "my-postgres -t my-team -e dev-gcp"},
Expand Down Expand Up @@ -75,7 +75,7 @@ func instanceUpdateCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "update", Title: "Update a Postgres instance.", Flags: f,
Description: "Compare configured values with the requested changes before updating provided fields. Current resource values are configured requests, not effective runtime resources or SQL readiness. A subsequent nais apply may overwrite API updates on manifest-managed Postgres.",
Args: []naistrix.Argument{{Name: "postgres"}}, AutoCompleteFunc: autoCompletePostgresNames(parent),
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to update"}}, AutoCompleteFunc: autoCompletePostgresNames(parent),
Examples: []naistrix.Example{
{Description: "Change requested CPU and memory.", Command: "my-postgres -t my-team -e dev-gcp --cpu 200m --memory 1Gi"},
{Description: "Disable high availability.", Command: "my-postgres -t my-team -e dev-gcp --high-availability false"},
Expand Down Expand Up @@ -153,7 +153,7 @@ func instanceDeleteCommand(parent *flag.Postgres) *naistrix.Command {
return &naistrix.Command{
Name: "delete", Title: "Request deletion of an entire Postgres instance.", Flags: f,
Description: "Irreversibly delete a Postgres and all its branches and data. Unlike branch delete, this removes the whole instance. Workloads and bindings must no longer reference it.",
Args: []naistrix.Argument{{Name: "postgres"}}, AutoCompleteFunc: autoCompletePostgresNames(parent),
Args: []naistrix.Argument{{Name: "postgres", Prompt: "Name of the Postgres instance to delete"}}, AutoCompleteFunc: autoCompletePostgresNames(parent),
Examples: []naistrix.Example{{Description: "Request deletion of an entire Postgres after removing its consumers.", Command: "my-postgres -t my-team -e dev-gcp"}},
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
if parent.Team == "" {
Expand Down
2 changes: 1 addition & 1 deletion internal/app/command/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func activity(parentFlags *flag.App) *naistrix.Command {
Title: "Show activity for an application.",
Description: "Displays recent events for a specific application, such as deployments and configuration changes. Results can be filtered by activity type.",
Args: []naistrix.Argument{
{Name: "name"},
{Name: "name", Prompt: "Name of the application to show activity for"},
},
Flags: flags,
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/app/command/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func del(parentFlags *flag.App) *naistrix.Command {
Description: "Permanently deletes an application.",
Flags: flags,
Args: []naistrix.Argument{
{Name: "name"},
{Name: "name", Prompt: "Name of the application to delete"},
},
RunFunc: func(ctx context.Context, args *naistrix.Arguments, out *naistrix.OutputWriter) error {
name := args.Get("name")
Expand Down
Loading
Loading