Skip to content

Feature: winget package, memorable context7 CLI alias, and agent-friendly library submit #2949

Description

@AMDphreak

Problem

Windows has no first-class install path for the official Context7 CLI.

  • winget search context7 / winget search ctx7 return no packages.
  • Official docs only document Node/npx/npm install -g ctx7.
  • Homebrew already packages the same CLI as ctx7 (npm tarball + Node dependency). Scoop has nothing either.
  • The binary name is only ctx7, which is hard for humans and agents to recall under pressure (context7 is the product name people search for).
  • The CLI can query docs (library / docs) but cannot submit libraries. Agents that discover missing docs while browsing still have to drop to raw REST or the web UI.

This blocks the “AI agents submit sources as they scour” workflow on Windows: no memorable command, no winget bootstrap, no first-class submit verb.

Current workarounds

Install (Node required):

npm install -g ctx7
# or
npx ctx7 ...

Submit a public GitHub repo via API (works today; not exposed by CLI/MCP):

curl -X POST https://context7.com/api/v2/add/repo/github \
  -H "Authorization: Bearer $CONTEXT7_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"docsRepoUrl":"https://github.com/owner/repo"}'

Web UI: https://context7.com/add-library

Requests

1. Ship a winget package (parity with Homebrew)

Please publish and maintain a WinGet package, e.g. Upstash.Context7 / Context7.CLI, so Windows users and automation can do:

winget install Upstash.Context7

Preferred packaging options (any one is fine):

  1. Standalone Windows binaries on GitHub Releases (context7.exe / ctx7.exe for amd64/arm64) + WinGet Releaser on tag — best for agents and locked-down machines.
  2. Homebrew-style Node wrapper (depend on OpenJS.NodeJS / similar and install the ctx7 npm package) — acceptable short-term parity with brew install ctx7.

Also useful: Scoop bucket entry and Chocolatey package once a release artifact exists.

2. Memorable command name / aliases

Please expose a memorable executable alias next to ctx7, ideally:

  • Primary discoverable name: context7
  • Keep ctx7 as a short alias

Notes:

  • npm package name context7 is already taken by an unrelated third-party package (bin: c7), so the package may need to stay ctx7, but the bin field can still install context7 → same entrypoint.
  • Winget package display name / id should say Context7 even if the npm name stays ctx7.
  • Docs/help banner already say “Context7”; the argv name should match what people type.

3. First-class library submit for agents

Add a non-interactive CLI command that wraps the existing Add Library API, e.g.:

context7 add https://github.com/owner/repo
context7 add https://github.com/owner/repo --json
context7 add https://gitlab.com/owner/repo   # if/when supported by API surface used

Expectations for agent use:

  • Auth via existing CONTEXT7_API_KEY / ctx7 login session (same as other authenticated flows)
  • Stable --json output (libraryName, message, HTTP-equivalent error codes)
  • Idempotent / clear handling of duplicates (409 duplicate_repo)
  • Documented exit codes suitable for scripts
  • Optional MCP tool (e.g. add-library) so Cursor/Claude agents can submit without shelling out

Today MCP only exposes resolve-library-id and query-docs, so agents can read but not contribute when a library is missing.

Why this matters

Coding agents frequently hit “library not in Context7” while debugging under time pressure. The product already has a public submit API; missing pieces are Windows packaging, a memorable command, and a CLI/MCP façade so agents can close the loop without humans pasting URLs into the website.

References

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