openshell-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenShell CLI
OpenShell CLI
Guide agents through using the CLI for sandbox and platform management -- from basic operations to advanced multi-step workflows.
openshell指导Agent使用 CLI进行沙箱和平台管理——从基础操作到高级多步骤工作流。
openshellOverview
概述
The OpenShell CLI () is the primary interface for managing sandboxes, providers, policies, inference routes, and gateway registrations. Gateway service lifecycle is handled outside the CLI by packages, systemd, Helm, or development tasks. This skill teaches agents how to orchestrate CLI commands for common and complex workflows.
openshellCompanion skill: For creating or modifying sandbox policy YAML content (network rules, L7 inspection, access presets), use the skill. This skill covers the CLI commands for the policy lifecycle; covers policy content authoring.
generate-sandbox-policygenerate-sandbox-policySelf-teaching: The CLI has comprehensive built-in help. When you encounter a command or option not covered in this skill, walk the help tree:
bash
openshell --help # Top-level commands
openshell <group> --help # Subcommands in a group
openshell <group> <cmd> --help # Flags for a specific commandThis is your primary fallback. Use it freely -- the CLI's help output is authoritative and always up-to-date.
OpenShell CLI()是管理沙箱、提供商、策略、推理路由和网关注册的主要接口。网关服务生命周期由包、systemd、Helm或开发任务在CLI外部处理。本技能将教授Agent如何编排CLI命令以完成常见和复杂的工作流。
openshell配套技能:若要创建或修改沙箱策略YAML内容(网络规则、L7检查、访问预设),请使用技能。本技能涵盖策略生命周期的CLI命令;则涵盖策略内容的编写。
generate-sandbox-policygenerate-sandbox-policy自学方法:CLI内置了全面的帮助文档。当遇到本技能未涵盖的命令或选项时,请查阅帮助树:
bash
openshell --help # 顶级命令
openshell <group> --help # 命令组中的子命令
openshell <group> <cmd> --help # 特定命令的标志这是你的主要备用方法。请放心使用——CLI的帮助输出是权威且始终最新的。
Prerequisites
前提条件
- is on the PATH (install via
openshell)cargo install --path crates/openshell-cli - A reachable OpenShell gateway backed by Docker, Podman, Kubernetes, or the experimental VM driver
- Docker is running only when using BYOC local builds or Docker-backed development workflows
- For Kubernetes deployments: and Helm access to the target cluster
kubectl
- 已添加至PATH(通过
openshell安装)cargo install --path crates/openshell-cli - 可访问的OpenShell网关,由Docker、Podman、Kubernetes或实验性VM驱动程序提供支持
- 仅在使用BYOC本地构建或Docker支持的开发工作流时,Docker需处于运行状态
- 对于Kubernetes部署:拥有目标集群的和Helm访问权限
kubectl
Command Reference
命令参考
See cli-reference.md for the full command tree with all flags and options. Use it as a quick-reference to avoid round-tripping through for common commands.
--help完整的命令树及所有标志和选项请参见cli-reference.md。将其用作快速参考,避免反复通过查询常见命令。
--helpWorkflow 1: Getting Started
工作流1:入门
Use this workflow when the user has a gateway endpoint and wants to get a sandbox running for the first time.
当用户拥有网关端点并首次想要运行沙箱时,使用此工作流。
Step 1: Register a gateway
步骤1:注册网关
bash
openshell gateway add http://127.0.0.1:8080 --local --name localUse an endpoint only for trusted local port-forwarding or a protected private path. For a gateway behind an authenticated reverse proxy, register its HTTPS endpoint with .
http://openshell gateway add https://gateway.example.combash
openshell gateway add http://127.0.0.1:8080 --local --name local仅在受信任的本地端口转发或受保护的私有路径中使用端点。对于位于已认证反向代理后的网关,请使用注册其HTTPS端点。
http://openshell gateway add https://gateway.example.comStep 2: Verify the gateway
步骤2:验证网关
bash
openshell statusConfirm the gateway is reachable and shows a version.
bash
openshell status确认网关可访问并显示版本信息。
Step 3: Create a sandbox
步骤3:创建沙箱
The simplest way to get a sandbox running:
bash
openshell sandbox createThis creates a sandbox with defaults and drops you into an interactive shell.
Shortcut for known tools: When the trailing command is a recognized tool, the CLI auto-creates the required provider from local credentials:
bash
openshell sandbox create -- claude # Auto-creates claude provider
openshell sandbox create -- codex # Auto-creates codex providerThe agent will be prompted interactively if credentials are missing.
运行沙箱的最简单方式:
bash
openshell sandbox create这将创建一个默认配置的沙箱,并进入交互式shell。
已知工具快捷方式:当后续命令为已识别工具时,CLI会自动从本地凭据创建所需的提供商:
bash
openshell sandbox create -- claude # 自动创建claude提供商
openshell sandbox create -- codex # 自动创建codex提供商如果缺少凭据,Agent将收到交互式提示。
Step 4: Exit and clean up
步骤4:退出并清理
Exit the sandbox shell ( or Ctrl-D), then:
exitbash
openshell sandbox delete <name>退出沙箱shell(或Ctrl-D),然后执行:
exitbash
openshell sandbox delete <name>Workflow 2: Provider Management
工作流2:提供商管理
Providers supply credentials to sandboxes (API keys, tokens, etc.). Manage them before creating sandboxes that need them.
Supported types: , , , , , , , .
claudeopencodecodexgenericnvidiagitlabgithuboutlook提供商为沙箱提供凭据(API密钥、令牌等)。在创建需要凭据的沙箱之前,先管理提供商。
支持的类型:、、、、、、、。
claudeopencodecodexgenericnvidiagitlabgithuboutlookCreate a provider from local credentials
从本地凭据创建提供商
bash
openshell provider create --name my-github --type github --from-existingThe flag discovers credentials from local state (e.g., tokens, Claude config files).
--from-existinggh authbash
openshell provider create --name my-github --type github --from-existing--from-existinggh authCreate a provider with explicit credentials
使用显式凭据创建提供商
bash
openshell provider create --name my-api --type generic \
--credential API_KEY=sk-abc123 \
--config base_url=https://api.example.comBare (without ) reads the value from the environment variable of that name:
KEY=VALUEbash
openshell provider create --name my-api --type generic --credential API_KEYbash
openshell provider create --name my-api --type generic \
--credential API_KEY=sk-abc123 \
--config base_url=https://api.example.com不带的裸会从同名环境变量中读取值:
=VALUEKEYbash
openshell provider create --name my-api --type generic --credential API_KEYList, inspect, update, delete
列出、查看、更新、删除
bash
openshell provider list
openshell provider get my-github
openshell provider update my-github --type github --from-existing
openshell provider delete my-githubbash
openshell provider list
openshell provider get my-github
openshell provider update my-github --type github --from-existing
openshell provider delete my-githubWorkflow 3: Sandbox Lifecycle
工作流3:沙箱生命周期
Create with options
使用选项创建沙箱
bash
openshell sandbox create \
--name my-sandbox \
--provider my-github \
--provider my-claude \
--policy ./my-policy.yaml \
--upload .:/sandbox \
-- claudeKey flags:
- : Attach one or more providers (repeatable)
--provider - : Custom policy YAML (otherwise uses built-in default or
--policyenv var)OPENSHELL_SANDBOX_POLICY - ,
--cpu: Set per-sandbox compute sizing. Docker/Podman apply limits; Kubernetes applies matching requests and limits.--memory - : Upload local files into the sandbox (default dest:
--upload <PATH>[:<DEST>])/sandbox - : Delete the sandbox after the initial command or shell exits
--no-keep - : Forward a local port and keep the sandbox alive
--forward <PORT>
bash
openshell sandbox create \
--name my-sandbox \
--provider my-github \
--provider my-claude \
--policy ./my-policy.yaml \
--upload .:/sandbox \
-- claude关键标志:
- :附加一个或多个提供商(可重复使用)
--provider - :自定义策略YAML(否则使用内置默认值或
--policy环境变量)OPENSHELL_SANDBOX_POLICY - 、
--cpu:设置每个沙箱的计算资源大小。Docker/Podman应用限制;Kubernetes应用匹配的请求和限制。--memory - :将本地文件上传到沙箱(默认目标:
--upload <PATH>[:<DEST>])/sandbox - :在初始命令或shell退出后删除沙箱
--no-keep - :转发本地端口并保持沙箱运行
--forward <PORT>
List and inspect sandboxes
列出和查看沙箱
bash
openshell sandbox list
openshell sandbox get my-sandboxbash
openshell sandbox list
openshell sandbox get my-sandboxConnect to a running sandbox
连接到运行中的沙箱
bash
openshell sandbox connect my-sandboxOpens an interactive SSH shell. To configure VS Code Remote-SSH:
bash
openshell sandbox ssh-config my-sandbox >> ~/.ssh/configbash
openshell sandbox connect my-sandbox打开交互式SSH shell。若要配置VS Code Remote-SSH:
bash
openshell sandbox ssh-config my-sandbox >> ~/.ssh/configUpload and download files
上传和下载文件
bash
undefinedbash
undefinedUpload local files to sandbox
将本地文件上传到沙箱
openshell sandbox upload my-sandbox ./src /sandbox/src
openshell sandbox upload my-sandbox ./src /sandbox/src
Download files from sandbox
从沙箱下载文件
openshell sandbox download my-sandbox /sandbox/output ./local-output
undefinedopenshell sandbox download my-sandbox /sandbox/output ./local-output
undefinedView logs
查看日志
bash
undefinedbash
undefinedRecent logs
最近的日志
openshell logs my-sandbox
openshell logs my-sandbox
Stream live logs
流式传输实时日志
openshell logs my-sandbox --tail
openshell logs my-sandbox --tail
Filter by source and level
按来源和级别过滤
openshell logs my-sandbox --tail --source sandbox --level warn
openshell logs my-sandbox --tail --source sandbox --level warn
Logs from the last 5 minutes
最近5分钟的日志
openshell logs my-sandbox --since 5m
undefinedopenshell logs my-sandbox --since 5m
undefinedDelete sandboxes
删除沙箱
bash
openshell sandbox delete my-sandbox
openshell sandbox delete sandbox-1 sandbox-2 sandbox-3 # Multiple at oncebash
openshell sandbox delete my-sandbox
openshell sandbox delete sandbox-1 sandbox-2 sandbox-3 # 批量删除Workflow 4: Policy Iteration Loop
工作流4:策略迭代循环
This is the most important multi-step workflow. It enables a tight feedback cycle where sandbox policy is refined based on observed activity.
Key concept: Policies have static fields (immutable after creation: , , ) and one dynamic field (). Only can be updated without recreating the sandbox.
filesystem_policylandlockprocessnetwork_policiesnetwork_policiesCreate sandbox with initial policy
│
▼
Monitor logs ◄──────────────────┐
│ │
▼ │
Observe denied actions │
│ │
▼ │
Pull current policy │
│ │
▼ │
Modify policy YAML │
(use generate-sandbox-policy) │
│ │
▼ │
Push updated policy │
│ │
▼ │
Verify reload succeeded ─────────┘这是最重要的多步骤工作流。它实现了一个紧密的反馈循环,可根据观察到的活动优化沙箱策略。
核心概念:策略包含静态字段(创建后不可变:、、)和一个动态字段()。只有可以在不重新创建沙箱的情况下更新。
filesystem_policylandlockprocessnetwork_policiesnetwork_policies使用初始策略创建沙箱
│
▼
监控日志 ◄──────────────────┐
│ │
▼ │
观察被拒绝的操作 │
│ │
▼ │
获取当前政策 │
│ │
▼ │
修改策略YAML │
(使用generate-sandbox-policy) │
│ │
▼ │
推送更新后的政策 │
│ │
▼ │
验证重新加载成功 ─────────┘Step 1: Create sandbox with initial policy
步骤1:使用初始策略创建沙箱
bash
openshell sandbox create --name dev --policy ./initial-policy.yaml -- claudeSandboxes stay alive by default for iteration. Add only when the sandbox should be deleted automatically after the initial session.
--no-keepbash
openshell sandbox create --name dev --policy ./initial-policy.yaml -- claude默认情况下,沙箱会保持运行以进行迭代。仅当沙箱应在初始会话后自动删除时,才添加。
--no-keepStep 2: Monitor logs for denied actions
步骤2:监控日志中的被拒绝操作
In a separate terminal or as the agent:
bash
openshell logs dev --tail --source sandboxLook for log lines with -- these indicate blocked network requests. The logs include:
action: deny- Destination host and port (what was blocked)
- Binary path (which process attempted the connection)
- Deny reason (why it was blocked)
在单独的终端中或作为Agent执行:
bash
openshell logs dev --tail --source sandbox查找包含的日志行——这些表示被阻止的网络请求。日志包含:
action: deny- 目标主机和端口(被阻止的对象)
- 二进制文件路径(尝试连接的进程)
- 拒绝原因(被阻止的原因)
Step 3: Pull the current policy
步骤3:获取当前策略
bash
openshell policy get dev --full > current-policy.yamlThe flag outputs valid YAML that can be directly re-submitted. This is the round-trip format.
--fullbash
openshell policy get dev --full > current-policy.yaml--fullStep 4: Modify the policy
步骤4:修改策略
Edit to allow the blocked actions. For policy content authoring, delegate to the skill. That skill handles:
current-policy.yamlgenerate-sandbox-policy- Network endpoint rule structure
- L4 vs L7 policy decisions
- Access presets (,
read-only,read-write)full - TLS termination configuration
- Enforcement modes (vs
audit)enforce - Binary matching patterns
Only can be modified at runtime. If , , or need changes, the sandbox must be recreated.
network_policiesfilesystem_policylandlockprocess编辑以允许被阻止的操作。**对于策略内容编写,请委托给技能。**该技能处理:
current-policy.yamlgenerate-sandbox-policy- 网络端点规则结构
- L4与L7策略决策
- 访问预设(、
read-only、read-write)full - TLS终止配置
- 执行模式(vs
audit)enforce - 二进制匹配模式
只有可以在运行时修改。如果需要更改、或,则必须重新创建沙箱。
network_policiesfilesystem_policylandlockprocessStep 5: Push the updated policy
步骤5:推送更新后的策略
bash
openshell policy set dev --policy current-policy.yaml --waitThe flag blocks until the sandbox confirms the policy is loaded (polls every second). Exit codes:
--wait- 0: Policy loaded successfully
- 1: Policy load failed
- 124: Timeout (default 60 seconds)
bash
openshell policy set dev --policy current-policy.yaml --wait--wait- 0:策略加载成功
- 1:策略加载失败
- 124:超时(默认60秒)
Step 6: Verify the update
步骤6:验证更新
bash
openshell policy list devCheck that the latest revision shows status . If , check the error column for details.
loadedfailedbash
openshell policy list dev检查最新版本的状态是否为。如果是,请查看错误列获取详细信息。
loadedfailedStep 7: Repeat
步骤7:重复
Return to Step 2. Continue monitoring logs and refining the policy until all required actions are allowed and no unnecessary permissions exist.
返回步骤2。继续监控日志并优化策略,直到所有必要操作都被允许且不存在不必要的权限。
Policy revision history
策略修订历史
View all revisions to understand how the policy evolved:
bash
openshell policy list dev --limit 50Fetch a specific historical revision:
bash
openshell policy get dev --rev 3 --full查看所有修订版本以了解策略的演变:
bash
openshell policy list dev --limit 50获取特定历史版本:
bash
openshell policy get dev --rev 3 --fullWorkflow 5: BYOC (Bring Your Own Container)
工作流5:BYOC(Bring Your Own Container,自带容器)
Build a custom container image and run it as a sandbox.
构建自定义容器镜像并将其作为沙箱运行。
Step 1: Create a sandbox from a Dockerfile
步骤1:从Dockerfile创建沙箱
bash
openshell sandbox create --from ./Dockerfile --name my-appThe flag accepts a Dockerfile path, a directory containing a Dockerfile, a full image reference (e.g. ), or a community sandbox name (e.g. ).
--frommyregistry.com/img:tagopenclawWhen given a Dockerfile or directory, the image is built locally via Docker and delivered through the selected compute driver. Docker and Podman-backed gateways can use local images directly. Kubernetes gateways usually need the image available to the cluster through a registry or driver-supported image push path.
When is specified, the CLI:
--from- Clears default /
run_as_user(custom images may not have therun_as_groupuser)sandbox - Uses a supervisor bootstrap pattern (init container copies the sandbox supervisor into a shared volume)
bash
openshell sandbox create --from ./Dockerfile --name my-app--frommyregistry.com/img:tagopenclaw当给定Dockerfile或目录时,镜像将通过Docker在本地构建,并通过所选的计算驱动程序交付。Docker和Podman支持的网关可以直接使用本地镜像。Kubernetes网关通常需要镜像通过注册表或驱动程序支持的镜像推送路径对集群可用。
指定时,CLI会:
--from- 清除默认的/
run_as_user(自定义镜像可能没有run_as_group用户)sandbox - 使用supervisor引导模式(初始化容器将沙箱supervisor复制到共享卷)
Step 2: Forward ports (if the container runs a service)
步骤2:转发端口(如果容器运行服务)
bash
undefinedbash
undefinedForeground (blocks)
前台运行(阻塞)
openshell forward start 8080 my-app
openshell forward start 8080 my-app
Background (returns immediately)
后台运行(立即返回)
openshell forward start 8080 my-app -d
The service is now reachable at `localhost:8080`.openshell forward start 8080 my-app -d
现在可通过`localhost:8080`访问该服务。Step 3: Manage port forwards
步骤3:管理端口转发
bash
undefinedbash
undefinedList active forwards
列出活跃的转发
openshell forward list
openshell forward list
Stop a forward
停止转发
openshell forward stop 8080 my-app
undefinedopenshell forward stop 8080 my-app
undefinedStep 4: Iterate
步骤4:迭代更新
To update the container:
bash
openshell sandbox delete my-app
openshell sandbox create --from ./Dockerfile --name my-app --forward 8080要更新容器:
bash
openshell sandbox delete my-app
openshell sandbox create --from ./Dockerfile --name my-app --forward 8080Shortcut: Create with port forward in one command
快捷方式:一步创建并转发端口
bash
openshell sandbox create --from ./Dockerfile --forward 8080 -- ./start-server.shThe flag starts a background port forward before the command runs, so the service is reachable immediately.
--forwardbash
openshell sandbox create --from ./Dockerfile --forward 8080 -- ./start-server.sh--forwardLimitations
限制
- Distroless / images are not supported (the supervisor needs glibc,
FROM scratch, and a shell)/proc - Missing or required capabilities blocks startup in proxy mode
iproute2
- 不支持Distroless / 镜像(supervisor需要glibc、
FROM scratch和shell)/proc - 缺少或所需权限会阻止代理模式下的启动
iproute2
Workflow 6: Agent-Assisted Sandbox Session
工作流6:Agent辅助沙箱会话
This workflow supports a human working in a sandbox while an agent monitors activity and refines the policy in parallel.
此工作流支持人类在沙箱中工作,同时Agent监控活动并并行优化策略。
Step 1: Create sandbox with providers and keep alive
步骤1:创建带提供商的沙箱并保持运行
bash
openshell sandbox create \
--name work-session \
--provider github \
--provider claude \
--policy ./dev-policy.yaml \
# sandbox create keeps the sandbox alive by defaultbash
openshell sandbox create \
--name work-session \
--provider github \
--provider claude \
--policy ./dev-policy.yaml \
# 默认情况下,sandbox create会保持沙箱运行Step 2: User connects in a separate shell
步骤2:用户在单独的shell中连接
Tell the user to run:
bash
openshell sandbox connect work-sessionOr for VS Code:
bash
openshell sandbox ssh-config work-session >> ~/.ssh/config告知用户运行:
bash
openshell sandbox connect work-session或者对于VS Code:
bash
openshell sandbox ssh-config work-session >> ~/.ssh/configThen connect via VS Code Remote-SSH to the host "work-session"
然后通过VS Code Remote-SSH连接到主机"work-session"
undefinedundefinedStep 3: Agent monitors logs
步骤3:Agent监控日志
While the user works, monitor the sandbox logs:
bash
openshell logs work-session --tail --source sandbox --level warnWatch for actions that indicate the user's work is being blocked by policy.
deny用户工作时,监控沙箱日志:
bash
openshell logs work-session --tail --source sandbox --level warn留意操作,这些表示用户的工作被策略阻止。
denyStep 4: Agent refines policy
步骤4:Agent优化策略
When denied actions are observed:
- Prefer incremental updates for additive network changes:
openshell policy update work-session --add-endpoint api.github.com:443:read-only:rest:enforce --binary /usr/bin/gh --waitopenshell policy update work-session --add-allow 'api.github.com:443:POST:/repos/*/issues' --wait - Use full YAML replacement when the change is broad or touches non-network fields:
Modify the policy to allow the blocked actions (use
openshell policy get work-session --full > policy.yamlskill for content)generate-sandbox-policyopenshell policy set work-session --policy policy.yaml --wait - Verify:
openshell policy list work-session
The user does not need to disconnect -- policy updates are hot-reloaded within ~30 seconds (or immediately when using , which polls for confirmation).
--wait观察到被拒绝的操作时:
- 对于附加网络更改,优先使用增量更新:
openshell policy update work-session --add-endpoint api.github.com:443:read-only:rest:enforce --binary /usr/bin/gh --waitopenshell policy update work-session --add-allow 'api.github.com:443:POST:/repos/*/issues' --wait - 当更改范围较广或涉及非网络字段时,使用完整YAML替换:
修改策略以允许被阻止的操作(使用
openshell policy get work-session --full > policy.yaml技能处理内容)generate-sandbox-policyopenshell policy set work-session --policy policy.yaml --wait - 验证:
openshell policy list work-session
用户无需断开连接——策略更新会在约30秒内热加载(或使用时立即加载,该标志会轮询确认)。
--waitStep 5: Clean up when done
步骤5:完成后清理
bash
openshell sandbox delete work-sessionbash
openshell sandbox delete work-sessionWorkflow 7: Gateway Inference
工作流7:网关推理
Configure the gateway's managed inference route for .
inference.local配置网关的托管推理路由。
inference.localSet gateway inference
设置网关推理
First ensure the provider record exists:
bash
openshell provider listThen point gateway inference at that provider and model:
bash
openshell inference set \
--provider nvidia \
--model nvidia/nemotron-3-nano-30b-a3bThis updates the gateway-managed route. There is no per-route create/list/update/delete workflow for sandbox inference.
inference.local首先确保提供商记录存在:
bash
openshell provider list然后将网关推理指向该提供商和模型:
bash
openshell inference set \
--provider nvidia \
--model nvidia/nemotron-3-nano-30b-a3b这会更新网关托管的路由。沙箱推理没有每条路由的创建/列出/更新/删除工作流。
inference.localInspect current inference config
查看当前推理配置
bash
openshell inference getbash
openshell inference getHow sandboxes use it
沙箱如何使用它
- Agents send HTTPS requests to .
inference.local - The sandbox intercepts those requests locally and routes them through the gateway inference config.
- Sandbox policy is separate from gateway inference configuration.
- Agent向发送HTTPS请求。
inference.local - 沙箱在本地拦截这些请求,并通过网关推理配置路由。
- 沙箱策略与网关推理配置是分离的。
Workflow 8: Gateway Management
工作流8:网关管理
List and switch gateways
列出和切换网关
bash
openshell gateway select # See all gateways (no args shows list)
openshell gateway select production # Switch active gateway
openshell status # Verify connectivitybash
openshell gateway select # 查看所有网关(无参数时显示列表)
openshell gateway select production # 切换到活跃网关
openshell status # 验证连接性Registration
注册
bash
openshell gateway add http://127.0.0.1:8080 --local --name local
openshell gateway add https://gateway.example.com --name production
openshell gateway remove local # Remove local registrationbash
openshell gateway add http://127.0.0.1:8080 --local --name local
openshell gateway add https://gateway.example.com --name production
openshell gateway remove local # 删除本地注册Platform-specific deployment inspection
特定平台的部署检查
bash
undefinedbash
undefinedInspect a Kubernetes Helm release and gateway pod
检查Kubernetes Helm版本和网关Pod
helm -n openshell status openshell
kubectl -n openshell get pods,svc
kubectl -n openshell logs statefulset/openshell --tail=100
For Docker, Podman, and VM-backed gateways, inspect the gateway process or container logs and the selected runtime directly.
---helm -n openshell status openshell
kubectl -n openshell get pods,svc
kubectl -n openshell logs statefulset/openshell --tail=100
对于Docker、Podman和VM支持的网关,请直接检查网关进程或容器日志以及所选的运行时。
---Self-Teaching via --help
--help通过--help
自学
--helpWhen you encounter a command or option not covered in this skill:
- Start broad: to see all command groups.
openshell --help - Narrow down: to see subcommands (e.g.,
openshell <group> --help).openshell sandbox --help - Get specific: for flags and usage (e.g.,
openshell <group> <cmd> --help).openshell sandbox create --help
The CLI help is always authoritative. If the help output contradicts this skill, follow the help output -- the CLI may have been updated since this skill was written.
当遇到本技能未涵盖的命令或选项时:
- 从宽泛开始:查看所有命令组。
openshell --help - 逐步缩小范围:查看子命令(例如
openshell <group> --help)。openshell sandbox --help - 获取详细信息:查看标志和用法(例如
openshell <group> <cmd> --help)。openshell sandbox create --help
CLI帮助始终是权威的。如果帮助输出与本技能矛盾,请遵循帮助输出——CLI可能在本技能编写后已更新。
Example: discovering an unfamiliar command
示例:发现不熟悉的命令
bash
$ openshell sandbox --helpbash
$ openshell sandbox --helpShows: create, get, list, delete, connect, upload, download, ssh-config, image
显示:create, get, list, delete, connect, upload, download, ssh-config, image
$ openshell sandbox upload --help
$ openshell sandbox upload --help
Shows: positional arguments (name, path, dest), usage examples
显示:位置参数(名称、路径、目标)、用法示例
---
---Quick Reference
快速参考
| Task | Command |
|---|---|
| Register local port-forwarded gateway | |
| Check gateway health | |
| List/switch gateways | |
| Create sandbox (interactive) | |
| Create sandbox with tool | |
| Create with custom policy | |
| Connect to sandbox | |
| Stream live logs | |
| Incremental policy update | |
| Pull current policy | |
| Push updated policy | |
| Policy revision history | |
| Create sandbox from Dockerfile | |
| Forward a port | |
| Upload files to sandbox | |
| Download files from sandbox | |
| Create provider | |
| List providers | |
| Configure gateway inference | |
| View gateway inference | |
| Delete sandbox | |
| Remove gateway registration | |
| Self-teach any command | |
| 任务 | 命令 |
|---|---|
| 注册本地端口转发网关 | |
| 检查网关健康状态 | |
| 列出/切换网关 | |
| 创建沙箱(交互式) | |
| 使用工具创建沙箱 | |
| 使用自定义策略创建沙箱 | |
| 连接到沙箱 | |
| 流式传输实时日志 | |
| 增量更新策略 | |
| 获取当前策略 | |
| 推送更新后的策略 | |
| 策略修订历史 | |
| 从Dockerfile创建沙箱 | |
| 转发端口 | |
| 上传文件到沙箱 | |
| 从沙箱下载文件 | |
| 创建提供商 | |
| 列出提供商 | |
| 配置网关推理 | |
| 查看网关推理 | |
| 删除沙箱 | |
| 删除网关注册 | |
| 自学任何命令 | |
Companion Skills
配套技能
| Skill | When to use |
|---|---|
| Creating or modifying policy YAML content (network rules, L7 inspection, access presets, endpoint configuration) |
| Diagnosing gateway deployment, runtime, or health failures |
| Diagnosing |
| Developing features for the OpenShell TUI ( |
| 技能 | 使用场景 |
|---|---|
| 创建或修改策略YAML内容(网络规则、L7检查、访问预设、端点配置) |
| 诊断网关部署、运行时或健康故障 |
| 诊断 |
| 开发OpenShell TUI( |