npx humanlayer config show

The config show command displays your current HumanLayer CLI configuration, including API settings, contact channels, and environment variables. This is useful for debugging configuration issues and verifying your setup.

Usage

npx humanlayer config show [options]

Options

FlagDescriptionDefault
--config-file <path>Path to config file~/.config/humanlayer/humanlayer.json
--slack-channel <id>Override Slack channel or user ID-
--slack-bot-token <token>Override Slack bot token-
--slack-context <context>Override Slack channel/user context-
--slack-thread-ts <ts>Override Slack thread timestamp-
--slack-blocks [boolean]Override Slack blocks setting-
--email-address <email>Override email address-
--email-context <context>Override email context-
--jsonOutput configuration as JSON with masked secrets-

Output Formats

Human-Readable Format (Default)

$ npx humanlayer config show
HumanLayer Configuration
==================================================

Config File Sources:
  Primary: /Users/yourname/.config/humanlayer/humanlayer.json
  Local: humanlayer.json

API Configuration:
  API Token: ***set***
  API Base URL: https://api.humanlayer.dev
  App Base URL: https://app.humanlayer.dev

Contact Channel Configuration:
  Slack:
    Channel/User ID: C123456789
    Bot Token: ***set***
    Context: engineering team
    Thread TS: <not set>
    Blocks: true

Environment Variables:
  HUMANLAYER_API_TOKEN: ***set***
  HUMANLAYER_SLACK_CHANNEL: C123456789
  HUMANLAYER_SLACK_BOT_TOKEN: ***set***
  (other env vars...)

JSON Format

$ npx humanlayer config show --json
{
  "api_token": "hl_abc1...",
  "api_base_url": "https://api.humanlayer.dev",
  "app_base_url": "https://app.humanlayer.dev",
  "contact_channel": {
    "slack": {
      "channel_or_user_id": "C123456789",
      "bot_token": "xoxb-1...",
      "context_about_channel_or_user": "engineering team",
      "experimental_slack_blocks": true
    }
  }
}

Configuration Resolution

The command shows the final resolved configuration after merging values from multiple sources in order of precedence:

  1. Command-line flags (highest priority)
  2. Environment variables
  3. Configuration files (lowest priority)

Examples

Basic Configuration Display

npx humanlayer config show

Show Configuration with Overrides

npx humanlayer config show --slack-channel C987654321 --email-address support@company.com

Output as JSON for Scripting

npx humanlayer config show --json | jq '.contact_channel'

Use Custom Config File

npx humanlayer config show --config-file ./project-config.json

Configuration Sources

Config Files

The CLI looks for configuration in these locations:

  • ./humanlayer.json (local project config)
  • ~/.config/humanlayer/humanlayer.json (user config)
  • Custom path via --config-file

Environment Variables

All settings can be overridden with environment variables:

  • HUMANLAYER_API_TOKEN
  • HUMANLAYER_API_BASE_URL
  • HUMANLAYER_APP_URL
  • HUMANLAYER_SLACK_CHANNEL
  • HUMANLAYER_SLACK_BOT_TOKEN
  • HUMANLAYER_SLACK_CONTEXT
  • HUMANLAYER_SLACK_THREAD_TS
  • HUMANLAYER_SLACK_BLOCKS
  • HUMANLAYER_EMAIL_ADDRESS
  • HUMANLAYER_EMAIL_CONTEXT

Security

  • Token masking: Sensitive values like API tokens and bot tokens are masked in the human-readable output
  • JSON output: The --json flag also masks sensitive values for security
  • No secrets in logs: Sensitive information is truncated to prevent accidental exposure

Troubleshooting

No Configuration Found

If you see empty configuration:

  1. Run npx humanlayer login to set up basic authentication
  2. Check if config files exist in expected locations
  3. Verify environment variables are set correctly

Missing Contact Channel

If no contact channel is configured:

  1. Set Slack channel: --slack-channel C123456789
  2. Set email address: --email-address team@company.com
  3. Or configure via environment variables or config file

Permission Issues

If you can’t read config files:

  1. Check file permissions: ls -la ~/.config/humanlayer/
  2. Ensure the directory exists
  3. Use --config-file to specify an alternative location