WebSim Commands Reference

Table of Contents

Introduction

WebSim provides a set of powerful commands to help you create, edit, and manage your web projects. These commands allow for precise control and efficient workflow. This reference guide explains each command, its usage, and provides examples.

!edit Command

!edit

The !edit command allows you to make specific changes to your project. It uses a JSON object to specify the operations to be performed.

Example:
!edit {"version":1,"operations":[{"type":"edit_element","tagId":"header","prompt":"Change the background color to blue"}]}

Note: The !edit command is powerful and flexible. You can use it to modify content, styling, or structure of your project.

!new Command

!new

The !new command starts a fresh project. It clears the current context and allows you to begin with a clean slate.

Example:
!new Create a landing page for a coffee shop

Note: Using !new will discard any unsaved changes in your current project.

!load Command

!load

The !load command allows you to retrieve a previously saved project or a specific version of a project.

Example:
!load myproject-v2

Note: Make sure to save your current work before loading a different project.

!fork Command

!fork

The !fork command creates a new branch or version of your current project, allowing you to experiment without affecting the original.

Example:
!fork Add a dark mode to the current design

Note: Forking is useful for trying out new ideas or creating variations of your project.

!undo Command

!undo

The !undo command reverts the last change made to your project.

Example:
!undo

Note: You can use !undo multiple times to step back through your changes.

!redo Command

!redo

The !redo command reapplies a change that was previously undone.

Example:
!redo

Note: !redo can only be used after an !undo command.

!help Command

!help

The !help command provides information about available commands and how to use them.

Example:
!help edit

Note: You can use !help followed by a specific command name to get detailed information about that command.