mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
a13c883845
## What Two changes to the docs install experience: **1. Package-manager picker on install code blocks.** New `PackageInstall` client component (`docs/components/package-install.tsx`): the code block's copy button opens a dropdown of package managers. Selecting one rewrites the displayed command and copies it to the clipboard. - TypeScript blocks: npm (default, `npm install`) / pnpm / bun / yarn (`<pm> add`) - Python blocks: uv (default, `uv add`) / pip (`pip install`) - The menu is portaled to `document.body` so it isn't clipped by the `Tabs`/`CodeBlock` overflow containers, and closes on outside click, Escape, or real scroll movement. **2. `@composio/slim` callout in the quickstart.** The quickstart TypeScript install blocks carry display-only `#` comment lines noting that `@composio/core` ships its docs and TypeScript source in the package (inspectable to coding agents) and that `@composio/slim` is the smaller install with the same API. Comment lines are rendered muted and are **never copied** — the picker copies only the command. ## Where Converted every plain `npm install` / `pip install` code block under `docs/content` (quickstart, all provider pages, single-toolkit MCP, custom tools, migration guides, standup example, SDK reference indexes). The TS reference index's manual npm/pnpm/yarn/bun tabs collapse into one picker. The two SDK-reference generators (`ts/packages/core/scripts/generate-docs.ts`, `python/scripts/generate-docs.py`) emit the new component so regeneration keeps it. Flagged upgrade commands (`pip install -U/--upgrade`) and the bun-first examples were left as-is. ## Verification - `bun run types:check` — pass - `bun run build` — pass - `eslint` on touched TS files — clean (remaining repo lint errors are pre-existing on `next`) - Visual check via dev server + browser: comment lines render muted below the command, picker opens npm/pnpm/bun/yarn (uv/pip on Python tabs), selecting a manager rewrites the command, and the clipboard receives exactly the command with no comment lines. Docs-only behavior change; no changeset (generator-script edits don't touch published code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
SDK Documentation Generator
Generates MDX reference docs from Python source using griffe.
Usage
cd python
uv run --with griffe python scripts/generate-docs.py
How it works
- griffe extracts docstrings from
composio/**/*.py→ structured data generate-docs.pytransforms data → MDX files- Output written to
docs/content/reference/sdk-reference/python/
Configuration
- Expected classes:
EXPECTED_CLASSESdict maps class name → Composio property - Modules to search:
CLASS_MODULESlist - Decorators:
DECORATORS_TO_DOCUMENTlist
CI
.github/workflows/generate-sdk-docs.yml triggers on changes to python/composio/** and opens a PR with updated docs.