You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Goreleaser Pro](https://goreleaser.com/install/#pro) - **IMPORTANT: You must install goreleaser-pro, not the standard version, as this is required for our release process**
17
17
-[chglog](https://github.com/goreleaser/chglog)
18
18
19
19
Compile the CLI:
@@ -60,7 +60,7 @@ A typical workflow we encounter is updating the API and integrating those change
60
60
61
61
Prerequisites:
62
62
63
-
- Make sure you have `goreleaser`_pro_installed via `brew install --cask goreleaser/tap/goreleaser-pro`. You will need a license key (in 1pw), and then `export GORELEASER_KEY=<the key>`.
63
+
- Make sure you have **goreleaser-pro**installed via `brew install --cask goreleaser/tap/goreleaser-pro`. You will need a license key (in 1pw), and then `export GORELEASER_KEY=<the key>`.**Note: goreleaser-pro is required, not the standard goreleaser version.**
64
64
65
65
- Grab the NPM token for our org (in 1pw) and run `npm config set '//registry.npmjs.org/:_authToken'=<the token>`
Copy file name to clipboardExpand all lines: cmd/invoke.go
+105-1Lines changed: 105 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ import (
12
12
"syscall"
13
13
"time"
14
14
15
+
"github.com/onkernel/cli/pkg/util"
15
16
"github.com/onkernel/kernel-go-sdk"
16
17
"github.com/onkernel/kernel-go-sdk/option"
17
18
"github.com/pterm/pterm"
@@ -21,17 +22,31 @@ import (
21
22
varinvokeCmd=&cobra.Command{
22
23
Use: "invoke <app_name> <action_name> [flags]",
23
24
Short: "Invoke a deployed Kernel application",
24
-
Args: cobra.ExactArgs(2),
25
25
RunE: runInvoke,
26
26
}
27
27
28
+
varinvocationHistoryCmd=&cobra.Command{
29
+
Use: "history",
30
+
Short: "Show invocation history",
31
+
Args: cobra.NoArgs,
32
+
RunE: runInvocationHistory,
33
+
}
34
+
28
35
funcinit() {
29
36
invokeCmd.Flags().StringP("version", "v", "latest", "Specify a version of the app to invoke (optional, defaults to 'latest')")
30
37
invokeCmd.Flags().StringP("payload", "p", "", "JSON payload for the invocation (optional)")
31
38
invokeCmd.Flags().BoolP("sync", "s", false, "Invoke synchronously (default false). A synchronous invocation will open a long-lived HTTP POST to the Kernel API to wait for the invocation to complete. This will time out after 60 seconds, so only use this option if you expect your invocation to complete in less than 60 seconds. The default is to invoke asynchronously, in which case the CLI will open an SSE connection to the Kernel API after submitting the invocation and wait for the invocation to complete.")
39
+
40
+
invocationHistoryCmd.Flags().Int("limit", 100, "Max invocations to return (default 100)")
41
+
invocationHistoryCmd.Flags().StringP("app", "a", "", "Filter by app name")
42
+
invocationHistoryCmd.Flags().String("version", "", "Filter by invocation version")
Copy file name to clipboardExpand all lines: cmd/logs.go
+92Lines changed: 92 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ func init() {
23
23
logsCmd.Flags().BoolP("follow", "f", false, "Follow logs in real-time (stream continuously)")
24
24
logsCmd.Flags().String("since", "s", "How far back to retrieve logs. Supports duration formats: ns, us, ms, s, m, h (e.g., 5m, 2h, 1h30m). Note: 'd' for days is NOT supported - use hours instead. Can also specify timestamps: 2006-01-02 (day), 2006-01-02T15:04 (minute), 2006-01-02T15:04:05 (second), 2006-01-02T15:04:05.000 (ms). Maximum lookback is 167h (just under 7 days). Defaults to 5m if not following, 5s if following.")
25
25
logsCmd.Flags().Bool("with-timestamps", false, "Include timestamps in each log line")
26
+
logsCmd.Flags().StringP("invocation", "i", "", "Show logs for a specific invocation/run of the app. Accepts full ID or unambiguous prefix. If the invocation is still running, streaming respects --follow.")
0 commit comments