Files
CLI-Anything/sbox/agent-harness/setup.py
KarandeepSWranch 18c4222f8b feat: add s&box CLI harness
Adds cli-anything-sbox: an agent-native CLI for the s&box game engine
(Facepunch Studios, Source 2). 79+ commands across 14 groups, 222 tests
(155 unit + 17 orchestrator + 50 e2e), JSON output for every subcommand.

Strategy: s&box has no headless API, but every project artifact is
human-readable JSON on disk. The harness operates directly on .scene,
.prefab, .vmat, .sound, Input.config, Collision.config and .sbproj
files; only `launch` and `server start` shell out to the Steam binary.
This keeps the harness CI-friendly and deterministic.

Highlights:
- Full project lifecycle: project new/info/config, packages, validate
- Scene + prefab JSON manipulation, including query/refs/bulk-modify/diff/instantiate-prefab
- C# code generation (Component, GameResource, EditorMenu, Razor, PanelComponent + sibling ScreenPanel pattern)
- Project-wide asset graph: find-refs, find-unused, rename, move (all with --dry-run)
- Material, sound, localization, input, collision config editors
- Map-generation test orchestrator for procedural-content regression

Files added under sbox/agent-harness/ (28) plus the canonical
skills/cli-anything-sbox/SKILL.md mirror. registry.json entry added
in the gamedev category. .gitignore allowlist extended for /sbox/
and /sbox/agent-harness/. README.md / README_CN.md updated to surface
the new harness in the per-tool table and file tree.
2026-04-25 18:24:22 -07:00

58 lines
1.8 KiB
Python

#!/usr/bin/env python3
"""
setup.py for cli-anything-sbox
Install with: pip install -e .
Or publish to PyPI: python -m build && twine upload dist/*
"""
from setuptools import setup, find_namespace_packages
with open("cli_anything/sbox/README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="cli-anything-sbox",
version="1.0.0",
author="cli-anything contributors",
author_email="",
description="CLI harness for s&box (Source 2): scenes, prefabs, materials, sounds, codegen, asset graph, project validation. Recommended: s&box installed via Steam.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/HKUDS/CLI-Anything",
packages=find_namespace_packages(include=["cli_anything.*"]),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Games/Entertainment",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.10",
install_requires=[
"click>=8.0.0",
"prompt-toolkit>=3.0.0",
"Pillow>=10.0",
],
extras_require={
"dev": [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
],
},
entry_points={
"console_scripts": [
"cli-anything-sbox=cli_anything.sbox.sbox_cli:main",
],
},
package_data={
"cli_anything.sbox": ["skills/*.md", "tests/*.md", "README.md"],
},
include_package_data=True,
zip_safe=False,
)