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-runflag 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
Status: explained. The feature request for a
--dry-runflag was closed as not planned. A maintainer replied that the CLI already has awhoamicommand 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
whoamicommand 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?What @enesgules tried on GitHub (Outcome unclear)
A maintainer said the existing
whoamicommand 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?
Related questions
- How do I add a library's generated llms.txt / llms-full.txt file to Context7?
- Does Context7 support documentation versioning like Next.js 13 vs 14?
- Does the context7 MCP server support SSE or Streamable HTTP transport?
- Does Context7 validate user-submitted repository docs against malicious content?
- Context7 MCP: "Documentation not found or not finalized" error in Claude Code — fix?