|
| 1 | +# Source-to-Doc Mapping — pipecatcloud |
| 2 | + |
| 3 | +The profile for the shared `update-docs` skill, which lives in |
| 4 | +`pipecat-ai/pipecat` at `.claude/skills/update-docs/SKILL.md` and is published |
| 5 | +through the `pipecat-dev-skills` marketplace. `PROFILE_CONTRACT.md` beside it |
| 6 | +describes what this file has to provide. |
| 7 | + |
| 8 | +Most of what this package ships is a **command-line surface**, so the mapping is |
| 9 | +dominated by command-group-to-page rules rather than the class-to-page rules a |
| 10 | +library profile would use. |
| 11 | + |
| 12 | +## Scope |
| 13 | + |
| 14 | +Every `.py` file under `src/pipecatcloud/` is in scope. The package ships two |
| 15 | +public surfaces — the `pipecat cloud` CLI and the Python SDK — and both are |
| 16 | +documented. |
| 17 | + |
| 18 | +Exclude only: |
| 19 | + |
| 20 | +- `tests/**` |
| 21 | +- `__pycache__/`, `*.pyc`, `py.typed` |
| 22 | +- `src/pipecatcloud/__version__.py` |
| 23 | + |
| 24 | +Changes outside `src/pipecatcloud/` — examples, CI config, the docs directory — |
| 25 | +don't trigger doc updates on their own. |
| 26 | + |
| 27 | +Note that `src/pipecatcloud/__init__.py` is **not** excluded despite being a |
| 28 | +re-export file. Its `__all__` is the definition of the SDK's public surface, so |
| 29 | +a name added or removed there is a documentation change even when the |
| 30 | +implementation moved not at all. |
| 31 | + |
| 32 | +## Skip list |
| 33 | + |
| 34 | +| File | Why | |
| 35 | +| --- | --- | |
| 36 | +| `_utils/async_utils.py` | `synchronizer` plumbing that turns async commands into blocking ones. No observable surface. | |
| 37 | +| `api.py`, `cli/api.py` | The HTTP client. The class is `_API`, underscore-private, and the REST reference is generated from a hand-maintained `openapi.json` in the docs repo with no upstream to diff against. A change here that implies a REST contract change should be **reported as an unmapped finding** rather than edited into the REST pages blind. | |
| 38 | +| `cli/__init__.py` | Holds `PIPECAT_CLI_NAME`. Reaches users only through message text already documented elsewhere. | |
| 39 | + |
| 40 | +Nothing else is internal. In particular `_utils/` is not a skip zone — most of |
| 41 | +this package's documented behavior lives there. |
| 42 | + |
| 43 | +## Base classes |
| 44 | + |
| 45 | +`pipecatcloud` has no service base classes. Its analogue is the shared console |
| 46 | +layer, which every command's output and exit behavior passes through. |
| 47 | + |
| 48 | +| File | Pages to check | |
| 49 | +| --- | --- | |
| 50 | +| `_utils/console_utils.py` | `api-reference/cli/cloud/output.mdx` first — it defines `OutputMode`, the rich/plain/json rendering, `output_json`, and `require_interactive`, which is where the exit-2-on-no-TTY contract comes from. A change to the table or listing shape also affects every command page that shows example output. | |
| 51 | +| `_utils/auth_utils.py` | `api-reference/cli/cloud/output.mdx` (exit behavior when unauthenticated), `pipecat-cloud/guides/personal-access-tokens.mdx` | |
| 52 | + |
| 53 | +## Non-standard locations |
| 54 | + |
| 55 | +| File | Page | |
| 56 | +| --- | --- | |
| 57 | +| `cli/entry_point.py` | `api-reference/cli/cloud/output.mdx` — global options (`--output`, `--show-cli-config`) and their resolution order | |
| 58 | +| `cli/config.py`, `config.py` | `api-reference/cli/cloud/output.mdx` — `PIPECAT_`-prefixed environment variables and config-file keys. `PIPECAT_TOKEN` also appears in `pipecat-cloud/guides/personal-access-tokens.mdx` and `guides/cloud-builds.mdx`. | |
| 59 | +| `_utils/deploy_utils.py` | `api-reference/cli/cloud/deploy.mdx` — the `pcc-deploy.toml` reference. `DeployConfigParams` and its nested config classes are the source of truth for every accepted key. | |
| 60 | +| `_utils/build_utils.py` | `pipecat-cloud/guides/cloud-builds.mdx` — `DEFAULT_EXCLUSIONS` is enumerated on that page | |
| 61 | +| `_utils/github_utils.py` | `api-reference/cli/cloud/github.mdx`, `pipecat-cloud/guides/deploy-from-github.mdx` | |
| 62 | +| `_utils/regions.py` | `api-reference/cli/cloud/regions.mdx`, `pipecat-cloud/guides/regions.mdx` | |
| 63 | +| `constants.py` | Depends on the constant. Krisp values → `pipecat-cloud/guides/krisp-viva.mdx`. Grep the value itself. | |
| 64 | +| `exception.py` | `api-reference/pipecat-cloud/sdk-reference/exceptions.mdx` **and** `pipecat-cloud/fundamentals/error-codes.mdx`. The first documents the classes, the second the `PCC-` codes they carry. | |
| 65 | +| `session.py` | `api-reference/pipecat-cloud/sdk-reference/sessions.mdx`, and `api-reference/pipecat-cloud/sdk-reference/examples.mdx` — its first sample constructs a `Session` | |
| 66 | +| `agent.py` | `api-reference/pipecat-cloud/sdk-reference/session-arguments.mdx`, and `api-reference/pipecat-cloud/sdk-reference/examples.mdx` — two of its three samples are `bot()` entry points | |
| 67 | +| `smallwebrtc/session_manager.py` | `api-reference/pipecat-cloud/sdk-reference/sessions.mdx` | |
| 68 | +| `__init__.py` | `api-reference/pipecat-cloud/sdk-reference/overview.mdx` — its Key Components list should name everything in `__all__` | |
| 69 | + |
| 70 | +## Pattern matching |
| 71 | + |
| 72 | +`src/pipecatcloud/cli/commands/<group>.py` → |
| 73 | +`api-reference/cli/cloud/<group>.mdx`, with underscores becoming hyphens. |
| 74 | + |
| 75 | +| Source | Page | |
| 76 | +| --- | --- | |
| 77 | +| `cli/commands/agent.py` | `api-reference/cli/cloud/agent.mdx` | |
| 78 | +| `cli/commands/auth.py` | `api-reference/cli/cloud/auth.mdx` | |
| 79 | +| `cli/commands/build.py` | `api-reference/cli/cloud/build.mdx` | |
| 80 | +| `cli/commands/deploy.py` | `api-reference/cli/cloud/deploy.mdx` | |
| 81 | +| `cli/commands/docker.py` | `api-reference/cli/cloud/docker.mdx` | |
| 82 | +| `cli/commands/github.py` | `api-reference/cli/cloud/github.mdx` | |
| 83 | +| `cli/commands/organizations.py` | `api-reference/cli/cloud/organizations.mdx` | |
| 84 | +| `cli/commands/regions.py` | `api-reference/cli/cloud/regions.mdx` | |
| 85 | +| `cli/commands/secrets.py` | `api-reference/cli/cloud/secrets.mdx` | |
| 86 | +| `cli/commands/spend_limit.py` | `api-reference/cli/cloud/spend-limit.mdx` | |
| 87 | + |
| 88 | +A command group's page is not the whole story. Flags that change how a deploy |
| 89 | +behaves usually also appear in a guide — check `pipecat-cloud/fundamentals/` and |
| 90 | +`pipecat-cloud/guides/` per Step 7. |
| 91 | + |
| 92 | +### Self-hosted regions — currently being documented separately |
| 93 | + |
| 94 | +`cli/commands/agent_profiles.py` and `cli/commands/registry_keys.py`, and the |
| 95 | +self-hosted subcommands within `regions.py` and `secrets.py` |
| 96 | +(`regions register|show|delete|enroll-token`, `secrets reference`), have **no |
| 97 | +page yet**. They are covered by an in-flight docs PR adding |
| 98 | +`pipecat-cloud/self-hosted/`. |
| 99 | + |
| 100 | +Report changes to these as unmapped findings rather than creating pages for |
| 101 | +them, until that section exists and this table names it. |
| 102 | + |
| 103 | +## Search |
| 104 | + |
| 105 | +When the tables come up empty, grep `DOCS_PATH` for: |
| 106 | + |
| 107 | +- **CLI files** — the literal command name as the page heading spells it |
| 108 | + (`## agent link`, `### keys revoke`), then the flag string with its dashes |
| 109 | + (`--no-credentials`). Flags are the most reliable anchor: a page that |
| 110 | + documents a command documents its flags. |
| 111 | +- **SDK files** — the class name (`AgentStartError`, `SessionParams`). |
| 112 | +- **TOML keys** — the bare key (`websocket_auth`, `min_agents`) across |
| 113 | + `api-reference/cli/cloud/deploy.mdx` and the guides. |
| 114 | + |
| 115 | +## Section vocabulary |
| 116 | + |
| 117 | +Two page shapes, and they do not share a vocabulary. |
| 118 | + |
| 119 | +**CLI reference pages** — one `##` heading per subcommand, then: |
| 120 | + |
| 121 | +| Section | Built from | Form | |
| 122 | +| --- | --- | --- | |
| 123 | +| Usage | the command's argument and option signature | fenced `shell` block | |
| 124 | +| Arguments | `typer.Argument(...)` declarations | `<ParamField>` entries | |
| 125 | +| Options | `typer.Option(...)` declarations | `<ParamField>` entries, with both long and short forms in `path` (`--organization / -o`) | |
| 126 | + |
| 127 | +A `<ParamField>` `default` must be the Typer default, not what the help text or |
| 128 | +spinner displays. `agent logs --level` was documented as defaulting to `ALL` |
| 129 | +because that is what the spinner prints; the real default is `None`, and `ALL` |
| 130 | +is not a valid value. |
| 131 | + |
| 132 | +**SDK reference pages** — one `##` heading per class, then Constructor |
| 133 | +Parameters (`<ParamField>`), Methods (`<ResponseField>`), and Properties. |
| 134 | +Exceptions a method raises belong in its `<ResponseField>`. |
| 135 | + |
| 136 | +**`pcc-deploy.toml` keys** live in `api-reference/cli/cloud/deploy.mdx` under |
| 137 | +Configuration Options, as `<ParamField>` entries carrying a short TOML example |
| 138 | +each. Top-level keys go under Optional Fields; a `[section]` gets its own |
| 139 | +`####` heading. |
| 140 | + |
| 141 | +## Guide directories |
| 142 | + |
| 143 | +- `pipecat-cloud/fundamentals/` — deploy, scaling, secrets, active sessions, agent images, error codes, health checks, logging, accounts |
| 144 | +- `pipecat-cloud/guides/` — cloud builds, GitHub deploys, CI, telephony, container registries, websockets, regions, Krisp |
| 145 | +- `pipecat-cloud/security/` — security and compliance, HIPAA |
| 146 | +- `pipecat-cloud/introduction.mdx` — the section landing page; only changes when a whole capability arrives or leaves |
| 147 | + |
| 148 | +These carry a lot of copy-pasteable commands, and a renamed flag breaks every |
| 149 | +one of them silently. When a flag changes, grep all three directories for the |
| 150 | +old spelling before finishing. |
| 151 | + |
| 152 | +## New pages |
| 153 | + |
| 154 | +### Location and template |
| 155 | + |
| 156 | +A new command group goes at `DOCS_PATH/api-reference/cli/cloud/<group>.mdx`: |
| 157 | + |
| 158 | +```` |
| 159 | +--- |
| 160 | +title: "pipecat cloud <group>" |
| 161 | +sidebarTitle: "<group>" |
| 162 | +description: "pipecat cloud <group> ..., 110-140 chars naming what it manages" |
| 163 | +--- |
| 164 | +
|
| 165 | +[One or two sentences on what the group is for, and when to reach for it.] |
| 166 | +
|
| 167 | +## <subcommand> |
| 168 | +
|
| 169 | +[What it does.] |
| 170 | +
|
| 171 | +**Usage:** |
| 172 | +
|
| 173 | +```shell |
| 174 | +pipecat cloud <group> <subcommand> [ARGS] [OPTIONS] |
| 175 | +``` |
| 176 | +
|
| 177 | +**Arguments:** |
| 178 | +
|
| 179 | +<ParamField path="arg-name" type="string" required> |
| 180 | + [From the typer.Argument help text, expanded.] |
| 181 | +</ParamField> |
| 182 | +
|
| 183 | +**Options:** |
| 184 | +
|
| 185 | +<ParamField path="--flag / -f" type="string"> |
| 186 | + [From the typer.Option help text, expanded.] |
| 187 | +</ParamField> |
| 188 | +
|
| 189 | +[Behavior worth stating: what prompts, what is required in CI, what the command |
| 190 | +refuses to do.] |
| 191 | +```` |
| 192 | + |
| 193 | +### Registration |
| 194 | + |
| 195 | +Add the path, without `.mdx`, to `DOCS_PATH/docs.json` under the CLI tab's |
| 196 | +`cloud` group. There is no support-matrix page to update — unlike pipecat, this |
| 197 | +is the only registration step. |
| 198 | + |
| 199 | +The group's pages are ordered roughly by workflow rather than alphabetically |
| 200 | +(`output` first as the cross-cutting one, then auth, build, deploy, and so on). |
| 201 | +Place a new page where a reader would look for it. |
0 commit comments