Skip to content

Commands ​

wized login ​

bash
wized login

Opens a browser window to authenticate with your Wized account. The resulting tokens are saved in plain text to ~/.wized/credentials.json (readable only by your user) and reused until you run wized logout.


wized logout ​

bash
wized logout

Deletes ~/.wized/credentials.json.


wized switch-workspace ​

bash
wized switch-workspace

Logs you in to a different Wized workspace. Every command works in the workspace you're logged in to, and list-projects only shows that workspace's projects.

A browser window opens with the same login as wized login, where you choose the workspace. Once the new login succeeds, the saved credentials are replaced and the previous session's refresh token is revoked. If you cancel the login, nothing changes.

Example output:

Choose the workspace to switch to in the browser.
Opening browser for login…
Switched to workspace Acme (org_abc123).
  Previous: Finsweet (org_xyz789)

TIP

A .wized-config directory belongs to one project. After switching, projects pulled from the previous workspace can't be pulled or pushed, so pull the new workspace's project, in a separate directory if you want to keep the old files.


wized list-projects ​

bash
wized list-projects

Lists the Wized projects in the workspace you're logged in to. Use wized switch-workspace to see another workspace's projects.

Example output:

Projects:
VERSION ID                       NAME
   2    abc123def456ghi789jkl   My Project

wized list-branches ​

bash
wized list-branches --project <id>

Lists the branches in a project.

Options:

FlagDescription
--project <id>Project ID (required)

Example:

bash
wized list-branches --project abc123

wized create-branch ​

bash
wized create-branch --project <id> --name <name>

Creates a new branch cloned from the project's development configuration and prints its ID. The branch is ready to pull and edit straight away.

Options:

FlagDescription
--project <id>Project ID (required)
--name <name>Branch name: 1–80 characters, no tabs or line breaks, cannot be main (required)

Example:

bash
wized create-branch --project abc123 --name "feature/dark-mode"

# Branch created.
#   ID:   xyz789...
#   Name: feature/dark-mode
#
# Run: wized pull --project=abc123 --branch=xyz789...

wized pull ​

bash
wized pull --project <id> --branch <id>

Downloads a branch's configuration to .wized-config/ as editable JSON files, and downloads the JSON Schemas for every collection to .wized-config/schema/.

Each collection file has this shape:

json
{
  "$schema": "schema/requests.json",
  "items": [
    {
      "id": "e017c5f2-79de-42dd-b1e5-581a36af4e47",
      "name": "Sign_Up_Supabase",
      "...": "...",
      "cli_metadata": { "status": "synced" }
    }
  ]
}
  • $schema points at the downloaded schema, so any editor that supports JSON Schema validates and autocompletes the file.
  • cli_metadata is a local field that records what you intend to do with each item. It is never sent to Wized. See Marking changes.

Pull also writes .wized-config/metadata/.metadata.json (project ID, branch ID and pull time) and a .wized-config/.gitignore that excludes the metadata/ and schema/ folders.

Safety rules:

  • A .wized-config directory belongs to one project. Pulling a different project into it is refused. Use a separate directory instead.
  • Pull refuses to overwrite items whose cli_metadata.status isn't synced. Push your changes first, or pass --force to discard them.
  • Switching to a different branch must pull every collection, so -c isn't allowed when the branch changes.
  • Every collection is downloaded before any file is written. If one fails, your local files are left untouched.

Options:

FlagDescription
--project <id>Project ID (required)
--branch <id>Branch ID (required)
-c, --collections <items...>Subset of collections to pull (e.g. -c requests events)
-d, --dir <path>Output directory for collection files (default: .wized-config)
--forceOverwrite local items that have unpushed changes

Examples:

bash
# Pull all collections for a branch
wized pull --project abc123 --branch xyz789

# Pull only requests and events
wized pull --project abc123 --branch xyz789 -c requests events

Finding your IDs

Run wized list-projects to get your project ID, then wized list-branches --project <id> to get branch IDs.


Marking changes ​

The CLI only pushes items you have marked. Set cli_metadata.status on each item you touch:

StatusMeaning
syncedUnchanged since the last pull or push. Skipped on push.
updatedAn existing item you edited.
createdA new item. Leave out id and the CLI assigns one when you push.
deletedAn existing item to remove from the branch.

Removing an item from the items array does not delete it from Wized. Set its status to deleted instead.


wized check ​

bash
wized check

Validates your local files against the downloaded schemas and counts the items waiting to be pushed. Must be run in a directory where wized pull has been run.

For each collection it reports how many items are created, updated and deleted, or synced if there are none. It also reports:

  • unreadable — the file isn't valid JSON
  • invalid status — an item's cli_metadata.status isn't one of the four values above
  • schema error(s) — an item doesn't match the schema. Items marked deleted are not validated.
  • no local schema — the schema hasn't been downloaded, so the file wasn't validated

Exits with code 1 if any collection has errors.

Some rules can't be expressed in JSON Schema, for example "an after-request event needs a request". The server checks those when you push.

Options:

FlagDescription
-c, --collections <items...>Subset of collections to check (e.g. -c requests apps)

Example output:

Checking 10 collection(s) for abc123/xyz789…

  requests       1 created  ·  2 updated
  apps           synced
  events         unreadable
  .wized-config/events.json is not valid JSON: Unexpected token , in JSON at position 95
  variables      1 updated  ·  1 schema error(s)
  .wized-config/variables.json  /items/4/storage: must be equal to one of the allowed values

4 item(s) pending push, 2 collection(s) with errors

wized push ​

bash
wized push

Sends the items you marked as created, updated or deleted to the branch. The project and branch IDs come from the metadata file written by pull, so no flags are needed.

For each collection, push:

  1. Stops with an error if the file isn't valid JSON or an item has an unknown status.
  2. Skips the collection if nothing is marked.
  3. Gives created items without an id a new ID.
  4. Validates the created and updated items against the local schema and stops if any fail.
  5. Sends only the marked items. The server validates them again and applies the changes.
  6. Rewrites the local file: deleted items are removed and every remaining item is set back to synced.

Pushes to main are blocked by both the CLI and the server.

Options:

FlagDescription
-c, --collections <items...>Subset of collections to push
-d, --dir <path>Directory containing the collection files (default: .wized-config)

Example output:

Pushing requests… 3 upserted, 1 deleted
Skipping events (no changes — mark items with cli_metadata.status)

Done. Total: 3 upserted, 1 deleted.

wized schema ​

bash
wized schema [collection]

Downloads JSON Schema files to .wized-config/schema/. pull already does this, so you only need it to refresh the schemas on their own.

Options:

FlagDescription
-d, --dir <path>Output directory (default: .wized-config/schema)

Available collections: requests, apps, events, elements, variables, cookies, parameters, folders, workflows, functions


wized docs ​

bash
wized docs [query...]

With no query, prints a short guide to how Wized works: function-body syntax for dynamic fields, the reactive objects (v, c, n, r, f, i, t), branches and secrets. With a query, searches the Wized documentation.

Examples:

bash
wized docs
wized docs supabase sign up
wized docs --query "how do requests work"

wized env ​

bash
wized env

Prints the server and Auth0 settings the CLI is using.