|
| 1 | +# integrations |
| 2 | + |
| 3 | +CLI for [integrations.sh](https://integrations.sh). |
| 4 | + |
| 5 | +```sh |
| 6 | +npx integrations search stripe |
| 7 | +``` |
| 8 | + |
| 9 | +Install globally with `npm i -g integrations`; the command is `integrations`. |
| 10 | + |
| 11 | +## Quickstart |
| 12 | + |
| 13 | +```sh |
| 14 | +integrations search stripe |
| 15 | +integrations stripe.com |
| 16 | +integrations detect resend.com |
| 17 | +integrations help surface |
| 18 | +``` |
| 19 | + |
| 20 | +`search` accepts a service name. A bare domain such as `stripe.com` is treated |
| 21 | +as a surface lookup. |
| 22 | + |
| 23 | +## Agent Output |
| 24 | + |
| 25 | +For API-backed commands, stdout is human-readable only when attached to a TTY. |
| 26 | +When stdout is piped or `--json` is passed, stdout is exactly one JSON document. |
| 27 | +Diagnostics go to stderr. Errors in JSON mode print this shape to stdout and |
| 28 | +exit non-zero: |
| 29 | + |
| 30 | +```json |
| 31 | +{"error":"unknown flag --example"} |
| 32 | +``` |
| 33 | + |
| 34 | +Examples: |
| 35 | + |
| 36 | +```sh |
| 37 | +integrations search stripe | jq . |
| 38 | +integrations stripe.com --json |
| 39 | +``` |
| 40 | + |
| 41 | +`integrations skill` is the exception: it prints markdown by default so it can |
| 42 | +be redirected into an agent skill file. Use `integrations skill --json` for the |
| 43 | +structured form. |
| 44 | + |
| 45 | +## Skill |
| 46 | + |
| 47 | +Print the bundled integrations.sh agent skill: |
| 48 | + |
| 49 | +```sh |
| 50 | +integrations skill |
| 51 | +integrations skill --json |
| 52 | +``` |
| 53 | + |
| 54 | +Install it for Claude-style skill loaders: |
| 55 | + |
| 56 | +```sh |
| 57 | +mkdir -p ~/.claude/skills/integrations-sh |
| 58 | +integrations skill > ~/.claude/skills/integrations-sh/SKILL.md |
| 59 | +``` |
| 60 | + |
| 61 | +## MCP |
| 62 | + |
| 63 | +Print connection details for the hosted public MCP server: |
| 64 | + |
| 65 | +```sh |
| 66 | +integrations mcp |
| 67 | +integrations mcp --json |
| 68 | +``` |
| 69 | + |
| 70 | +Claude Code: |
| 71 | + |
| 72 | +```sh |
| 73 | +claude mcp add --transport http integrations https://integrations.sh/mcp |
| 74 | +``` |
| 75 | + |
| 76 | +The JSON form is: |
| 77 | + |
| 78 | +```json |
| 79 | +{"url":"https://integrations.sh/mcp","transport":"streamable-http","tools":["detect","discover"]} |
| 80 | +``` |
| 81 | + |
| 82 | +## Commands |
| 83 | + |
| 84 | +The API command surface is derived from `https://integrations.sh/openapi.json` |
| 85 | +at runtime. Operation IDs become kebab-case commands, path parameters become |
| 86 | +positional arguments, query parameters become flags, and enum/boolean parameters |
| 87 | +are validated locally. |
| 88 | + |
| 89 | +```sh |
| 90 | +integrations help |
| 91 | +integrations help search |
| 92 | +integrations help discover |
| 93 | +``` |
| 94 | + |
| 95 | +Current public operations include `search`, `detect`, `discover`, and `surface`. |
| 96 | +As the OpenAPI spec adds operations, the CLI picks them up without a release. |
| 97 | + |
| 98 | +`discover` can take up to a minute and is rate-limited by the hosted API to 3 |
| 99 | +requests per 60 seconds per IP. |
| 100 | + |
| 101 | +## Base URL and Cache |
| 102 | + |
| 103 | +Set `INTEGRATIONS_BASE` to target another compatible host: |
| 104 | + |
| 105 | +```sh |
| 106 | +INTEGRATIONS_BASE=http://localhost:4321 integrations help |
| 107 | +``` |
| 108 | + |
| 109 | +The OpenAPI spec is cached in the system temp directory using the server TTL and |
| 110 | +ETag. Use `--no-cache` to bypass the cache for one invocation: |
| 111 | + |
| 112 | +```sh |
| 113 | +integrations search stripe --no-cache |
| 114 | +``` |
| 115 | + |
| 116 | +## Build |
| 117 | + |
| 118 | +```sh |
| 119 | +bun run typecheck |
| 120 | +bun run build |
| 121 | +bun test |
| 122 | +``` |
| 123 | + |
| 124 | +## Credits |
| 125 | + |
| 126 | +Thanks to [Zachary Kirby](https://www.zkirby.com/) for the `integrations` |
| 127 | +package name on npm. |
0 commit comments