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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.prism.log
dist/
/hypeman
.env
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.0"
".": "0.3.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 18
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-2d26027dfc3e310d3004f117e7a2834be18bdb5054b034262b2caa4c69b78f79.yml
openapi_spec_hash: 02e0e42393d3a95414878cdd23d1f5ad
config_hash: 35db4c99791f175865381f13a8ad6075
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-5e2239ba23ac3dbbc95b8993a491e99e9fd23fed2e6ea9cecb81b83bf34a00ff.yml
openapi_spec_hash: 4708504f9119289926b3341d083a1814
config_hash: 45d3d945ce8eea7a52c8ead4c03fcf3c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.0 (2025-11-26)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/onkernel/hypeman-cli/compare/v0.2.0...v0.3.0)

### Features

* **api:** add exec ([cc1d174](https://github.com/onkernel/hypeman-cli/commit/cc1d17479467b19436346b30256f92d99474d9ed))

## 0.2.0 (2025-11-26)

Full Changelog: [v0.1.2...v0.2.0](https://github.com/onkernel/hypeman-cli/compare/v0.1.2...v0.2.0)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/charmbracelet/x/term v0.2.1
github.com/itchyny/json2yaml v0.1.4
github.com/muesli/reflow v0.3.0
github.com/onkernel/hypeman-go v0.0.3
github.com/onkernel/hypeman-go v0.2.0
github.com/tidwall/gjson v1.18.0
github.com/tidwall/pretty v1.2.1
github.com/tidwall/sjson v1.2.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/onkernel/hypeman-go v0.0.3 h1:GXi3O8XHuMbXVc4F3gKpBiRAKnt5uVtLmUrrWgGchQg=
github.com/onkernel/hypeman-go v0.0.3/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA=
github.com/onkernel/hypeman-go v0.2.0 h1:wiDMSi7eGTKfVfdxhCg8vcFKa6xbXjWG2sSHk7EXi4Y=
github.com/onkernel/hypeman-go v0.2.0/go.mod h1:pxRRFfVcLvafZpDD1O6IjwHnem3hKEuZTCClrnGiIKA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down
29 changes: 29 additions & 0 deletions pkg/cmd/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ var instancesDelete = cli.Command{
HideHelpCommand: true,
}

var instancesExecuteCommand = cli.Command{
Name: "execute-command",
Usage: "Upgrades to WebSocket for bidirectional streaming for shell access.",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "id",
},
},
Action: handleInstancesExecuteCommand,
HideHelpCommand: true,
}

var instancesPutInStandby = cli.Command{
Name: "put-in-standby",
Usage: "Put instance in standby (pause, snapshot, delete VMM)",
Expand Down Expand Up @@ -226,6 +238,23 @@ func handleInstancesDelete(ctx context.Context, cmd *cli.Command) error {
)
}

func handleInstancesExecuteCommand(ctx context.Context, cmd *cli.Command) error {
client := hypeman.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
if !cmd.IsSet("id") && len(unusedArgs) > 0 {
cmd.Set("id", unusedArgs[0])
unusedArgs = unusedArgs[1:]
}
if len(unusedArgs) > 0 {
return fmt.Errorf("Unexpected extra arguments: %v", unusedArgs)
}
return client.Instances.ExecuteCommand(
ctx,
cmd.Value("id").(string),
option.WithMiddleware(debugMiddleware(cmd.Bool("debug"))),
)
}

func handleInstancesPutInStandby(ctx context.Context, cmd *cli.Command) error {
client := hypeman.NewClient(getDefaultRequestOptions(cmd)...)
unusedArgs := cmd.Args().Slice()
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package cmd

const Version = "0.2.0" // x-release-please-version
const Version = "0.3.0" // x-release-please-version