Skip to content
cccskills
FreePublished on GitHub

cli-anything-sbox

Manage s&box game projects through text commands. Edit scenes and reusable object templates, generate C# components, configure controls and translations, and inspect asset references to find unused files or validate project consistency.

OriginalShow the original description

Agent-native CLI for the s&box game engine (Facepunch Studios, Source 2): project management, scene/prefab editing, material/sound/localization configs, C# code generation, asset graph queries, project validation, and editor launch.

See how to install

Good for

  • Create scenes and reusable object templates
  • Generate C# components and UI scaffolds
  • Configure controls, collisions, and translations
  • Find asset references and update them after moves
  • Check projects for broken references and duplicate identifiers

Files included (1)

  • SKILL.md13.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Installation

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.

Global Options

--json          Machine-readable JSON output (always pass for agent use)
--project PATH  Project directory (auto-detects from cwd .sbproj if omitted)

Command Groups

project - Manage s&box projects

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
cli-anything-sbox --json --project ./MyGame project validate
cli-anything-sbox --project ./MyGame project validate --no-inputs --no-guids

scene - Manipulate .scene files

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)
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
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

# Structural diff between two scenes (added/removed/modified GameObjects + SceneProperties)
cli-anything-sbox --json scene diff ./old.scene ./new.scene

# Insert a prefab as a GameObject in a scene
cli-anything-sbox --json scene instantiate-prefab ./level.scene ./Assets/prefabs/bullet.prefab --position "10,0,0"

prefab - Manage .prefab files

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

# Modify component properties on a prefab (by component type or component GUID)
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

codegen - Generate C# code

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

# Component with [Property] fields
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
cli-anything-sbox codegen component --name NetPlayer --networked --methods OnUpdate,OnFixedUpdate --rpc-methods "Fire:Broadcast,TakeDamage:Host" -o ./Code/NetPlayer.cs

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

# Editor menu (Editor/ assembly)
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)
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

# PanelComponent + sibling ScreenPanel scaffold (handles the s&box quirk where
# PanelComponent input only works when both are on the same GameObject).
# Emits .razor + .razor.scss + a paste-ready GameObject snippet, or appends
# 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

input - Manage Input.config

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

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

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

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

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

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

asset - Asset management & reverse lookups

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

# 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

# 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

# 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

session - State management

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

test - Automated map/scene generation harness

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

launch - Open project in s&box editor

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
modelSandbox.ModelRenderer
box_colliderSandbox.BoxCollider
sphere_colliderSandbox.SphereCollider
capsule_colliderSandbox.CapsuleCollider
plane_colliderSandbox.PlaneCollider
model_colliderSandbox.ModelCollider
rigidbodySandbox.Rigidbody
character_controllerSandbox.CharacterController
player_controllerSandbox.PlayerController
cameraSandbox.CameraComponent
light_directionalSandbox.DirectionalLight
light_pointSandbox.PointLight
spot_lightSandbox.SpotLight
ambient_lightSandbox.AmbientLight
sprite_rendererSandbox.SpriteRenderer
skinned_model_rendererSandbox.SkinnedModelRenderer
text_rendererSandbox.TextRenderer
line_rendererSandbox.LineRenderer
decal_rendererSandbox.DecalRenderer
trail_rendererSandbox.TrailRenderer
particle_effectSandbox.ParticleEffect
sound_pointSandbox.SoundPointComponent
nav_mesh_agentSandbox.NavMeshAgent
screen_panelSandbox.ScreenPanel
world_panelSandbox.WorldPanel
fixed_jointSandbox.FixedJoint
hinge_jointSandbox.HingeJoint
spring_jointSandbox.SpringJoint
ball_socket_jointSandbox.BallSocketJoint

scene list-presets returns the live preset registry as JSON.

Agent Usage Pattern

Pass --json for every agent-driven invocation. Pipe through jq to thread GUIDs and paths between commands:

# Bootstrap a project
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=$(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
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

# Validate before committing
cli-anything-sbox --json project validate

REPL Mode

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

Environment Variables

VariableDescriptionDefault
SBOX_PATHs&box installation directoryAuto-detected from Steam library folders
CLI_ANYTHING_SKILL_REPOOverride the repo repl_skin reads SKILL.md fromHKUDS/CLI-Anything

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

cli-anything

FreeSummary

Use Codex to build Python command-line tools for applications with graphical interfaces. Analyze source code, add commands, test against the actual software, validate packaging and documentation, and discover tools already generated or installed.

  • Build a command-line tool from application source code
  • Extend an existing tool with more commands
  • Test behavior against the actual application
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

cli-anything

FreeSummary

Use Reasonix to build or improve a Python command-line interface for existing software. The workflow covers source analysis, interactive commands, JSON output, tests, documentation, and installation checks using the software’s own backend where possible.

  • Build command-line access to a GUI application
  • Add missing features to an existing command-line interface
  • Test commands against the actual software backend
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

cli-anything

FreeSummary

Build and improve Python command interfaces for GUI applications with OpenClaw. The skill guides source analysis, command design, testing, and packaging, including interactive sessions and structured JSON output for agents.

  • Build a command interface for a GUI application
  • Add missing commands to an existing interface
  • Test workflows against the actual application
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

cli-anything-3mf

FreeSummary

Inspect and edit 3MF files for 3D printing. Detect cylindrical holes, change their diameters, repair mesh issues, and compare files while preserving BambuStudio and PrusaSlicer metadata when repacking the edited file.

  • Detect cylindrical holes and check their diameters
  • Resize selected holes to a target diameter
  • Repair degenerate faces and duplicate vertices
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

Manage AdGuard Home network filtering from the command line. Update blocklists, register devices, configure DNS rules that map names to addresses, and inspect query logs and statistics through the AdGuard Home REST API.

  • Adding and refreshing ad-blocking filter lists
  • Mapping local domain names to IP addresses
  • Registering devices and managing fixed address assignments
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

Generate slides, documents, websites, and diagrams from natural language prompts through AnyGen OpenAPI. Manage reference uploads, check generation progress, and download finished files using commands with structured output for AI agents.

  • Generate slides or documents from written instructions
  • Upload reference files for a generation task
  • Check generation progress and download finished files
HKUDS/CLI-Anything54.9KUpdated Sep 22, 2026

See all skills by HKUDS

Report a problem with this skill