witwin CLI
Reference for the witwin command - init, check, run, open, add, platform, solve and host - with every option.
witwin works with a Project without the editor. It is installed by the
witwin-studio package and can also run as python -m witwin.studio. Most
commands find the Project by walking up from the current folder to the
nearest witwin.toml.
witwin init#
witwin init [path] [--name NAME]Makes a folder a Project and a Python project. In a new or empty folder it
writes witwin.toml, pyproject.toml, README.md, .gitignore and
.gitattributes, runs git init and makes the first commit. It never
overwrites an existing file: an existing pyproject.toml only gains the
witwin-studio dependency, an existing .gitignore only gains .witwin/ and
.venv/.
current folderwitwin check#
witwin check [path]Validates the Project files. Exits non-zero on errors, so it fits in CI.
witwin run#
witwin run [--project PATH] script [args ...]Runs a Python script with the Project root and the script's folder on
sys.path. Arguments after the script are passed to it.
the Project holding the scriptwitwin open#
witwin open [path]Opens the Project in WiTwin Studio.
witwin add#
witwin add SPEC [--project PATH] [--tag TAG | --rev SHA | --branch NAME]
[--no-editable] [--index-url URL] [--uv PATH] [--python PATH]
[--no-sync] [--json]Adds a Plugin dependency to pyproject.toml and syncs the Project's
environment with uv. Plugins come from the witwin index, a git URL or a
folder, never from PyPI. If the sync fails, pyproject.toml and uv.lock
are restored.
"wt-radar>=0.3"), a git URL (git+https://...) or a folder.the published witwin indexWITWIN_UV, the uv package, then PATH.venv.pyproject.toml and uv.lock only.witwin platform#
witwin platform [path] [--write] [--json]Compares the Project's lock with the cloud platform's pinned packages.
pyproject.toml.witwin solve#
witwin solve [SOLVER] [--project PATH] [--scene ID] [--config FILE]
[--set KEY=VALUE ...] [--plugin-path PATH ...]
[--attach | --no-attach] [--no-record] [--list] [--json] [--quiet]Runs a Plugin solver headless and records a Result. When Studio has the
Project open, the run goes to that server unless you pass --no-attach.
witwin.radar.simulate.the main scene.toml or .json).witwin host#
witwin host [path] [--headless] [--no-relay] [--attach URL] [--init]
[--allow-broad-folder] [--port N] [--plugin-path PATH ...]
[--no-plugins] [--verbose]
witwin host status [path]
witwin host unregister [path]
witwin login | logout | whoamiServes a folder as a Project for My machines. Provided by the WiTwin server package. See Connect your own machine.
Commands from other packages#
Installed packages can add subcommands through the witwin.cli entry point
group. Built-in command names always win.