From e19e0446a5286c8105f7b77915fbb2013b34178e Mon Sep 17 00:00:00 2001 From: masnwilliams <43387599+masnwilliams@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:53:37 +0000 Subject: [PATCH 1/4] docs: document managed auth, credentials, and utility CLI commands Add CLI reference for `kernel auth connections`, `kernel credentials`, and `kernel credential-providers`, plus `kernel status`, `kernel upgrade`, and `kernel completion` on the CLI index. Co-Authored-By: Claude Opus 4.7 --- reference/cli.mdx | 22 ++++- reference/cli/auth.mdx | 211 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 232 insertions(+), 1 deletion(-) diff --git a/reference/cli.mdx b/reference/cli.mdx index edcb503..89daaa5 100644 --- a/reference/cli.mdx +++ b/reference/cli.mdx @@ -29,7 +29,7 @@ kernel --version Scaffold new Kernel apps from templates. - Login, logout, and check auth status. + Login, manage managed auth connections, credentials, and providers. Create, view, and manage Kernel browsers. @@ -91,6 +91,26 @@ kernel deploy index.ts -o json See individual command documentation for JSON output availability. +## Utility Commands + +### `kernel status` +Check the operational status of Kernel services. + +- `--output json`, `-o json` - Output raw JSON object. + +### `kernel upgrade` +Upgrade the Kernel CLI to the latest version. + +- `--dry-run` - Show what would be executed without running it. + +### `kernel completion ` +Generate a shell autocompletion script (`bash`, `zsh`, `fish`, or `powershell`). + +```bash +# Load completions for the current zsh session +source <(kernel completion zsh) +``` + Looking for the API? See the [API Reference](https://kernel.sh/docs/api-reference/invocations/invoke-an-action). diff --git a/reference/cli/auth.mdx b/reference/cli/auth.mdx index 23b2771..e79829d 100644 --- a/reference/cli/auth.mdx +++ b/reference/cli/auth.mdx @@ -24,6 +24,217 @@ export KERNEL_API_KEY=sk_1234abcd Create and manage API keys from the Kernel dashboard or with [`kernel api-keys`](/reference/cli/api-keys). +## Managed auth connections +A managed auth connection keeps a [profile](/auth/profiles) logged into a domain so future browsers reuse the authenticated session. See [Managed auth](/auth/overview) for concepts and the [programmatic flow](/auth/programmatic) for the SDK equivalent. + +### `kernel auth connections create` +Create a managed auth connection for a profile and domain. + +| Flag | Description | +|------|-------------| +| `--profile-name ` | Name of the profile to manage (required). | +| `--domain ` | Target domain for authentication (required). | +| `--allowed-domain ` | Additional allowed domains (repeatable). | +| `--login-url ` | Login page URL to skip discovery. | +| `--health-check-interval ` | Seconds between health checks (300–86400). | +| `--proxy-id ` | Proxy ID to use. | +| `--proxy-name ` | Proxy name to use. | +| `--credential-provider ` | External credential provider name. | +| `--credential-name ` | Kernel credential name to use. | +| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | +| `--credential-auto` | Look up the credential by domain from the provider (defaults to true when `--credential-provider` is set without `--credential-path`). | +| `--no-save-credentials` | Don't save credentials after a successful login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections list` +List managed auth connections. + +| Flag | Description | +|------|-------------| +| `--domain ` | Filter by domain. | +| `--profile-name ` | Filter by profile name. | +| `--limit ` | Maximum number of results to return. | +| `--offset ` | Number of results to skip. | +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel auth connections get ` +Get a managed auth connection by ID. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections login ` +Start a login flow and return a hosted URL for authentication. + +| Flag | Description | +|------|-------------| +| `--proxy-id ` | Proxy ID to use for this login. | +| `--proxy-name ` | Proxy name to use for this login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections submit ` +Submit field values to an in-progress login flow. Poll the connection (or use `follow`) to track progress. + +| Flag | Description | +|------|-------------| +| `--field ` | Field name/value pair (repeatable). | +| `--mfa-option-id ` | MFA option ID when an MFA method was selected. | +| `--sign-in-option-id ` | Sign-in option ID when the flow returned non-MFA choices. | +| `--sso-button-selector ` | XPath selector when choosing an SSO button. | +| `--sso-provider ` | SSO provider when choosing by provider (e.g. `google`, `github`). | +| `--output json`, `-o json` | Output raw JSON object. | + +```bash +# Submit username and password +kernel auth connections submit --field username=myuser --field password=mypass + +# Select an MFA option +kernel auth connections submit --mfa-option-id +``` + +### `kernel auth connections follow ` +Stream real-time login flow state updates over SSE. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON events. | + +### `kernel auth connections update ` +Update connection settings such as login URL, health checks, credential source, and proxy. + +| Flag | Description | +|------|-------------| +| `--login-url ` | Login page URL (set to an empty string to clear). | +| `--allowed-domain ` | Additional allowed domains (replaces the existing list). | +| `--health-check-interval ` | Seconds between health checks. | +| `--proxy-id ` | Proxy ID to use. | +| `--proxy-name ` | Proxy name to use. | +| `--credential-provider ` | External credential provider name. | +| `--credential-name ` | Kernel credential name to use. | +| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | +| `--credential-auto` | Look up the credential by domain from the provider. | +| `--save-credentials` | Save credentials after a successful login. | +| `--no-save-credentials` | Don't save credentials after a successful login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections delete ` +Delete a managed auth connection. + +| Flag | Description | +|------|-------------| +| `--yes`, `-y` | Skip the confirmation prompt. | + +## Credentials +Store login field values, TOTP secrets, and SSO settings that managed auth connections use to authenticate. See [Credentials](/auth/credentials) for concepts. + +### `kernel credentials create` +Create a new credential. + +| Flag | Description | +|------|-------------| +| `--name ` | Unique name for the credential (required). | +| `--domain ` | Target domain this credential is for (required). | +| `--value ` | Field name/value pair (repeatable, e.g. `--value username=myuser --value password=mypass`). | +| `--totp-secret ` | Base32-encoded TOTP secret for 2FA. | +| `--sso-provider ` | SSO provider (e.g. `google`, `github`, `microsoft`). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials list` +List credentials. + +| Flag | Description | +|------|-------------| +| `--domain ` | Filter by domain. | +| `--limit ` | Maximum number of results to return. | +| `--offset ` | Number of results to skip. | +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credentials get ` +Get a credential by ID or name. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials update ` +Update a credential. + +| Flag | Description | +|------|-------------| +| `--name ` | New name for the credential. | +| `--value ` | Field name/value pair to update (repeatable). | +| `--totp-secret ` | Base32-encoded TOTP secret (set to an empty string to remove). | +| `--sso-provider ` | SSO provider (set to an empty string to remove). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials totp-code ` +Print the current TOTP code for a credential. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials delete ` +Delete a credential by ID or name. + +## Credential providers +Connect an external secrets manager (e.g. 1Password) so managed auth connections can look up credentials at login time instead of storing them in Kernel. + +### `kernel credential-providers create` +Register a new credential provider. + +| Flag | Description | +|------|-------------| +| `--provider-type ` | Provider type (e.g. `onepassword`). | +| `--name ` | Human-readable name for this provider instance. | +| `--token ` | Service account token for the provider. | +| `--cache-ttl ` | How long to cache credential lists (default: 300). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers list` +List credential providers. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credential-providers get ` +Get a credential provider by ID. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers list-items ` +List items available from a credential provider. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credential-providers test ` +Test the connection to a credential provider. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers update ` +Update a credential provider. + +| Flag | Description | +|------|-------------| +| `--name ` | New human-readable name. | +| `--token ` | New service account token (to rotate credentials). | +| `--cache-ttl ` | How long to cache credential lists. | +| `--enabled` | Whether the provider is enabled for credential lookups. | +| `--priority ` | Priority for credential lookups (lower numbers are checked first). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers delete ` +Delete a credential provider. + ## Global flags The following flags are available on every CLI command: From 9761d9aeb8395f56adfd3f874d856c67a1c098bc Mon Sep 17 00:00:00 2001 From: masnwilliams <43387599+masnwilliams@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:59:18 +0000 Subject: [PATCH 2/4] docs: move managed auth CLI commands to their own page Split managed auth connections, credentials, and credential-providers out of the CLI Authentication page (which covers authenticating the CLI itself) into a dedicated Managed Auth page, and add it to the nav. Co-Authored-By: Claude Opus 4.7 --- docs.json | 1 + reference/cli.mdx | 5 +- reference/cli/auth.mdx | 211 -------------------------------- reference/cli/managed-auth.mdx | 216 +++++++++++++++++++++++++++++++++ 4 files changed, 221 insertions(+), 212 deletions(-) create mode 100644 reference/cli/managed-auth.mdx diff --git a/docs.json b/docs.json index 8e839d8..6c5c3ef 100644 --- a/docs.json +++ b/docs.json @@ -263,6 +263,7 @@ "reference/cli", "reference/cli/create", "reference/cli/auth", + "reference/cli/managed-auth", "reference/cli/browsers", "reference/cli/apps", "reference/cli/projects", diff --git a/reference/cli.mdx b/reference/cli.mdx index 89daaa5..4ddb5c3 100644 --- a/reference/cli.mdx +++ b/reference/cli.mdx @@ -29,7 +29,10 @@ kernel --version Scaffold new Kernel apps from templates. - Login, manage managed auth connections, credentials, and providers. + Login, logout, and check auth status. + + + Manage auth connections, credentials, and credential providers. Create, view, and manage Kernel browsers. diff --git a/reference/cli/auth.mdx b/reference/cli/auth.mdx index e79829d..23b2771 100644 --- a/reference/cli/auth.mdx +++ b/reference/cli/auth.mdx @@ -24,217 +24,6 @@ export KERNEL_API_KEY=sk_1234abcd Create and manage API keys from the Kernel dashboard or with [`kernel api-keys`](/reference/cli/api-keys). -## Managed auth connections -A managed auth connection keeps a [profile](/auth/profiles) logged into a domain so future browsers reuse the authenticated session. See [Managed auth](/auth/overview) for concepts and the [programmatic flow](/auth/programmatic) for the SDK equivalent. - -### `kernel auth connections create` -Create a managed auth connection for a profile and domain. - -| Flag | Description | -|------|-------------| -| `--profile-name ` | Name of the profile to manage (required). | -| `--domain ` | Target domain for authentication (required). | -| `--allowed-domain ` | Additional allowed domains (repeatable). | -| `--login-url ` | Login page URL to skip discovery. | -| `--health-check-interval ` | Seconds between health checks (300–86400). | -| `--proxy-id ` | Proxy ID to use. | -| `--proxy-name ` | Proxy name to use. | -| `--credential-provider ` | External credential provider name. | -| `--credential-name ` | Kernel credential name to use. | -| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | -| `--credential-auto` | Look up the credential by domain from the provider (defaults to true when `--credential-provider` is set without `--credential-path`). | -| `--no-save-credentials` | Don't save credentials after a successful login. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel auth connections list` -List managed auth connections. - -| Flag | Description | -|------|-------------| -| `--domain ` | Filter by domain. | -| `--profile-name ` | Filter by profile name. | -| `--limit ` | Maximum number of results to return. | -| `--offset ` | Number of results to skip. | -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel auth connections get ` -Get a managed auth connection by ID. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel auth connections login ` -Start a login flow and return a hosted URL for authentication. - -| Flag | Description | -|------|-------------| -| `--proxy-id ` | Proxy ID to use for this login. | -| `--proxy-name ` | Proxy name to use for this login. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel auth connections submit ` -Submit field values to an in-progress login flow. Poll the connection (or use `follow`) to track progress. - -| Flag | Description | -|------|-------------| -| `--field ` | Field name/value pair (repeatable). | -| `--mfa-option-id ` | MFA option ID when an MFA method was selected. | -| `--sign-in-option-id ` | Sign-in option ID when the flow returned non-MFA choices. | -| `--sso-button-selector ` | XPath selector when choosing an SSO button. | -| `--sso-provider ` | SSO provider when choosing by provider (e.g. `google`, `github`). | -| `--output json`, `-o json` | Output raw JSON object. | - -```bash -# Submit username and password -kernel auth connections submit --field username=myuser --field password=mypass - -# Select an MFA option -kernel auth connections submit --mfa-option-id -``` - -### `kernel auth connections follow ` -Stream real-time login flow state updates over SSE. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON events. | - -### `kernel auth connections update ` -Update connection settings such as login URL, health checks, credential source, and proxy. - -| Flag | Description | -|------|-------------| -| `--login-url ` | Login page URL (set to an empty string to clear). | -| `--allowed-domain ` | Additional allowed domains (replaces the existing list). | -| `--health-check-interval ` | Seconds between health checks. | -| `--proxy-id ` | Proxy ID to use. | -| `--proxy-name ` | Proxy name to use. | -| `--credential-provider ` | External credential provider name. | -| `--credential-name ` | Kernel credential name to use. | -| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | -| `--credential-auto` | Look up the credential by domain from the provider. | -| `--save-credentials` | Save credentials after a successful login. | -| `--no-save-credentials` | Don't save credentials after a successful login. | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel auth connections delete ` -Delete a managed auth connection. - -| Flag | Description | -|------|-------------| -| `--yes`, `-y` | Skip the confirmation prompt. | - -## Credentials -Store login field values, TOTP secrets, and SSO settings that managed auth connections use to authenticate. See [Credentials](/auth/credentials) for concepts. - -### `kernel credentials create` -Create a new credential. - -| Flag | Description | -|------|-------------| -| `--name ` | Unique name for the credential (required). | -| `--domain ` | Target domain this credential is for (required). | -| `--value ` | Field name/value pair (repeatable, e.g. `--value username=myuser --value password=mypass`). | -| `--totp-secret ` | Base32-encoded TOTP secret for 2FA. | -| `--sso-provider ` | SSO provider (e.g. `google`, `github`, `microsoft`). | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credentials list` -List credentials. - -| Flag | Description | -|------|-------------| -| `--domain ` | Filter by domain. | -| `--limit ` | Maximum number of results to return. | -| `--offset ` | Number of results to skip. | -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel credentials get ` -Get a credential by ID or name. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credentials update ` -Update a credential. - -| Flag | Description | -|------|-------------| -| `--name ` | New name for the credential. | -| `--value ` | Field name/value pair to update (repeatable). | -| `--totp-secret ` | Base32-encoded TOTP secret (set to an empty string to remove). | -| `--sso-provider ` | SSO provider (set to an empty string to remove). | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credentials totp-code ` -Print the current TOTP code for a credential. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credentials delete ` -Delete a credential by ID or name. - -## Credential providers -Connect an external secrets manager (e.g. 1Password) so managed auth connections can look up credentials at login time instead of storing them in Kernel. - -### `kernel credential-providers create` -Register a new credential provider. - -| Flag | Description | -|------|-------------| -| `--provider-type ` | Provider type (e.g. `onepassword`). | -| `--name ` | Human-readable name for this provider instance. | -| `--token ` | Service account token for the provider. | -| `--cache-ttl ` | How long to cache credential lists (default: 300). | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credential-providers list` -List credential providers. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel credential-providers get ` -Get a credential provider by ID. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credential-providers list-items ` -List items available from a credential provider. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON array. | - -### `kernel credential-providers test ` -Test the connection to a credential provider. - -| Flag | Description | -|------|-------------| -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credential-providers update ` -Update a credential provider. - -| Flag | Description | -|------|-------------| -| `--name ` | New human-readable name. | -| `--token ` | New service account token (to rotate credentials). | -| `--cache-ttl ` | How long to cache credential lists. | -| `--enabled` | Whether the provider is enabled for credential lookups. | -| `--priority ` | Priority for credential lookups (lower numbers are checked first). | -| `--output json`, `-o json` | Output raw JSON object. | - -### `kernel credential-providers delete ` -Delete a credential provider. - ## Global flags The following flags are available on every CLI command: diff --git a/reference/cli/managed-auth.mdx b/reference/cli/managed-auth.mdx new file mode 100644 index 0000000..224b1fd --- /dev/null +++ b/reference/cli/managed-auth.mdx @@ -0,0 +1,216 @@ +--- +title: "Managed Auth" +--- + +Manage [managed auth](/auth/overview) connections, stored credentials, and external credential providers from the CLI. For authenticating the CLI itself (login, logout, API keys), see [Authentication](/reference/cli/auth). + +## Connections +A managed auth connection keeps a [profile](/auth/profiles) logged into a domain so future browsers reuse the authenticated session. See [Managed auth](/auth/overview) for concepts and the [programmatic flow](/auth/programmatic) for the SDK equivalent. + +### `kernel auth connections create` +Create a managed auth connection for a profile and domain. + +| Flag | Description | +|------|-------------| +| `--profile-name ` | Name of the profile to manage (required). | +| `--domain ` | Target domain for authentication (required). | +| `--allowed-domain ` | Additional allowed domains (repeatable). | +| `--login-url ` | Login page URL to skip discovery. | +| `--health-check-interval ` | Seconds between health checks (300–86400). | +| `--proxy-id ` | Proxy ID to use. | +| `--proxy-name ` | Proxy name to use. | +| `--credential-provider ` | External credential provider name. | +| `--credential-name ` | Kernel credential name to use. | +| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | +| `--credential-auto` | Look up the credential by domain from the provider (defaults to true when `--credential-provider` is set without `--credential-path`). | +| `--no-save-credentials` | Don't save credentials after a successful login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections list` +List managed auth connections. + +| Flag | Description | +|------|-------------| +| `--domain ` | Filter by domain. | +| `--profile-name ` | Filter by profile name. | +| `--limit ` | Maximum number of results to return. | +| `--offset ` | Number of results to skip. | +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel auth connections get ` +Get a managed auth connection by ID. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections login ` +Start a login flow and return a hosted URL for authentication. + +| Flag | Description | +|------|-------------| +| `--proxy-id ` | Proxy ID to use for this login. | +| `--proxy-name ` | Proxy name to use for this login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections submit ` +Submit field values to an in-progress login flow. Poll the connection (or use `follow`) to track progress. + +| Flag | Description | +|------|-------------| +| `--field ` | Field name/value pair (repeatable). | +| `--mfa-option-id ` | MFA option ID when an MFA method was selected. | +| `--sign-in-option-id ` | Sign-in option ID when the flow returned non-MFA choices. | +| `--sso-button-selector ` | XPath selector when choosing an SSO button. | +| `--sso-provider ` | SSO provider when choosing by provider (e.g. `google`, `github`). | +| `--output json`, `-o json` | Output raw JSON object. | + +```bash +# Submit username and password +kernel auth connections submit --field username=myuser --field password=mypass + +# Select an MFA option +kernel auth connections submit --mfa-option-id +``` + +### `kernel auth connections follow ` +Stream real-time login flow state updates over SSE. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON events. | + +### `kernel auth connections update ` +Update connection settings such as login URL, health checks, credential source, and proxy. + +| Flag | Description | +|------|-------------| +| `--login-url ` | Login page URL (set to an empty string to clear). | +| `--allowed-domain ` | Additional allowed domains (replaces the existing list). | +| `--health-check-interval ` | Seconds between health checks. | +| `--proxy-id ` | Proxy ID to use. | +| `--proxy-name ` | Proxy name to use. | +| `--credential-provider ` | External credential provider name. | +| `--credential-name ` | Kernel credential name to use. | +| `--credential-path ` | Provider-specific path (e.g. `VaultName/ItemName`). | +| `--credential-auto` | Look up the credential by domain from the provider. | +| `--save-credentials` | Save credentials after a successful login. | +| `--no-save-credentials` | Don't save credentials after a successful login. | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel auth connections delete ` +Delete a managed auth connection. + +| Flag | Description | +|------|-------------| +| `--yes`, `-y` | Skip the confirmation prompt. | + +## Credentials +Store login field values, TOTP secrets, and SSO settings that managed auth connections use to authenticate. See [Credentials](/auth/credentials) for concepts. + +### `kernel credentials create` +Create a new credential. + +| Flag | Description | +|------|-------------| +| `--name ` | Unique name for the credential (required). | +| `--domain ` | Target domain this credential is for (required). | +| `--value ` | Field name/value pair (repeatable, e.g. `--value username=myuser --value password=mypass`). | +| `--totp-secret ` | Base32-encoded TOTP secret for 2FA. | +| `--sso-provider ` | SSO provider (e.g. `google`, `github`, `microsoft`). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials list` +List credentials. + +| Flag | Description | +|------|-------------| +| `--domain ` | Filter by domain. | +| `--limit ` | Maximum number of results to return. | +| `--offset ` | Number of results to skip. | +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credentials get ` +Get a credential by ID or name. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials update ` +Update a credential. + +| Flag | Description | +|------|-------------| +| `--name ` | New name for the credential. | +| `--value ` | Field name/value pair to update (repeatable). | +| `--totp-secret ` | Base32-encoded TOTP secret (set to an empty string to remove). | +| `--sso-provider ` | SSO provider (set to an empty string to remove). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials totp-code ` +Print the current TOTP code for a credential. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credentials delete ` +Delete a credential by ID or name. + +## Credential providers +Connect an external secrets manager (e.g. 1Password) so managed auth connections can look up credentials at login time instead of storing them in Kernel. + +### `kernel credential-providers create` +Register a new credential provider. + +| Flag | Description | +|------|-------------| +| `--provider-type ` | Provider type (e.g. `onepassword`). | +| `--name ` | Human-readable name for this provider instance. | +| `--token ` | Service account token for the provider. | +| `--cache-ttl ` | How long to cache credential lists (default: 300). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers list` +List credential providers. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credential-providers get ` +Get a credential provider by ID. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers list-items ` +List items available from a credential provider. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +### `kernel credential-providers test ` +Test the connection to a credential provider. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers update ` +Update a credential provider. + +| Flag | Description | +|------|-------------| +| `--name ` | New human-readable name. | +| `--token ` | New service account token (to rotate credentials). | +| `--cache-ttl ` | How long to cache credential lists. | +| `--enabled` | Whether the provider is enabled for credential lookups. | +| `--priority ` | Priority for credential lookups (lower numbers are checked first). | +| `--output json`, `-o json` | Output raw JSON object. | + +### `kernel credential-providers delete ` +Delete a credential provider. From c5294b6675e9596b748b0bccd7a4e9f3af3367fb Mon Sep 17 00:00:00 2001 From: masnwilliams <43387599+masnwilliams@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:32:42 +0000 Subject: [PATCH 3/4] docs: reorganize CLI reference to mirror the OpenAPI tag structure Split the consolidated browsers, apps, and managed-auth pages into one page per API tag, grouped and ordered to match the OpenAPI spec (browser controls, observability, resources & auth, deploy, org). Adds previously undocumented commands surfaced by the split: browser telemetry, curl, update, deploy github/get/delete, invoke get/history/browsers/update, and app delete. Co-Authored-By: Claude Opus 4.7 --- docs.json | 71 +++- reference/cli.mdx | 27 +- reference/cli/apps.mdx | 52 +-- reference/cli/browser-pools.mdx | 68 ++++ reference/cli/browsers-computer.mdx | 75 ++++ reference/cli/browsers-filesystem.mdx | 103 +++++ reference/cli/browsers-logs.mdx | 17 + reference/cli/browsers-playwright.mdx | 12 + reference/cli/browsers-processes.mdx | 51 +++ reference/cli/browsers-replays.mdx | 31 ++ reference/cli/browsers-telemetry.mdx | 15 + reference/cli/browsers.mdx | 511 ++----------------------- reference/cli/credential-providers.mdx | 59 +++ reference/cli/credentials.mdx | 55 +++ reference/cli/deployments.mdx | 59 +++ reference/cli/extensions.mdx | 6 + reference/cli/invocations.mdx | 57 +++ reference/cli/managed-auth.mdx | 131 +------ reference/cli/profiles.mdx | 42 ++ reference/cli/proxies.mdx | 55 +++ 20 files changed, 835 insertions(+), 662 deletions(-) create mode 100644 reference/cli/browser-pools.mdx create mode 100644 reference/cli/browsers-computer.mdx create mode 100644 reference/cli/browsers-filesystem.mdx create mode 100644 reference/cli/browsers-logs.mdx create mode 100644 reference/cli/browsers-playwright.mdx create mode 100644 reference/cli/browsers-processes.mdx create mode 100644 reference/cli/browsers-replays.mdx create mode 100644 reference/cli/browsers-telemetry.mdx create mode 100644 reference/cli/credential-providers.mdx create mode 100644 reference/cli/credentials.mdx create mode 100644 reference/cli/deployments.mdx create mode 100644 reference/cli/invocations.mdx create mode 100644 reference/cli/profiles.mdx create mode 100644 reference/cli/proxies.mdx diff --git a/docs.json b/docs.json index 6c5c3ef..d391df4 100644 --- a/docs.json +++ b/docs.json @@ -259,17 +259,66 @@ }, { "tab": "CLI", - "pages": [ - "reference/cli", - "reference/cli/create", - "reference/cli/auth", - "reference/cli/managed-auth", - "reference/cli/browsers", - "reference/cli/apps", - "reference/cli/projects", - "reference/cli/api-keys", - "reference/cli/mcp", - "reference/cli/extensions" + "groups": [ + { + "group": "Get Started", + "pages": [ + "reference/cli", + "reference/cli/create", + "reference/cli/auth", + "reference/cli/mcp" + ] + }, + { + "group": "Browsers", + "pages": [ + "reference/cli/browsers" + ] + }, + { + "group": "Control the Browser", + "pages": [ + "reference/cli/browsers-computer", + "reference/cli/browsers-playwright", + "reference/cli/browsers-filesystem", + "reference/cli/browsers-processes" + ] + }, + { + "group": "Observe the Browser", + "pages": [ + "reference/cli/browsers-replays", + "reference/cli/browsers-logs", + "reference/cli/browsers-telemetry" + ] + }, + { + "group": "Configure Resources & Auth", + "pages": [ + "reference/cli/profiles", + "reference/cli/proxies", + "reference/cli/extensions", + "reference/cli/browser-pools", + "reference/cli/managed-auth", + "reference/cli/credentials", + "reference/cli/credential-providers" + ] + }, + { + "group": "Deploy Your Agent", + "pages": [ + "reference/cli/apps", + "reference/cli/deployments", + "reference/cli/invocations" + ] + }, + { + "group": "Organization", + "pages": [ + "reference/cli/projects", + "reference/cli/api-keys" + ] + } ] }, { diff --git a/reference/cli.mdx b/reference/cli.mdx index 4ddb5c3..4f175f4 100644 --- a/reference/cli.mdx +++ b/reference/cli.mdx @@ -24,33 +24,32 @@ which kernel kernel --version ``` +This reference is organized to mirror the [API reference](https://kernel.sh/docs/api-reference): browser sessions, the controls to drive and observe them, the resources and auth they use, app deployment, and organization management. + Scaffold new Kernel apps from templates. - Login, logout, and check auth status. - - - Manage auth connections, credentials, and credential providers. + Login, logout, and check CLI auth status. - Create, view, and manage Kernel browsers. + Create, view, and manage browser sessions — plus computer controls, Playwright, filesystem, processes, replays, logs, and telemetry. - - Deploy apps, invoke actions, and stream logs. + + Auth connections, credentials, and credential providers. + + + Profiles, proxies, extensions, and browser pools. - - Upload, download, and build browser extensions. + + Apps, deployments, and invocations. Install Kernel MCP server configuration for AI tools. - - Manage projects and scope commands with `--project`. - - - Create, list, rename, and delete API keys. + + Manage projects and API keys. diff --git a/reference/cli/apps.mdx b/reference/cli/apps.mdx index 062fe02..db6aa5d 100644 --- a/reference/cli/apps.mdx +++ b/reference/cli/apps.mdx @@ -2,49 +2,7 @@ title: "Apps" --- -## `kernel deploy ` -Deploy an app to Kernel from the current directory. The entrypoint file and dependency manifest must live in the project root. - -| Flag | Description | -|------|-------------| -| `--version ` | Use a specific version label (default: latest). | -| `--force` | Overwrite an existing version with the same label. | -| `--env `, `-e` | Set environment variables (repeatable). | -| `--env-file ` | Load environment variables from a file (repeatable). | -| `--output json`, `-o json` | Output JSONL (one JSON object per line for each deployment event). | - -`package.json` (JS/TS) or `pyproject.toml` (Python) must be present next to the entrypoint. - -## `kernel deploy logs ` -Stream build and runtime logs for a deployment. - -| Flag | Description | -|------|-------------| -| `--follow`, `-f` | Continue streaming logs in real time. | -| `--since `, `-s` | Fetch logs starting from a relative duration (e.g. `5m`, `1h`, `1h30m`) or timestamp (`2006-01-02T15:04`). | -| `--with-timestamps`, `-t` | Prefix each line with an RFC3339 timestamp. | - -Log lines longer than 64 KiB are truncated. Emit bulky payloads to external storage and log references. - -## `kernel deploy history [app_name]` -Show deployment history for all apps or a specific app. - -| Flag | Description | -|------|-------------| -| `--limit ` | Maximum number of deployments to return (default: 100, `0` = all). | -| `--output json`, `-o json` | Output raw JSON array. | - -## `kernel invoke ` -Invoke an app action. By default the CLI returns immediately after the invocation is queued. - -| Flag | Description | -|------|-------------| -| `--version `, `-v` | Target a specific app version (default: latest). | -| `--payload `, `-p` | Provide a JSON payload (stringified, max 64 KB). | -| `--sync`, `-s` | Wait for completion (timeout after 60 s). | -| `--output json`, `-o json` | Output JSONL (one JSON object per line for each invocation event). | - -Press `Ctrl+C` to cancel an in-flight invocation. The associated browser sessions are cleaned up automatically. +List applications and versions. To deploy an app, see [Deployments](/reference/cli/deployments); to run one, see [Invocations](/reference/cli/invocations). ## `kernel app list` List deployed app versions. @@ -63,6 +21,14 @@ Show deployment history for a specific app. | `--limit ` | Maximum number of deployments to return (default: 100, `0` = all). | | `--output json`, `-o json` | Output raw JSON array. | +## `kernel app delete ` +Delete an app and all of its deployments. + +| Flag | Description | +|------|-------------| +| `--version ` | Only delete deployments for this version (default: all versions). | +| `--yes`, `-y` | Skip confirmation prompt. | + ## `kernel logs ` Tail app logs. diff --git a/reference/cli/browser-pools.mdx b/reference/cli/browser-pools.mdx new file mode 100644 index 0000000..46dd64a --- /dev/null +++ b/reference/cli/browser-pools.mdx @@ -0,0 +1,68 @@ +--- +title: "Browser Pools" +--- + +Create and manage browser pools for acquiring and releasing browsers. For more details, see [Browser Pools](/browsers/pools/overview). + +## `kernel browser-pools list` +List all browser pools. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON array. | + +## `kernel browser-pools create [name]` +Create a new browser pool. + +| Flag | Description | +|------|-------------| +| `--name ` | Optional unique name for the pool. | +| `--size ` | Number of browsers in the pool (required). | +| `--fill-rate ` | Percentage of the pool to fill per minute. | +| `--timeout ` | Idle timeout for browsers acquired from the pool. | +| `--start-url ` | Initial page to open for new browsers. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools get ` +Get pool details. + +| Flag | Description | +|------|-------------| +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools update ` +Update pool configuration. + +| Flag | Description | +|------|-------------| +| `--size ` | Updated pool size. | +| `--start-url ` | Initial page to open for new browsers. | +| `--clear-start-url` | Clear the pool start URL. | +| `--discard-all-idle` | Discard all idle browsers and refill. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools acquire ` +Acquire a browser from the pool. + +| Flag | Description | +|------|-------------| +| `--timeout ` | Acquire timeout before returning 204. | +| `--output json`, `-o json` | Output raw JSON object. | + +## `kernel browser-pools release ` +Release a browser back to the pool. + +| Flag | Description | +|------|-------------| +| `--session-id ` | Browser session ID to release (required). | +| `--reuse` | Reuse the browser instance (default: true). | + +## `kernel browser-pools delete ` +Delete a pool. + +| Flag | Description | +|------|-------------| +| `--force` | Force delete even if browsers are leased. | + +## `kernel browser-pools flush ` +Destroy all idle browsers in the pool. diff --git a/reference/cli/browsers-computer.mdx b/reference/cli/browsers-computer.mdx new file mode 100644 index 0000000..4f66294 --- /dev/null +++ b/reference/cli/browsers-computer.mdx @@ -0,0 +1,75 @@ +--- +title: "Browser Computer Controls" +--- + +Control mouse, keyboard, and screen on the browser instance. + +## `kernel browsers computer click-mouse ` +Click the mouse at specific coordinates. + +| Flag | Description | +|------|-------------| +| `--x ` | X coordinate (required). | +| `--y ` | Y coordinate (required). | +| `--num-clicks ` | Number of clicks (default: 1). | +| `--button