Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Add config show, config test, and config clear commands #94

@rianjs

Description

@rianjs

Summary

Add config subcommands to complement the existing init command, providing consistency with other open-cli-collective CLIs.

Commands to Add

1. cfl config show

Display current configuration with credential source indicators:

$ cfl config show
URL:       https://mycompany.atlassian.net/wiki
Email:     user@example.com
API Token: ****...****  (source: ATLASSIAN_API_TOKEN)
Space:     DOCS

Config file: ~/.config/cfl/config.yml

Should show:

  • All config values (token masked)
  • Source for each value: env, config, or - (not set)
  • Config file path

2. cfl config test

Test connectivity with the configured credentials:

$ cfl config test
Testing connection to https://mycompany.atlassian.net/wiki...
✓ Authentication successful
✓ API access verified (found 42 spaces)

Authenticated as: user@example.com

On failure:

$ cfl config test
Testing connection to https://mycompany.atlassian.net/wiki...
✗ Authentication failed: 401 Unauthorized

Check your credentials with: cfl config show
Reconfigure with: cfl init

3. cfl config clear

Remove stored configuration:

$ cfl config clear
Configuration cleared from ~/.config/cfl/config.yml

Note: Environment variables (CFL_*, ATLASSIAN_*) will still be used if set.

Should:

  • Delete the config file
  • Warn about env vars still being active
  • Be idempotent (no error if config doesn't exist)

Context

  • cfl init already exists and handles setup
  • These commands provide post-setup management
  • Matches patterns in jira-ticket-cli, newrelic-cli, slack-chat-api
  • config test extracts the connectivity verification from init --no-verify into a standalone command

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions