Skip to content

Typical Workflow ​

This page walks through a full session: creating a branch, downloading its config, editing it, and pushing the changes back.

1. Log in ​

bash
wized login

Your browser opens so you can sign in with your Wized account. You only need to do this once per machine. The tokens are saved to ~/.wized/credentials.json and reused by every command.

2. Find your project and branch ​

bash
# List your projects
wized list-projects

# List branches in a project
wized list-branches --project abc123

Projects are listed for the workspace you're logged in to. If yours is in another workspace, run wized switch-workspace first.

If you need a new branch:

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

The command prints the new branch ID and the pull command to run next.

3. Pull the branch ​

bash
wized pull --project abc123 --branch xyz789

Config lands in .wized-config/:

.wized-config/
├── .gitignore          ← excludes metadata/ and schema/
├── requests.json
├── apps.json
├── events.json
├── ...
├── schema/             ← JSON Schemas, referenced by each file's $schema
│   ├── requests.json
│   └── ...
└── metadata/
    └── .metadata.json  ← project ID, branch ID, pull time

Every item gets a local "cli_metadata": { "status": "synced" } field. The CLI uses it to know what you changed. It is never sent to Wized.

4. Edit and mark your changes ​

Edit the items array in any collection file, and set cli_metadata.status on every item you touch:

  • Edited an item? Set "status": "updated".
  • Added an item? Add it with "status": "created". Leave out id; the CLI assigns one when you push.
  • Want to remove an item? Set "status": "deleted". Removing it from the array does not delete it from Wized.
json
{
  "id": "v1",
  "name": "isLoggedIn",
  "initialValue": "return true",
  "cli_metadata": { "status": "updated" }
}

TIP

Keep the $schema property at the top of each file. It lets your editor validate and autocomplete as you type.

5. Check your work ​

bash
wized check

Counts the items waiting to be pushed and validates each file against its schema:

Checking 10 collection(s) for abc123/xyz789…

  requests       1 created  ·  2 updated
  apps           synced
  variables      1 deleted

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

Fix any errors before pushing. The server validates everything again and rejects invalid data.

6. Push ​

bash
wized push

No flags needed: the project and branch come from the metadata file. Only marked items are sent:

Pushing requests… 3 upserted, 0 deleted
Pushing variables… 0 upserted, 1 deleted

Done. Total: 3 upserted, 1 deleted.

After a successful push, deleted items are removed from your local files and everything else is set back to synced, ready for the next round of edits.

7. Review and merge ​

The changes are now on your feature branch. Open the Wized configurator to preview them and merge into main, the same as any other branch change.

Pulling again ​

Run pull again whenever you want the latest server state. To protect your work it refuses to overwrite items that are still marked created, updated or deleted. Push them first, or add --force to discard them.

To switch to another branch in the same directory, pull it without -c so that every collection is replaced. To work on a different project, use a separate directory.

Working with large configs ​

Use -c to work with a subset of collections:

bash
wized pull --project abc123 --branch xyz789 -c requests apps
wized check -c requests apps
wized push -c requests apps