Skip to content

Wized CLI ​

The Wized CLI lets you manage your Wized project configuration directly from the terminal. Pull a branch's configuration to disk as plain JSON files, edit them with any tool, and push changes back in a single command.

It's designed for developers who want to version-control Wized config alongside their code, automate changes in CI/CD, or use AI coding tools like Claude Code to work on configuration files locally.

Requirements ​

  • Node.js 20 or later
  • A Wized account with an active organization

Installation ​

Install the CLI globally with npm:

bash
npm install -g @wized/cli

Or run it without installing using npx:

bash
npx @wized/cli <command>

After a global install, the wized command is available in any terminal session.

Logging in ​

1. Run the login command ​

bash
wized login

A browser window opens. Sign in with your Wized account — the same credentials you use in the configurator.

2. Approve the connection ​

After signing in, your browser shows a confirmation message and you can close the tab. The CLI saves the tokens it receives to ~/.wized/credentials.json and reuses them for every command.

Note

The CLI signs in with OAuth 2.0 and PKCE, so your password is never stored. The credentials file is plain text, readable only by your user account. Treat it like a password and run wized logout on shared machines.

3. Start using CLI commands ​

You're ready. See Commands for a full reference or follow the Typical Workflow for a guided walkthrough.

Logging out ​

bash
wized logout

Deletes ~/.wized/credentials.json.

Switching workspaces ​

bash
wized switch-workspace

The CLI works in one workspace at a time: the one you chose when logging in. To work in another, run wized switch-workspace and pick it in the browser. See Commands for details.

Using the CLI with an AI tool ​

The CLI is built to be driven by AI coding tools such as Claude Code, Cursor or Windsurf. Open your project folder in the tool and describe the change you want, for example:

Use the Wized CLI to add a "Load user" request to my project's "feature/profile" branch.
Start with `wized docs` and `wized --help`. If the `wized` command doesn't exist,
install it with `npm install -g @wized/cli` first.

A few things to know:

  • Installing: if the tool reports that wized isn't found, it should install it with npm install -g @wized/cli, or run it without installing using npx -y @wized/cli <command>.
  • Signing in: wized login and wized switch-workspace open your browser, so you finish signing in yourself. After that the tool can run every other command on its own.
  • Branches only: changes are pushed to the branch you pulled. Pushing to main is blocked, so you review and merge in the configurator.

Configuration ​

The CLI connects to Wized production by default. These environment variables change that:

VariableDefaultDescription
ENVproductiondevelopment, preview or production. Selects the server and Auth0 defaults below.
SERVER_ORIGINhttps://server.wized.comWized server URL
AUTH0_CUSTOM_DOMAINsso.finsweet.comAuth0 domain used for login
AUTH0_DOMAINfinsweet.us.auth0.comAuth0 tenant domain
WIZED_SPA_AUTH0_CLIENT_IDWized's public client IDAuth0 client used for login

Run wized env to see the values in use.