Skip to content
Svanja

Docs Command reference

Tool and template commands

Run and check saved tools, and render PDFs from document templates.

A tool is a saved script the assistant can run again whenever the same job comes up. A template turns your details into a branded PDF. You can find both under Skills, on the Tools and Templates tabs. These commands let you run a tool with new inputs or render a document from a script. To read them, your key needs access to the Tools and Templates areas, which Full access and Read-only keys include. To run tools or render templates, you need Full access or those areas set to Read and write. For more background, see Skills, tools and templates.

Use svanja tool run to execute a tool and svanja tool verify to run its check. Both commands start a task and print its details, so you can track the result with svanja task.

svanja template render generates a PDF. Pass in your own operation_id along with the template fields under data. Because rendering usually happens in the background, run the same command again with the same operation_id to check its status. Once it finishes, the response includes the completed document.

svanja template render TEMPLATE_ID --body '{"operation_id":"offer-2026-11","data":{"client":"Example Ltd"}}'

You can also use svanja template add-to-space to copy a starter template into a Space, or svanja template import-word to turn Word or OpenDocument files in a Space into templates.

svanja template add-to-space

Add a starter template to a Space.

svanja template add-to-space [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja template add-to-space --field space_id=<space-id> --field starter_key=<starter-key>
Details

This command calls POST /templates on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja template import-word

Import Word or OpenDocument templates from Space files.

svanja template import-word [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja template import-word --body '{"space_id":"<space-id>","paths":["templates/offer.docx"]}'
Details

This command calls POST /templates on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja template list

List templates.

svanja template list [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja template list --json
svanja template list --plain
svanja template list --jq .
svanja template list --template '{{.}}'
svanja template list --json --include-meta
Details

This command calls GET /templates on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja template render

Render a template.

svanja template render <template-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja template render <template-id> --body '{"operation_id":"offer-halden-2026-11","data":{"client":"Halden Logistics"}}'
Details

This command calls POST /templates/{template}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja template show

Show a template.

svanja template show <template-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja template show <template-id> --json
svanja template show <template-id> --plain
svanja template show <template-id> --jq .
svanja template show <template-id> --template '{{.}}'
svanja template show <template-id> --json --include-meta
Details

This command calls GET /templates/{template} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja template

Manage templates and renders.

svanja template [flags]

Works without a key.

svanja template --help
Details

Use this family to call native Svanja public API operations with the active team API key. The server owns validation, access checks, authorization, receipts and domain-specific behavior; the CLI supplies product identity, explicit arguments, stable output modes and safe local request handling.

svanja tool list

List retained tool packages.

svanja tool list [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja tool list --json
svanja tool list --plain
svanja tool list --jq .
svanja tool list --template '{{.}}'
svanja tool list --json --include-meta
Details

This command calls GET /tools on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool run

Run a retained tool package.

svanja tool run <tool-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja tool run <tool-id> --body '{"inputs":{"month":"2026-11"}}'
Details

This command calls POST /tools/{tool}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool save

Save a retained tool package.

svanja tool save [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls POST /tools on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool show

Show a retained tool package.

svanja tool show <tool-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--query query parameter as key=value (repeatable)
svanja tool show <tool-id> --json
svanja tool show <tool-id> --plain
svanja tool show <tool-id> --jq .
svanja tool show <tool-id> --template '{{.}}'
svanja tool show <tool-id> --json --include-meta
Details

This command calls GET /tools/{tool} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool update

Update a retained tool package.

svanja tool update <tool-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
Details

This command calls PATCH /tools/{tool} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool verify

Verify a retained tool package.

svanja tool verify <tool-id> [flags]

Needs a stored key (svanja login) or SVANJA_API_KEY.

Flag What it does
--body JSON request body (mutually exclusive with --field and --body-file)
--body-file read the JSON request body from a file, or - for stdin
--dry-run preview the request without resolving credentials or contacting the API
--field body field as key=value (repeatable; mutually exclusive with --body and --body-file)
--idempotency-key explicit idempotency key (1-255 visible ASCII bytes); generated when omitted
--query query parameter as key=value (repeatable)
svanja tool verify <tool-id>
Details

This command calls POST /tools/{tool}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

svanja tool

Manage retained tool packages.

svanja tool [flags]

Works without a key.

svanja tool --help
Details

Use this family to call native Svanja public API operations with the active team API key. The server owns validation, access checks, authorization, receipts and domain-specific behavior; the CLI supplies product identity, explicit arguments, stable output modes and safe local request handling.

This page as plain Markdown, for AI tools: tools-and-templates.md

Try Svanja with your own mailbox

Sign up now, and you get an email when your account is ready.