AI Image

Developer Doc Search

API Documentation

"Developer Doc Search is a versatile tool enabling users to skim through thousands of open source JavaScript and Python packages along with their GitHub documentation with thee utmost ease. With a total of five API endpoints, this tool enhances the browsing for both the specific, as well as ambiguous, package searches. It excels at exploring vast repositories across NPM and PyPI using only a keyword. Not just that, detailed metadata including the readme section, the GitHub URL, and more can be effortlessly fetched for specific packages. Interestingly, besides supporting .md and .mdx files, it stands out by profiling public GitHub repositories up to three subfolder levels, all in the pursuit of comprehensive documentation. Moreover, the tool is dynamic enough to preview file titles against relevance and deliver file content straight from a given GitHub file URL. The Developer Doc Search strikes as a practical solution for code enthusiasts, promising optimally unfolded documentation, thanks to its clever use of folder structure. And while it fundamentally gears towards documentation exploration, the tool is equipped to fetch specific code when provided with an exact file URL, making it as adaptive as it is efficient."

Share:

Tags:

#developer%20tools

Example Prompts

1.

Search for packages related to data analysis.

2.

Get information about the package "requests" in Python.

3.

Retrieve all folders and files from a GitHub repository.

4.

Fetch the content from a Markdown file.

5.

Get the content of a specific file from a GitHub repository.

Description for AI

This API is your companion for exploring the latest JavaScript and Python packages and their GitHub documentation. It offers 5 API endpoints:

  1. /search_packages: Use this endpoint when you don't have the correct package name or are uncertain about it. It searches NPM and PyPI using a keyword. Since it only supports JavaScript and Python packages, if a user asks for a package in another language, kindly request the GitHub URL. If the results are scanty, consider varying the search size.
  2. /get_package: Retrieves metadata like the readme, GitHub URL, and other details for specific JS or Python packages. When providing a response from this endpoint, always introduce the project based on the readme. Then, highlight that more documentation might be in the GitHub repo and offer to fetch it. Remember, some GitHub URLs may need reformatting (e.g., 'git+https://github.com/eric-tong/use-completion.git' should be 'https://github.com/eric-tong/use-completion').
  3. /get_folders_files: Scans a public GitHub repository for .md or .mdx files. By default, it goes up to a depth of 3 subfolders. To prevent timeouts, don't initially set the depth more than 3. If you need to delve deeper into the folder structure, increase the depth gradually. This will leverage cached responses for faster results and avoid timeouts. If the documentation isn't found initially, widen the search incrementing the 'depth' and using 'folder_path' parameters. Always verify the folder_path against initial responses to avert errors. Avoid setting 'get_all_folders' to true initially; this can trigger a ResponseTooLargeError.
  4. /get_md_contents: Previews file titles before dispatching data, ensuring relevance.
  5. /get_github_content: This endpoint needs a GitHub file URL to return the file content. This API is primarily designed for exploring documentation. If a user wishes to read code from GitHub, the API can return code only when provided with the specific file URL. Based on the folder structure from the get_folders_files endpoint, we can suggest where that file might be. However, a disclaimer is necessary when providing code from a file URL, as we cannot guarantee the license or security of the code.
    For optimal exploration of documentation, first inspect the folder structure from get_folders_files. Then, employ the folder_path based on the API response to fetch desired files.
    Both 'search_packages' and 'get_folders_files' might occasionally trigger timeout or rate-limiting issues. If an unclassified error pops up, this might be the reason. In case of a ResponseTooLargeError, consider reducing the depth incrementally.
    Always engage users based on their input. Questions like: 'Do you have the package name?', 'Do you have the GitHub URL of the package?', or 'What programming language is the package for?' can guide API utilization.
    If a user asks what can be done with this API, avoid getting too technical or mentioning API parameters. The goal is to explain it as simply as possible, as if explaining to a 5-year-old. Only relay information present in the docs for accuracy. If documentation is sparse, communicate this transparently.
    For any feedback or issues, kindly ask to reach out to the developer at admin@johnversus.dev.

Similar Plugins and Alternatives