All skills

Skill

local-setup

Use when asked to set up pncli for the first time, configure services, or initialize a repo. Walks through identity, work item tracking, source control, and optional services using non-interactive pncli config commands.

/invoke Bitbucket · Azure DevOps
config

Walk the user through a complete pncli setup — global config and repo-level defaults — using non-interactive commands. Ask the user questions and use their answers to run pncli config set commands.

Step 1 — Ask about identity.

Ask the user:

  • “What is your email address? (used across Jira, Bitbucket, etc.)”
  • “What is your username or user ID?”

Then set the values:

pncli config set user.email <their-email>
pncli config set user.userId <their-username>

Step 2 — Ask about work item tracking.

Ask the user: “Does this organization use Jira or Azure DevOps for work items and tickets?”

If Jira:

  • Ask for their Jira base URL (e.g. https://jira.company.com)
  • Ask for their Jira personal access token
pncli config set jira.baseUrl <url>
pncli config set jira.apiToken <token>

If Azure DevOps:

  • Ask for their Azure DevOps Server base URL (e.g. https://tfs.company.com)
  • Ask for their ADO personal access token
  • Ask for their default collection name (e.g. DefaultCollection)
  • Ask for their default project name
pncli config set ado.baseUrl <url>
pncli config set ado.pat <token>
pncli config set defaults.ado.collection <collection>
pncli config set defaults.ado.project <project>

Step 3 — Ask about source control.

Ask the user: “Does this organization use Bitbucket or Azure DevOps for pull requests and code review?”

If Bitbucket:

  • Ask for their Bitbucket Server base URL
  • Ask for their Bitbucket personal access token
pncli config set bitbucket.baseUrl <url>
pncli config set bitbucket.pat <token>

If Azure DevOps and not already configured in step 2, ask for the ADO credentials now.

Step 4 — Ask about optional services.

Ask the user about each of these. Skip any they don’t use:

Confluence — “Do you use Confluence for documentation?”

pncli config set confluence.baseUrl <url>
pncli config set confluence.apiToken <token>

SonarQube — “Do you use SonarQube for code quality and security scanning?”

pncli config set sonar.baseUrl <url>
pncli config set sonar.token <token>

SDElements — “Do you use SDElements for threat modeling?” If yes, ask for their connection string (format: token@hostname):

pncli config set sde.connection <token@hostname>

IBM UrbanCode Deploy — “Do you use IBM UrbanCode Deploy for component imports or deployment processes?”

pncli config set udeploy.baseUrl <url>

Ask whether they authenticate with a PAT or username/password:

  • If PAT: pncli config set udeploy.pat <token>
  • If username/password:
    pncli config set udeploy.username &lt;username&gt;
    pncli config set udeploy.password &lt;password&gt;

Optionally set defaults to avoid repeating flags on every command:

pncli config set defaults.udeploy.application <app-name>
pncli config set defaults.udeploy.environment <env-name>

Artifactory — “Do you use Artifactory for package management?”

pncli config set artifactory.baseUrl <url>
pncli config set artifactory.token <token>

Then ask which package ecosystems they proxy through Artifactory (npm, NuGet, Maven). Set whichever apply:

pncli config set artifactory.npmRepo <virtual-repo-name>
pncli config set artifactory.nugetRepo <virtual-repo-name>
pncli config set artifactory.mavenRepo <virtual-repo-name>

Step 5 — Set repo-level defaults.

Ask the user for project-specific defaults:

  • “What is the default Jira project key for this repo?” (e.g. ACME)
  • “What is the default target branch for PRs?” (e.g. main)
  • If SonarQube is configured: “What is the SonarQube project key?”
  • If SDElements is configured: “What is the SDElements project ID?”
pncli config set --repo defaults.jira.project <key>
pncli config set --repo defaults.bitbucket.targetBranch <branch>
pncli config set --repo defaults.sonar.project <key>
pncli config set --repo defaults.sde.project <id>

The --repo flag writes to .pncli.json in the repo root, keeping project-specific defaults scoped to the repo and shareable via version control.

Step 6 — Test connectivity.

pncli config test

Review the results. If any service shows ok: false, help the user troubleshoot the URL or credentials.

Run pncli config show to confirm the final configuration.