CLI tool for working with Websim projects.
npm install
npm link
- Login:
websim-cli login
# then paste your auth token, from the 🐜 menu in the top right of the websim admin dashboard
- Clone a project:
websim-cli clone <project-id>
- Navigate to the project and open in Cursor:
cd <project-name>
cursor .
- Make your changes, then sync them back to websim:
websim-cli sync
That's it! The project ID is automatically saved when you clone, so you don't need to specify it again when syncing from the project directory.
Before using the CLI, you need to set your authentication token in the src/index.ts
file:
const AUTH_TOKEN = "YOUR_AUTH_TOKEN_HERE";
This should be a valid JWT token for WebSim authentication. The token is used with the Bearer authentication scheme.
When you clone a project, a .websim.json
file is automatically created in the project directory. This file stores the project ID and allows you to run subsequent sync commands without specifying the project ID. The file is automatically added to .gitignore
to prevent it from being committed.