cli-anything-sbox

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

s&box CLI

s&box CLI

Agent-native CLI for the s&box game engine (Facepunch Studios, Source 2). 79+ commands across 14 groups. Manipulate
.scene
,
.prefab
,
.vmat
,
.sound
,
Input.config
,
Collision.config
JSON files directly, generate idiomatic C# components, and run a real-time asset graph over the project.
面向s&box游戏引擎(Facepunch Studios,Source 2)的Agent原生CLI。涵盖14个命令组,共79+条命令。可直接操作
.scene
.prefab
.vmat
.sound
Input.config
Collision.config
等JSON文件,生成符合规范的C#组件,并在项目上运行实时资源图谱。

Installation

安装

bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=sbox/agent-harness
bash
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=sbox/agent-harness

Requirements

要求

  • Python 3.10+
  • s&box installed via Steam - auto-detected, or set
    SBOX_PATH
    to a custom installation directory.
  • Most commands work entirely on the project's JSON files - s&box does not need to be running.
  • Python 3.10+
  • 通过Steam安装s&box - 会自动检测,或设置
    SBOX_PATH
    指定自定义安装目录。
  • 大多数命令仅基于项目的JSON文件运行 - 无需启动s&box。

Global Options

全局选项

--json          Machine-readable JSON output (always pass for agent use)
--project PATH  Project directory (auto-detects from cwd .sbproj if omitted)
--json          机器可读的JSON输出(Agent调用时需始终传入)
--project PATH  项目目录(若省略,会自动从当前工作目录的.sbproj文件检测)

Command Groups

命令组

project - Manage s&box projects

project - 管理s&box项目

bash
cli-anything-sbox project new --name MyGame --output-dir ./MyGame
cli-anything-sbox --json project info
cli-anything-sbox project config --max-players 32 --tick-rate 64
cli-anything-sbox --json --project ./MyGame project add-package facepunch.libsdf
cli-anything-sbox --json --project ./MyGame project remove-package facepunch.libsdf
bash
cli-anything-sbox project new --name MyGame --output-dir ./MyGame
cli-anything-sbox --json project info
cli-anything-sbox project config --max-players 32 --tick-rate 64
cli-anything-sbox --json --project ./MyGame project add-package facepunch.libsdf
cli-anything-sbox --json --project ./MyGame project remove-package facepunch.libsdf

Lint: broken asset refs, duplicate GUIDs, malformed Input.config

代码检查:损坏的资源引用、重复GUID、格式错误的Input.config

cli-anything-sbox --json --project ./MyGame project validate cli-anything-sbox --project ./MyGame project validate --no-inputs --no-guids
undefined
cli-anything-sbox --json --project ./MyGame project validate cli-anything-sbox --project ./MyGame project validate --no-inputs --no-guids
undefined

scene - Manipulate
.scene
files

scene - 操作.scene文件

bash
cli-anything-sbox scene new --name gameplay -o ./Assets/scenes/gameplay.scene
cli-anything-sbox --json scene info ./scene.scene
cli-anything-sbox --json scene list ./scene.scene
cli-anything-sbox scene add-object ./scene.scene Enemy --position "100,0,0" --components "model,box_collider,rigidbody" --tags "enemy"
cli-anything-sbox scene remove-object ./scene.scene --name Enemy
cli-anything-sbox scene add-component ./scene.scene <object-guid> Sandbox.PointLight
cli-anything-sbox scene remove-component ./scene.scene <object-guid> --component-type Sandbox.Rigidbody
cli-anything-sbox --json scene modify-object ./scene.scene --guid <guid> --name NewName --position "200,0,0"
cli-anything-sbox --json scene clone-object ./scene.scene --name Enemy --new-name EnemyCopy --position "300,0,0"
cli-anything-sbox --json scene get-object ./scene.scene --name Sun
cli-anything-sbox scene set-property ./scene.scene --fixed-update-freq 64 --timescale 0.5
cli-anything-sbox scene set-navmesh ./scene.scene --enabled --agent-height 72 --agent-radius 16
cli-anything-sbox --json scene list-presets
cli-anything-sbox --json scene modify-component ./scene.scene <object-guid> <component-guid> --properties '{"Damage":50}'
bash
cli-anything-sbox scene new --name gameplay -o ./Assets/scenes/gameplay.scene
cli-anything-sbox --json scene info ./scene.scene
cli-anything-sbox --json scene list ./scene.scene
cli-anything-sbox scene add-object ./scene.scene Enemy --position "100,0,0" --components "model,box_collider,rigidbody" --tags "enemy"
cli-anything-sbox scene remove-object ./scene.scene --name Enemy
cli-anything-sbox scene add-component ./scene.scene <object-guid> Sandbox.PointLight
cli-anything-sbox scene remove-component ./scene.scene <object-guid> --component-type Sandbox.Rigidbody
cli-anything-sbox --json scene modify-object ./scene.scene --guid <guid> --name NewName --position "200,0,0"
cli-anything-sbox --json scene clone-object ./scene.scene --name Enemy --new-name EnemyCopy --position "300,0,0"
cli-anything-sbox --json scene get-object ./scene.scene --name Sun
cli-anything-sbox scene set-property ./scene.scene --fixed-update-freq 64 --timescale 0.5
cli-anything-sbox scene set-navmesh ./scene.scene --enabled --agent-height 72 --agent-radius 16
cli-anything-sbox --json scene list-presets
cli-anything-sbox --json scene modify-component ./scene.scene <object-guid> <component-guid> --properties '{"Damage":50}'

Find objects matching one or more filters (AND-combined)

查找匹配一个或多个筛选条件的对象(条件为AND关系)

cli-anything-sbox --json scene query ./scene.scene --has-component rigidbody --has-tag tower cli-anything-sbox --json scene query ./scene.scene --name-regex "^Tower\d$" --in-bounds "0,-500,-50,1000,500,50"
cli-anything-sbox --json scene query ./scene.scene --has-component rigidbody --has-tag tower cli-anything-sbox --json scene query ./scene.scene --name-regex "^Tower\d$" --in-bounds "0,-500,-50,1000,500,50"

Extract every asset reference (.vmdl, .vmat, .vsnd, .vtex, .vpcf, .prefab) from a scene

提取场景中的所有资源引用(.vmdl、.vmat、.vsnd、.vtex、.vpcf、.prefab)

cli-anything-sbox --json scene refs ./scene.scene
cli-anything-sbox --json scene refs ./scene.scene

Apply the same modification to every object that matches a query

对所有匹配查询条件的对象应用相同修改

cli-anything-sbox --json scene bulk-modify ./scene.scene --has-tag tower --position "0,0,100" --enable
cli-anything-sbox --json scene bulk-modify ./scene.scene --has-tag tower --position "0,0,100" --enable

Structural diff between two scenes (added/removed/modified GameObjects + SceneProperties)

两个场景之间的结构差异(新增/删除/修改的GameObject及SceneProperties)

cli-anything-sbox --json scene diff ./old.scene ./new.scene
cli-anything-sbox --json scene diff ./old.scene ./new.scene

Insert a prefab as a GameObject in a scene

将预制件作为GameObject插入场景

cli-anything-sbox --json scene instantiate-prefab ./level.scene ./Assets/prefabs/bullet.prefab --position "10,0,0"
undefined
cli-anything-sbox --json scene instantiate-prefab ./level.scene ./Assets/prefabs/bullet.prefab --position "10,0,0"
undefined

prefab - Manage
.prefab
files

prefab - 管理.prefab文件

bash
cli-anything-sbox prefab new --name Bullet -o ./Assets/prefabs/bullet.prefab --components "model,sphere_collider,rigidbody"
cli-anything-sbox --json prefab info ./Assets/prefabs/bullet.prefab
cli-anything-sbox prefab from-scene ./scene.scene <object-guid> -o ./Assets/prefabs/extracted.prefab
cli-anything-sbox --json prefab add-component ./prefab.prefab rigidbody
cli-anything-sbox prefab remove-component ./prefab.prefab --component-type Sandbox.Rigidbody
cli-anything-sbox --json prefab list
bash
cli-anything-sbox prefab new --name Bullet -o ./Assets/prefabs/bullet.prefab --components "model,sphere_collider,rigidbody"
cli-anything-sbox --json prefab info ./Assets/prefabs/bullet.prefab
cli-anything-sbox prefab from-scene ./scene.scene <object-guid> -o ./Assets/prefabs/extracted.prefab
cli-anything-sbox --json prefab add-component ./prefab.prefab rigidbody
cli-anything-sbox prefab remove-component ./prefab.prefab --component-type Sandbox.Rigidbody
cli-anything-sbox --json prefab list

Asset references inside a prefab

预制件内的资源引用

cli-anything-sbox --json prefab refs ./prefab.prefab
cli-anything-sbox --json prefab refs ./prefab.prefab

Modify component properties on a prefab (by component type or component GUID)

修改预制件上的组件属性(按组件类型或组件GUID)

cli-anything-sbox --json prefab modify-component ./prefab.prefab --component-type Sandbox.Rigidbody --properties '{"Gravity":false,"MassOverride":50}'
cli-anything-sbox --json prefab modify-component ./prefab.prefab --component-type Sandbox.Rigidbody --properties '{"Gravity":false,"MassOverride":50}'

Structural diff between two prefabs (root + named children)

两个预制件之间的结构差异(根节点及命名子节点)

cli-anything-sbox --json prefab diff ./old.prefab ./new.prefab
undefined
cli-anything-sbox --json prefab diff ./old.prefab ./new.prefab
undefined

codegen - Generate C# code

codegen - 生成C#代码

bash
undefined
bash
undefined

Plain Component

普通组件

cli-anything-sbox codegen component --name PlayerController --methods OnUpdate,OnFixedUpdate -o ./Code/PlayerController.cs
cli-anything-sbox codegen component --name PlayerController --methods OnUpdate,OnFixedUpdate -o ./Code/PlayerController.cs

Component with [Property] fields

带[Property]字段的组件

cli-anything-sbox --json codegen component --name Tower --properties '[{"name":"Damage","type":"float","default":"25f"},{"name":"Range","type":"float","default":"500f"}]'
cli-anything-sbox --json codegen component --name Tower --properties '[{"name":"Damage","type":"float","default":"25f"},{"name":"Range","type":"float","default":"500f"}]'

Networked component (partial class) with RPC method stubs

带RPC方法存根的网络组件(分部类)

cli-anything-sbox codegen component --name NetPlayer --networked --methods OnUpdate,OnFixedUpdate --rpc-methods "Fire:Broadcast,TakeDamage:Host" -o ./Code/NetPlayer.cs
cli-anything-sbox codegen component --name NetPlayer --networked --methods OnUpdate,OnFixedUpdate --rpc-methods "Fire:Broadcast,TakeDamage:Host" -o ./Code/NetPlayer.cs

GameResource

GameResource

cli-anything-sbox codegen gameresource --name TowerData --display-name "Tower Data" --extension tower -o ./Code/TowerData.cs
cli-anything-sbox codegen gameresource --name TowerData --display-name "Tower Data" --extension tower -o ./Code/TowerData.cs

Editor menu (Editor/ assembly)

编辑器菜单(Editor/程序集)

cli-anything-sbox codegen editor-menu --name MyTools --menu-path "Editor/My Tools/Open" -o ./Editor/MyTools.cs
cli-anything-sbox codegen editor-menu --name MyTools --menu-path "Editor/My Tools/Open" -o ./Editor/MyTools.cs

Plain Razor UI component (.razor + .razor.scss)

普通Razor UI组件(.razor + .razor.scss)

cli-anything-sbox codegen razor --name HudPanel --properties '[{"name":"Score","type":"int","default":"0"}]' -o ./UI/HudPanel.razor
cli-anything-sbox codegen razor --name HudPanel --properties '[{"name":"Score","type":"int","default":"0"}]' -o ./UI/HudPanel.razor

Static or base-derived class

静态类或继承基类的类

cli-anything-sbox codegen class --name Math2 --static -o ./Code/Math2.cs
cli-anything-sbox codegen class --name Math2 --static -o ./Code/Math2.cs

PanelComponent + sibling ScreenPanel scaffold (handles the s&box quirk where

PanelComponent + 同级ScreenPanel脚手架(解决s&box的特殊限制:

PanelComponent input only works when both are on the same GameObject).

PanelComponent输入仅在两者位于同一GameObject时生效)。

Emits .razor + .razor.scss + a paste-ready GameObject snippet, or appends

生成.razor + .razor.scss + 可直接粘贴的GameObject代码片段,或通过--scene参数直接追加到场景中。

directly to a scene with --scene.

cli-anything-sbox --json codegen panel-component --name HudBar -o ./UI/HudBar.razor cli-anything-sbox codegen panel-component --name Crosshair -o ./UI/Crosshair.razor --scene ./Assets/scenes/game.scene
undefined
cli-anything-sbox --json codegen panel-component --name HudBar -o ./UI/HudBar.razor cli-anything-sbox codegen panel-component --name Crosshair -o ./UI/Crosshair.razor --scene ./Assets/scenes/game.scene
undefined

input - Manage
Input.config

input - 管理Input.config

bash
cli-anything-sbox --json input list
cli-anything-sbox input add --name PlaceTower --group Gameplay --keyboard mouse1 --gamepad RightTrigger
cli-anything-sbox input remove --name PlaceTower
cli-anything-sbox input set --name Attack1 --keyboard mouse1
bash
cli-anything-sbox --json input list
cli-anything-sbox input add --name PlaceTower --group Gameplay --keyboard mouse1 --gamepad RightTrigger
cli-anything-sbox input remove --name PlaceTower
cli-anything-sbox input set --name Attack1 --keyboard mouse1

collision - Manage
Collision.config

collision - 管理Collision.config

bash
cli-anything-sbox --json collision list
cli-anything-sbox collision add-layer --name projectile --default Collide
cli-anything-sbox collision add-rule --layer-a projectile --layer-b solid --result Collide
cli-anything-sbox collision remove-rule --layer-a projectile --layer-b solid
cli-anything-sbox collision remove-layer --name projectile
bash
cli-anything-sbox --json collision list
cli-anything-sbox collision add-layer --name projectile --default Collide
cli-anything-sbox collision add-rule --layer-a projectile --layer-b solid --result Collide
cli-anything-sbox collision remove-rule --layer-a projectile --layer-b solid
cli-anything-sbox collision remove-layer --name projectile

material - Manage
.vmat
materials

material - 管理.vmat材质

bash
cli-anything-sbox --json material new --name floor --shader complex --color-texture "textures/floor.tga" --metalness 0.3 -o ./Assets/materials/floor.vmat
cli-anything-sbox --json material info ./Assets/materials/floor.vmat
cli-anything-sbox --json material list
cli-anything-sbox --json material set ./Assets/materials/floor.vmat --metalness 0.8
bash
cli-anything-sbox --json material new --name floor --shader complex --color-texture "textures/floor.tga" --metalness 0.3 -o ./Assets/materials/floor.vmat
cli-anything-sbox --json material info ./Assets/materials/floor.vmat
cli-anything-sbox --json material list
cli-anything-sbox --json material set ./Assets/materials/floor.vmat --metalness 0.8

sound - Manage
.sound
events

sound - 管理.sound事件

bash
cli-anything-sbox --json sound new --name gunshot --sounds "sounds/gun1.vsnd,sounds/gun2.vsnd" --volume 0.8 -o ./Assets/sounds/gunshot.sound
cli-anything-sbox --json sound info ./Assets/sounds/gunshot.sound
cli-anything-sbox --json sound list
cli-anything-sbox --json sound set ./Assets/sounds/gunshot.sound --volume 0.5
bash
cli-anything-sbox --json sound new --name gunshot --sounds "sounds/gun1.vsnd,sounds/gun2.vsnd" --volume 0.8 -o ./Assets/sounds/gunshot.sound
cli-anything-sbox --json sound info ./Assets/sounds/gunshot.sound
cli-anything-sbox --json sound list
cli-anything-sbox --json sound set ./Assets/sounds/gunshot.sound --volume 0.5

localization - Manage translations

localization - 管理翻译

bash
cli-anything-sbox localization new --lang en -o ./Localization/en.json
cli-anything-sbox localization set ./Localization/en.json --key "game.title" --value "My Game"
cli-anything-sbox --json localization list ./Localization/en.json
cli-anything-sbox localization get ./Localization/en.json --key "game.title"
cli-anything-sbox localization remove ./Localization/en.json --key "game.title"
cli-anything-sbox localization bulk-set ./Localization/en.json --keys '{"ui.start":"Start","ui.quit":"Quit"}'
bash
cli-anything-sbox localization new --lang en -o ./Localization/en.json
cli-anything-sbox localization set ./Localization/en.json --key "game.title" --value "My Game"
cli-anything-sbox --json localization list ./Localization/en.json
cli-anything-sbox localization get ./Localization/en.json --key "game.title"
cli-anything-sbox localization remove ./Localization/en.json --key "game.title"
cli-anything-sbox localization bulk-set ./Localization/en.json --keys '{"ui.start":"Start","ui.quit":"Quit"}'

server - Dedicated server

server - 专用服务器

bash
cli-anything-sbox server info
cli-anything-sbox server start --game my_game --map facepunch.flatgrass
bash
cli-anything-sbox server info
cli-anything-sbox server start --game my_game --map facepunch.flatgrass

asset - Asset management & reverse lookups

asset - 资源管理与反向查找

bash
cli-anything-sbox --json asset list --type scene
cli-anything-sbox --json asset info ./Assets/scenes/minimal.scene
cli-anything-sbox asset compile ./Assets/materials/floor.vmat
bash
cli-anything-sbox --json asset list --type scene
cli-anything-sbox --json asset info ./Assets/scenes/minimal.scene
cli-anything-sbox asset compile ./Assets/materials/floor.vmat

Which scenes/prefabs reference this asset?

哪些场景/预制件引用了该资源?

cli-anything-sbox --json --project ./MyGame asset find-refs models/myteam/widget.vmdl
cli-anything-sbox --json --project ./MyGame asset find-refs models/myteam/widget.vmdl

Find unreferenced assets (per type, or across all referenceable types)

查找未被引用的资源(按类型,或跨所有可引用类型)

cli-anything-sbox --json --project ./MyGame asset find-unused cli-anything-sbox --json --project ./MyGame asset find-unused --type model --type material
cli-anything-sbox --json --project ./MyGame asset find-unused cli-anything-sbox --json --project ./MyGame asset find-unused --type model --type material

Rename an asset and update every scene/prefab reference (extension preserved if omitted)

重命名资源并更新所有场景/预制件中的引用(若省略扩展名则保留原扩展名)

cli-anything-sbox --json --project ./MyGame asset rename models/team/widget.vmdl gizmo cli-anything-sbox --project ./MyGame asset rename models/team/widget.vmdl gizmo --dry-run
cli-anything-sbox --json --project ./MyGame asset rename models/team/widget.vmdl gizmo cli-anything-sbox --project ./MyGame asset rename models/team/widget.vmdl gizmo --dry-run

Move an asset across directories and update every reference

将资源移动到其他目录并更新所有引用

cli-anything-sbox --json --project ./MyGame asset move models/team/widget.vmdl models/shared/widget.vmdl
undefined
cli-anything-sbox --json --project ./MyGame asset move models/team/widget.vmdl models/shared/widget.vmdl
undefined

session - State management

session - 状态管理

bash
cli-anything-sbox session status
cli-anything-sbox session undo
cli-anything-sbox session redo
bash
cli-anything-sbox session status
cli-anything-sbox session undo
cli-anything-sbox session redo

test - Automated map/scene generation harness

test - 自动化地图/场景生成测试工具

bash
cli-anything-sbox test setup
cli-anything-sbox --json test run
bash
cli-anything-sbox test setup
cli-anything-sbox --json test run

launch - Open project in s&box editor

launch - 在s&box编辑器中打开项目

bash
cli-anything-sbox launch
bash
cli-anything-sbox launch

Component Presets

组件预设

29 short names usable with
--components
on
scene add-object
,
prefab new
, etc. Each maps to a
Sandbox.*
component type.
PresetComponent Type
model
Sandbox.ModelRenderer
box_collider
Sandbox.BoxCollider
sphere_collider
Sandbox.SphereCollider
capsule_collider
Sandbox.CapsuleCollider
plane_collider
Sandbox.PlaneCollider
model_collider
Sandbox.ModelCollider
rigidbody
Sandbox.Rigidbody
character_controller
Sandbox.CharacterController
player_controller
Sandbox.PlayerController
camera
Sandbox.CameraComponent
light_directional
Sandbox.DirectionalLight
light_point
Sandbox.PointLight
spot_light
Sandbox.SpotLight
ambient_light
Sandbox.AmbientLight
sprite_renderer
Sandbox.SpriteRenderer
skinned_model_renderer
Sandbox.SkinnedModelRenderer
text_renderer
Sandbox.TextRenderer
line_renderer
Sandbox.LineRenderer
decal_renderer
Sandbox.DecalRenderer
trail_renderer
Sandbox.TrailRenderer
particle_effect
Sandbox.ParticleEffect
sound_point
Sandbox.SoundPointComponent
nav_mesh_agent
Sandbox.NavMeshAgent
screen_panel
Sandbox.ScreenPanel
world_panel
Sandbox.WorldPanel
fixed_joint
Sandbox.FixedJoint
hinge_joint
Sandbox.HingeJoint
spring_joint
Sandbox.SpringJoint
ball_socket_joint
Sandbox.BallSocketJoint
scene list-presets
returns the live preset registry as JSON.
scene add-object
prefab new
等命令中使用
--components
参数时,可使用29个短名称。每个名称对应一个
Sandbox.*
组件类型。
预设名称组件类型
model
Sandbox.ModelRenderer
box_collider
Sandbox.BoxCollider
sphere_collider
Sandbox.SphereCollider
capsule_collider
Sandbox.CapsuleCollider
plane_collider
Sandbox.PlaneCollider
model_collider
Sandbox.ModelCollider
rigidbody
Sandbox.Rigidbody
character_controller
Sandbox.CharacterController
player_controller
Sandbox.PlayerController
camera
Sandbox.CameraComponent
light_directional
Sandbox.DirectionalLight
light_point
Sandbox.PointLight
spot_light
Sandbox.SpotLight
ambient_light
Sandbox.AmbientLight
sprite_renderer
Sandbox.SpriteRenderer
skinned_model_renderer
Sandbox.SkinnedModelRenderer
text_renderer
Sandbox.TextRenderer
line_renderer
Sandbox.LineRenderer
decal_renderer
Sandbox.DecalRenderer
trail_renderer
Sandbox.TrailRenderer
particle_effect
Sandbox.ParticleEffect
sound_point
Sandbox.SoundPointComponent
nav_mesh_agent
Sandbox.NavMeshAgent
screen_panel
Sandbox.ScreenPanel
world_panel
Sandbox.WorldPanel
fixed_joint
Sandbox.FixedJoint
hinge_joint
Sandbox.HingeJoint
spring_joint
Sandbox.SpringJoint
ball_socket_joint
Sandbox.BallSocketJoint
scene list-presets
命令会以JSON格式返回当前的预设注册表。

Agent Usage Pattern

Agent使用模式

Pass
--json
for every agent-driven invocation. Pipe through
jq
to thread GUIDs and paths between commands:
bash
undefined
每次Agent驱动的调用都需传入
--json
参数。可通过管道结合
jq
在命令之间传递GUID和路径:
bash
undefined

Bootstrap a project

初始化项目

sbproj=$(cli-anything-sbox --json project new --name MyGame --output-dir /tmp/MyGame | jq -r '.sbproj') cd /tmp/MyGame
sbproj=$(cli-anything-sbox --json project new --name MyGame --output-dir /tmp/MyGame | jq -r '.sbproj') cd /tmp/MyGame

Add a tower with a specific component layout, capture its GUID

添加一个具有特定组件布局的塔楼,捕获其GUID

guid=$(cli-anything-sbox --json scene add-object ./Assets/scenes/main.scene Tower
--components "model,box_collider,rigidbody" --tags "tower"
| jq -r '.guid')
guid=$(cli-anything-sbox --json scene add-object ./Assets/scenes/main.scene Tower
--components "model,box_collider,rigidbody" --tags "tower"
| jq -r '.guid')

Generate the corresponding C# component, networked

生成对应的网络版C#组件

cli-anything-sbox --json codegen component --name Tower --networked
--rpc-methods "Fire:Host" --properties '[{"name":"Damage","type":"float","default":"25f"}]'
-o ./Code/Tower.cs
cli-anything-sbox --json codegen component --name Tower --networked
--rpc-methods "Fire:Host" --properties '[{"name":"Damage","type":"float","default":"25f"}]'
-o ./Code/Tower.cs

Bulk-tweak every tower in the scene

批量调整场景中的所有塔楼

cli-anything-sbox --json scene bulk-modify ./Assets/scenes/main.scene
--has-tag tower --enable --position-y-add 50
cli-anything-sbox --json scene bulk-modify ./Assets/scenes/main.scene
--has-tag tower --enable --position-y-add 50

Validate before committing

提交前进行验证

cli-anything-sbox --json project validate
undefined
cli-anything-sbox --json project validate
undefined

REPL Mode

REPL模式

cli-anything-sbox
with no arguments enters an interactive REPL with a styled prompt:
$ cli-anything-sbox
cli-anything-sbox> project info
cli-anything-sbox> scene list ./Assets/scenes/main.scene
cli-anything-sbox> codegen component --name Foo -o ./Code/Foo.cs
cli-anything-sbox> quit
不带任何参数运行
cli-anything-sbox
会进入交互式REPL,带有样式化提示符:
$ cli-anything-sbox
cli-anything-sbox> project info
cli-anything-sbox> scene list ./Assets/scenes/main.scene
cli-anything-sbox> codegen component --name Foo -o ./Code/Foo.cs
cli-anything-sbox> quit

Environment Variables

环境变量

VariableDescriptionDefault
SBOX_PATH
s&box installation directoryAuto-detected from Steam library folders
CLI_ANYTHING_SKILL_REPO
Override the repo
repl_skin
reads SKILL.md from
HKUDS/CLI-Anything
变量描述默认值
SBOX_PATH
s&box安装目录从Steam库文件夹自动检测
CLI_ANYTHING_SKILL_REPO
覆盖
repl_skin
读取SKILL.md的仓库
HKUDS/CLI-Anything