Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

opencode-python-docs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-python-docs

OpenCode plugin for Python documentation lookup via DevDocs

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

opencode-python-docs

OpenCode plugin for Python documentation lookup via DevDocs.

Quick Start

Add to ~/.config/opencode/opencode.json:

{ "plugin": ["opencode-python-docs"] }

Features

  • Search Python stdlib, language reference, tutorials, and more
  • Fetch full documentation as clean Markdown
  • Cache with intelligent TTL-based garbage collection
  • Multiple versions supported: 3.14, 3.13, 3.12, 3.11, 3.10, 3.9

Tools

python_docs

Search Python documentation index.

ArgumentTypeDescription
querystringSearch query (e.g., 'asyncio', 'pathlib')
versionstring?Python version (default: 3.14)
typestring?Filter by doc type
limitnumber?Max results (default: 20)

Example:

python_docs query="asyncio" version="3.12"

fetch_python_doc

Fetch full documentation as Markdown.

ArgumentTypeDescription
pathstringDoc path from search results
versionstring?Python version (default: 3.14)
anchorstring?Jump to specific section by anchor ID
offsetnumber?Character offset for pagination (default: 0)
limitnumber?Max characters to return (default: 12000)

Example:

fetch_python_doc path="library/asyncio"

Pagination example:

# First chunk
fetch_python_doc path="library/asyncio" offset=0 limit=5000

# Continue reading
fetch_python_doc path="library/asyncio" offset=5000 limit=5000

Caching

  • Index cache: 24 hours TTL
  • Doc cache: 7 days TTL
  • Location: ~/.cache/opencode/python-docs/
  • Garbage collection: Runs on startup and server reconnect
  • Schema-aware invalidation: Cached docs missing required fields (e.g., anchor index) are refetched even within TTL

Development

git clone https://github.com/yriveiro/opencode-python-docs
cd opencode-python-docs
bun install
bun run build

Scripts

CommandDescription
bun run buildBuild the plugin
bun run typecheckRun TypeScript type checking
bun run testRun tests
bun run formatFormat code with Biome
bun run lintRun Biome linter
bun run checkRun all checks (lint + format)

License

MIT

Keywords

opencode

FAQs

Package last updated on 03 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts