From 2c5082eff666dc67606beb2f52ccf3fdd88de363 Mon Sep 17 00:00:00 2001 From: Miyoung Choi Date: Thu, 12 Mar 2026 22:03:06 -0700 Subject: [PATCH] remove manully generated cli reference --- docs/index.md | 5 +- docs/inference/configure.md | 1 - docs/reference/cli.md | 257 ------------------------------------ 3 files changed, 2 insertions(+), 261 deletions(-) delete mode 100644 docs/reference/cli.md diff --git a/docs/index.md b/docs/index.md index 312c32ad..0257b7df 100644 --- a/docs/index.md +++ b/docs/index.md @@ -165,10 +165,10 @@ Keep inference traffic private by routing API calls to local or self-hosted back ::: :::{grid-item-card} Reference -:link: reference/cli +:link: reference/default-policy :link-type: doc -CLI commands, policy schema, environment variables, and system architecture. +Policy schema, environment variables, and system architecture. +++ {bdg-secondary}`Reference` @@ -222,7 +222,6 @@ inference/configure :caption: Reference :hidden: -reference/cli reference/default-policy reference/policy-schema reference/support-matrix diff --git a/docs/inference/configure.md b/docs/inference/configure.md index 7aa519b3..46233e7f 100644 --- a/docs/inference/configure.md +++ b/docs/inference/configure.md @@ -160,4 +160,3 @@ Explore related topics: - To understand the inference routing flow and supported API patterns, refer to {doc}`index`. - To control external endpoints, refer to [Network Access Rules](/sandboxes/index.md#network-access-rules). - To manage provider records, refer to {doc}`../sandboxes/providers`. -- To view `openshell inference` commands, refer to {doc}`../reference/cli`. diff --git a/docs/reference/cli.md b/docs/reference/cli.md deleted file mode 100644 index 111390c8..00000000 --- a/docs/reference/cli.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: - page: CLI Reference - nav: CLI -description: Complete command reference for the openshell CLI including all subcommands, flags, and environment variables. -topics: -- Generative AI -- Cybersecurity -tags: -- CLI -- Reference -- Commands -- AI Agents -content: - type: reference - difficulty: technical_beginner - audience: - - engineer - - data_scientist ---- - - - -# CLI Reference - -Complete command reference for the `openshell` CLI. Every subcommand, flag, and option is documented here. - -## Command Tree - -The full hierarchy of `openshell` subcommands: - -```text -openshell -├── status -├── logs [name] -├── term -├── forward -│ ├── start -│ ├── stop -│ └── list -├── gateway -│ ├── start -│ ├── stop -│ ├── destroy -│ ├── info -│ ├── add -│ └── select [name] -├── sandbox -│ ├── create -│ ├── get [name] -│ ├── list -│ ├── delete [--all] -│ ├── connect [name] -│ ├── upload [name] -│ ├── download [name] -│ └── ssh-config -├── policy -│ ├── set -│ ├── get -│ └── list -├── provider -│ ├── create -│ ├── get -│ ├── list -│ ├── update -│ └── delete -├── inference -│ ├── set -│ ├── update -│ └── get -├── doctor -│ ├── logs -│ └── exec -└── completions -``` - -:::{tip} -Commands that accept an optional `[name]` argument — such as `get`, `connect`, `upload`, `download`, and `logs` — fall back to the last-used sandbox when the name is omitted. The CLI records the sandbox name each time you create or connect, and prints a hint showing which sandbox was selected. -::: - -## Status, Logs, and Terminal - -Check gateway health, stream sandbox logs, and launch the terminal dashboard: - -| Command | Description | -|---|---| -| `openshell status` | Show the health and status of the active gateway. | -| `openshell logs [name]` | View sandbox logs. Use `--tail` for streaming, `--source` and `--level` to filter. | -| `openshell term` | Launch the OpenShell Terminal — a dashboard showing sandbox status, live logs, and policy decisions in a single view. Navigate with `j`/`k`, press `f` to follow live output, `s` to filter by source, and `q` to quit. | - -Refer to {doc}`/sandboxes/create-and-manage` for more on monitoring sandboxes and reading log entries. - -## Gateway Commands - -Manage the OpenShell runtime cluster. - -| Command | Description | -|---|---| -| `openshell gateway start` | Deploy a new cluster. Add `--remote user@host` for remote deployment. | -| `openshell gateway stop` | Stop the active cluster, preserving state. | -| `openshell gateway destroy` | Permanently remove the cluster and all its data. | -| `openshell gateway info` | Show detailed information about the cluster. | -| `openshell gateway add ` | Register an existing remote gateway by URL. | -| `openshell gateway select ` | Set the active cluster. All subsequent commands target this cluster. | -| `openshell gateway select` | List all registered clusters (when called without a name). | - -## Diagnostic Commands - -Troubleshoot gateway issues. - -| Command | Description | -|---|---| -| `openshell doctor logs` | Fetch logs from the gateway Docker container. Use `--tail` for streaming, `-n` to limit line count. | -| `openshell doctor exec -- ` | Run a command inside the gateway container (e.g., `kubectl get pods -A`, `k9s`, `sh`). | - -## Sandbox Commands - -Create and manage isolated agent execution environments. - -| Command | Description | -|---|---| -| `openshell sandbox create` | Create a new sandbox. Refer to the flag reference below. | -| `openshell sandbox get [name]` | Show detailed information about a sandbox. | -| `openshell sandbox list` | List all sandboxes in the active cluster. | -| `openshell sandbox delete ` | Delete one or more sandboxes by name. Use `--all` to delete every sandbox in the active gateway. | -| `openshell sandbox connect [name]` | Open an interactive SSH session into a running sandbox. | -| `openshell sandbox upload [name]` | Upload files from the host into a sandbox. | -| `openshell sandbox download [name]` | Download files from a sandbox to the host. | -| `openshell sandbox ssh-config ` | Print the generated SSH config block for a sandbox. | - -### Sandbox Create Flags - -The following flags control sandbox creation: - -| Flag | Description | -|---|---| -| `--name` | Assign a human-readable name to the sandbox. Auto-generated if omitted. | -| `--provider` | Attach a credential provider. Repeatable for multiple providers. | -| `--policy` | Path to a policy YAML file to apply at creation time. | -| `--upload` | Upload local files into the sandbox before running. | -| `--no-keep` | Delete the sandbox after the initial command or shell exits. | -| `--editor` | Launch `vscode` or `cursor` into `/sandbox`; installs OpenShell-managed SSH config and keeps the sandbox alive. | -| `--forward` | Forward a local port into the sandbox at startup. Keeps the sandbox alive. | -| `--from` | Build from a community sandbox name, local Dockerfile directory, or container image reference. | -| `-- ` | The command to run inside the sandbox. Everything after `--` is passed as the agent command. | - -## Policy Commands - -Apply and inspect sandbox policies at runtime. - -| Command | Description | -|---|---| -| `openshell policy set ` | Apply or update a policy on a running sandbox. Pass `--policy `. | -| `openshell policy get ` | Show the active policy for a sandbox. Add `--full` for the complete policy with metadata. | -| `openshell policy list ` | List all policy versions applied to a sandbox, with status. | - -## Port Forwarding Commands - -Forward sandbox ports to the host for local access. - -| Command | Description | -|---|---| -| `openshell forward start ` | Forward a sandbox port to the host. Add `-d` for background mode. | -| `openshell forward stop ` | Stop an active port forward. | -| `openshell forward list` | List all active port forwards. | - -## Provider Commands - -Manage credential providers that inject secrets into sandboxes. - -| Command | Description | -|---|---| -| `openshell provider create` | Create a new credential provider. Refer to the flag reference below. | -| `openshell provider get ` | Show details of a provider. | -| `openshell provider list` | List all providers in the active cluster. | -| `openshell provider update ` | Update a provider's credentials or configuration. | -| `openshell provider delete ` | Delete a provider. | - -### Provider Create Flags - -The following flags control provider creation: - -| Flag | Description | -|---|---| -| `--name` | Name for the provider. | -| `--type` | Provider type: `claude`, `codex`, `opencode`, `github`, `gitlab`, `nvidia`, `generic`, `outlook`. | -| `--from-existing` | Discover credentials from your current shell environment variables. | -| `--credential` | Set a credential explicitly. Format: `KEY=VALUE` or bare `KEY` to read from env. Repeatable. | -| `--config` | Set a configuration value. Format: `KEY=VALUE`. Repeatable. | - -## Inference Commands - -Configure the backend used by `https://inference.local`. - -### `openshell inference set` - -Set the provider and model for managed inference. Both flags are required. - -| Flag | Description | -|---|---| -| `--provider` | Provider record name to use for injected credentials. | -| `--model` | Model identifier to force on generation requests. | - -### `openshell inference update` - -Update only the fields you specify. - -| Flag | Description | -|---|---| -| `--provider` | Replace the current provider record. | -| `--model` | Replace the current model ID. | - -### `openshell inference get` - -Show the current inference configuration, including provider, model, and version. - -## Environment Variables - -The following environment variables override CLI defaults: - -| Variable | Description | -|---|---| -| `OPENSHELL_GATEWAY` | Name of the gateway to operate on. Overrides the active gateway set by `openshell gateway select`. | -| `OPENSHELL_SANDBOX_POLICY` | Default path to a policy YAML file. When set, `openshell sandbox create` uses this policy if no `--policy` flag is provided. | - -## Shell Completions - -Generate shell completion scripts for tab completion: - -```console -$ openshell completions bash -$ openshell completions zsh -$ openshell completions fish -``` - -Pipe the output to your shell's config file: - -```console -$ openshell completions zsh >> ~/.zshrc -$ source ~/.zshrc -``` - -## Built-in Help - -Every command and subcommand includes built-in help. Use `--help` at any level to see available subcommands, flags, and usage examples: - -```console -$ openshell --help -$ openshell sandbox --help -$ openshell sandbox create --help -$ openshell gateway --help -``` - -Help output groups flags under distinct headings: `FLAGS` for command-specific options, `GATEWAY FLAGS` for `--gateway` and `--gateway-endpoint`, and `GLOBAL FLAGS` for `--verbose`, `--help`, and `--version`.