Skip to content
systemcoding.dev
Mainframe

Create a config file with zowe config init

Create a Zowe CLI team configuration file with zowe config init, which prompts for host, port and user and writes zowe.config.json.

1 min read
Summarize in AI

Zowe CLI v3 keeps connection details in a JSON file, and zowe config init writes the first one.

Text
zowe config init --prompt-for-values

The command asks for the values it needs, including the z/OSMF host, port, user and password, and then writes zowe.config.json in the current directory. Add --global-config to put the file in your home directory under ~/.zowe so that it applies from any folder, and --user-config for a file that holds only your own, private values.

JSON
{
  "profiles": {
    "zosmf": {
      "type": "zosmf",
      "properties": { "host": "mf.example.com", "port": 443 },
      "secure": ["user", "password"]
    }
  },
  "defaults": { "zosmf": "zosmf" }
}

The secure list is the notable part: user and password are not stored in the file, but in the operating system's credential store. Because of that, a project's zowe.config.json can be committed, while the zowe.config.user.json that holds personal overrides must not be. The layout is from Zowe CLI v3.

Taggedzowe
Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.