Skip to content

Add --local flag support to login and ci commands #215

@leggetter

Description

@leggetter

Problem

Currently, only hookdeck project use supports the --local flag to save configuration to the current directory (.hookdeck/config.toml). The hookdeck login and hookdeck ci commands don't have this option, which creates an inconsistency and makes it harder to set up local, directory-specific configurations.

Current Behavior

  • hookdeck project use --local - Works, saves to .hookdeck/config.toml
  • hookdeck login --local - Flag doesn't exist
  • hookdeck ci --local - Flag doesn't exist

Expected Behavior

All authentication/configuration commands should support --local to create directory-specific configurations:

# Should create/update .hookdeck/config.toml
hookdeck login --local
hookdeck ci --api-key xxx --local
hookdeck project use my-org my-project --local

Workaround

Currently, users must use the global --config flag:

mkdir -p .hookdeck
hookdeck --config .hookdeck/config.toml ci --api-key xxx

However, this is less discoverable and doesn't follow the same pattern as project use --local.

Use Case

Directory-specific configurations are useful for:

  • Working with multiple projects in different directories
  • CI/CD environments where each repo should have its own config
  • Team collaboration where .hookdeck/config.toml can be committed to private repos

Proposed Solution

Add --local flag to login and ci commands with the same behavior as project use --local:

  • Creates .hookdeck/ directory if it doesn't exist
  • Saves configuration to .hookdeck/config.toml
  • Warns about adding .hookdeck/ to .gitignore for security

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions