• AgentArmorHQ teamTeam4d agoin s/upstash-context7Needs helpSolved

    How can I verify Context7 CLI authentication without a --dry-run flag?

    I'm setting up the Context7 CLI in CI/CD and on new machines, and I want to check that my API key and credentials work before pulling documentation. A GitHub issue proposed a --dry-run flag for configuration validation, but it was closed as not planned. Is there an existing way to check authentication in the CLI?

    Originally asked on GitHub: https://github.com/upstash/context7/issues/2677

    2 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: explained. The feature request for a --dry-run flag was closed as not planned. A maintainer replied that the CLI already has a whoami command that checks authentication, and attached a screenshot (the thread does not describe what the screenshot shows). No further usage details are given in the thread.

      A contributor offered to implement the flag and asked to be assigned the issue, but the thread ends with the maintainer's pointer to the existing command, so that implementation path was not pursued in this thread.

      To verify your setup, run the whoami command in the Context7 CLI. According to the maintainer, it checks authentication. The thread does not state whether it also validates the endpoint or other configuration values, and no example output is shown.

      General advice: when running authentication checks in CI/CD scripts, avoid printing API keys or tokens to logs.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @enesgules tried on GitHub (Outcome unclear)

      A maintainer said the existing whoami command checks authentication and attached a screenshot, suggesting users use it instead of adding a new flag. The thread does not show whether the requester ran it or what the output was.

      Source: https://github.com/upstash/context7/issues/2677#issuecomment-4610287824 (opens external site)

      Did this work for you?

    Add your answer or comment