Skip to content

truto integrations build reads an API's docs and writes an integration file you can review.

Nothing reaches Truto until you run truto integrations apply.

How a build works
flowchart LR
    docs["API docs or spec"] --> build["build"]
    build --> asked{"Questions?"}
    asked -->|"yes"| answer["build --continue"]
    answer --> review["Review the file"]
    asked -->|"no"| review
    review --> apply["apply"]

Quick start

# 1. Build from the API's docs or OpenAPI spec
truto integrations build https://docs.example.com/openapi.json
 
# 2. Answer anything the build asked (it prints this command for you)
truto integrations build --continue acme.integration.json --answer q1="…"
 
# 3. Push it to Truto
truto integrations apply acme.integration.json
Tip

Updating an integration that already exists? Put its slug after the docs URL: truto integrations build https://docs.example.com/openapi.json acme

Before you start

You need:

  • An LLM key
    • Anthropic (the default): ANTHROPIC_API_KEY
    • Fireworks, only with --llm-provider fireworks: FIREWORKS_API_KEY
  • A Firecrawl key (FIRECRAWL_API_KEY), only for docs sites that need crawling
  • A Truto login, only to update an existing integration

No key set? In a terminal the CLI asks for it and offers to save it to your profile. You can also save one ahead of time with truto profiles set-key anthropic (or fireworks, firecrawl).

How a build works

  1. Reads your sources. OpenAPI, Postman, GraphQL, llms-full.txt, or a crawl of the docs site.
    • Pass several URLs, in any order. The CLI uses the best one first.
  2. Builds the file. An AI agent writes the config and checks each change as it goes.
  3. Lets you fix things. It opens the file in your editor, then takes plain-English fixes such as "website_id should be a credential".
    • Press Enter on an empty line when you're done.
    • Skip the editor with --no-editor.
  4. Writes the docs. Every method gets its own documentation rows.
  5. Saves the result:
    • acme.integration.json: the integration
    • acme.integration.report.md: a report you can read (plus .report.json for tools)
    • acme.integration.json.committed: the copy apply compares against
Warning

A docs URL with a username, a password or a query string in it is refused. Download the page and pass the local file instead.

When the build asks a question

The build stops and asks instead of guessing. The method waits, the question is saved, and the rest of the build carries on.

It asks when, for example:

  • a value such as {{subdomain}} is used, but nothing fills it
  • a list endpoint doesn't show where its rows are
  • a method has no documentation
  • users type in an API key, but nothing checks the key when they connect

Answer it

  • In a terminal: the build asks at the end. Press Enter to skip a question.
  • From a script or an agent: answer later.
truto integrations build --continue acme.integration.json --answer q1="…"
truto integrations build --continue acme.integration.json --answers answers.json

--continue rebuilds only the methods that were waiting. Everything else stays exactly as it was.

Edited the file by hand? Run truto integrations build --recheck acme.integration.json before --continue.

Danger

Never paste a key, token or password as an answer. Answers are saved. Say where the value comes from instead, for example <value from the previous response>. An answer that looks like a secret is refused.

Results and exit codes

Every build ends with a summary: the status, the counts, any open questions, and the next command to run.

Exit Meaning
0 Done. There may be small gaps, such as a missing doc row.
3 Done, but some methods are waiting for an answer or are blocked.
1 Failed.
  • --fail-on sets what counts as a failure: blocking (default), errors, incomplete or none.
  • In CI, exit 3 means waiting, not broken. If your runner fails on any non-zero exit, pass --fail-on none.
  • Scripts and agents should pass -o json: one JSON summary and no prompts.
Info

Changed in 1.0.39: a build that leaves methods blocked now exits 3. Earlier versions exited 0.

The report

acme.integration.report.md shows, for each method:

  • where its docs came from
  • what the agent assumed
  • which checks ran
  • a confidence of low, medium or high

Start with the low ones. Confidence never blocks anything.

Run without prompts

Flag What it does
--instructions "…" Gives the build instructions without asking
--refine "…" One fix to make after the build. Repeatable
--refinements-file <path> Fixes from a file, one per line
--auto-accept-patches Accepts every fix the agent proposes
--no-editor Doesn't open the editor
truto integrations build https://docs.example.com/openapi.json acme \
  --instructions "Contacts, companies and deals only" \
  --refine "website_id should be a credential, not a query param" \
  --auto-accept-patches --no-editor -o json

Update an existing integration

  • Rebuild on top of what's live: pass the slug after the docs URL.
  • Only add what's missing: --only-missing adds the methods that are in the docs but not live.
    • Existing methods, auth and pagination stay as they are.
  • Only refresh the docs: --docs-only <file-or-slug> regenerates documentation rows.
    • It writes <slug>.docs.integration.json. Push that file with truto integrations apply <file> --docs-only.

LLM providers

Anthropic (default) Fireworks
Choose with --llm-provider anthropic --llm-provider fireworks
Models claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 glm-5p3-flash (default) or minimax-m3; deepseek-v4p1-flash for classification
Keys ANTHROPIC_API_KEY FIREWORKS_API_KEY, plus FIRECRAWL_API_KEY for web search
Change the model --anthropic-model --llm-model
  • In a terminal, the CLI asks which provider to use. In CI it uses Anthropic.
  • Don't mix them. --anthropic-model with Fireworks, or --llm-model with Anthropic, is an error.

Useful flags

Flag What it does
--out <file> Where to save the file (default <slug>.integration.json)
--recheck <file> Re-runs the checks after you edit the file. No AI, no network
--source-tier <tier> Forces how the docs are read, for example openapi-only
--max-pages <n> The most docs pages to read (default 200)
--no-firecrawl Skips Firecrawl and uses cheaper extraction only
--embedding-provider fireworks Uses Fireworks embeddings instead of the local model
--no-embeddings Keyword search only
--debug-log <path> Where to save the build's full log (on by default, in ~/.truto/logs/)

See every flag: truto integrations build --help

Older flags such as --yes, --dry-run and --strict are gone. They exit with code 2 and name the command to use instead.

Next