Skip to content

CLI Usage

The fyrn CLI (@fyrn/cli) is the primary tool for creating, testing, deploying, and managing integration flows from your terminal. When invoked with no arguments, it launches an interactive AI-powered assistant.

Terminal window
# Install
npm install -g @fyrn/cli
# Log in (opens browser for Auth0 PKCE)
fyrn login
# Check auth status
fyrn auth status
# Log out
fyrn logout

For CI/CD environments:

Terminal window
fyrn auth api-key --api-key sk-your-key --api-url https://api.fyrn.dev
FilePurpose
~/.fyrn/credentials.jsonAuth tokens from fyrn login
~/.fyrn/config.jsonAPI key and URL from fyrn auth api-key
~/.fyrn/historyInteractive mode history (max 500 lines)
fyrn.config.jsonPer-project config (API URL, account ID)
fyrn.config.local.jsonLocal overrides (gitignored)

Log in via Auth0 (opens browser).

Terminal window
fyrn auth login

Stores access token and refresh token to ~/.fyrn/credentials.json. Verifies by calling /api/v1/auth/me.

Clear stored credentials.

Terminal window
fyrn auth logout

Show current authentication status — method, token validity, expiration, source.

Terminal window
fyrn auth status

Authenticate with an API key for CI/CD environments.

FlagDescription
--api-key <key>API key (or enter interactively if omitted)
--api-url <url>Control plane URL
Terminal window
fyrn auth api-key --api-key sk-abc123 --api-url https://api.fyrn.dev
fyrn auth api-key # interactive prompt

Project — fyrn init, fyrn pull, fyrn push, fyrn diff

Section titled “Project — fyrn init, fyrn pull, fyrn push, fyrn diff”

Initialize a fyrn project in the current directory.

Terminal window
fyrn init

Creates fyrn.config.json, flows/ directory, and adds fyrn.config.local.json to .gitignore.

Pull flow configs from the server to local YAML files.

ArgumentDescription
[flow-name]Optional — pulls all flows if omitted
FlagDescription
--forceOverwrite local changes without warning
Terminal window
fyrn pull # pull all flows
fyrn pull my-flow # pull one flow
fyrn pull --force # overwrite local

Push local YAML files to the server as drafts.

ArgumentDescription
[flow-name]Optional — pushes all flows if omitted
Terminal window
fyrn push # push all flows
fyrn push my-flow # push one flow

Compare local YAML files against deployed versions. Shows colored unified diff.

ArgumentDescription
[flow-name]Optional — diffs all flows if omitted
Terminal window
fyrn diff # diff all flows
fyrn diff my-flow # diff one flow

All flow subcommands accept --env <environment> to target a specific environment (defaults to current).

List all flows with name, status, version, and description.

Terminal window
fyrn flow list
fyrn flow list --env staging

Show details of a flow — ID, status, version, description, timestamps, webhook URL, and YAML config.

Terminal window
fyrn flow show abc123

Create a flow from a natural language description. AI generates the YAML, you review and confirm.

FlagDescriptionDefault
--error-handling <level>conservative, standard, or aggressivestandard
Terminal window
fyrn flow create "Sync Shopify orders to NetSuite"
fyrn flow create "Forward webhook events to Slack" --error-handling conservative

Deploy a flow. Validates, compiles, and activates it. Outputs the flow ID, version, and webhook URL (if applicable).

Terminal window
fyrn flow deploy abc123

Test a flow locally with sample data. Parses the YAML, compiles the flow, and applies the mapping to the sample data.

FlagDescriptionRequired
--sample-data <file>Path to sample JSON data fileYes
Terminal window
fyrn flow test flows/my-flow.yaml --sample-data sample.json

Clone an existing flow to another environment.

FlagDescriptionRequired
--to <env>Target environmentYes
--env <environment>Source environmentNo
Terminal window
fyrn flow clone abc123 --to staging
fyrn flow clone abc123 --to production --env development

Compare two flows side-by-side. Shows a colored unified diff of their YAML configs.

Terminal window
fyrn flow diff abc123 def456
fyrn flow diff abc123 def456 --env production

Soft-delete a flow. The flow is marked as deleted and can be restored by support if needed.

Terminal window
fyrn flow delete abc123
fyrn flow delete abc123 --env staging

List all connectors with name, type, status, and flow count.

Terminal window
fyrn connector list

Browse the connector catalog with name, type, auth method, and description.

Terminal window
fyrn connector catalog

List all connector instances with name, status, config summary, and last tested time.

Terminal window
fyrn connector instances

Test a connector instance connection.

Terminal window
fyrn connector test abc123

Build a private connector from API documentation using AI. Point it at an API docs URL or describe the API in plain text.

FlagDescription
--name <name>Connector name
--spec <path>Path to an OpenAPI/Swagger spec file
Terminal window
fyrn connector build "https://docs.acme.com/api"
fyrn connector build "Acme CRM REST API with OAuth2" --name acme-crm
fyrn connector build --spec ./openapi.yaml --name acme-crm

Start OAuth authorization for a connector instance. Opens a browser to complete the OAuth flow.

Terminal window
fyrn connector connect shopify-main

Show OAuth connection status for a connector instance — token validity, expiration, and scopes.

Terminal window
fyrn connector status shopify-main

Stream live message logs via SSE. Press Ctrl+C to stop.

FlagDescription
--status <status>Filter by delivery status
Terminal window
fyrn logs tail abc123
fyrn logs tail abc123 --status failed

Search message logs.

FlagDescriptionDefault
--status <status>Filter by delivery status
--since <duration>Messages since (e.g., 1h, 30m, 7d)
--search <text>Search in payload content
--limit <n>Max results20

Duration strings: s (seconds), m (minutes), h (hours), d (days). Non-matching values are treated as ISO date-time strings.

Terminal window
fyrn logs search abc123
fyrn logs search abc123 --status failed --since 1h
fyrn logs search abc123 --search "order_id" --limit 50

Replay a message through the full pipeline.

Terminal window
fyrn logs replay msg-abc123

List all schedules with flow, cron expression, timezone, enabled state, next run, and last status.

Terminal window
fyrn schedules list

Manually trigger a scheduled flow. Accepts flow name (case-insensitive) or flow ID.

Terminal window
fyrn schedules trigger my-flow
fyrn schedules trigger abc123

Custom code adapters run JavaScript in sandboxed V8 isolates for non-standard data transformations.

List all adapters with name, type, AI-generated flag, last test, and created date.

Terminal window
fyrn adapters list

Generate an adapter with AI from a natural language description.

FlagDescriptionDefault
--type <type>request_transform, response_transform, auth, enrichment, fullrequest_transform
--sample <json>Sample input JSON
Terminal window
fyrn adapters generate "Convert XML order to JSON format"
fyrn adapters generate "Add HMAC signature header" --type auth
fyrn adapters generate "Flatten nested address fields" --sample '{"address":{"street":"123 Main"}}'

Test an adapter with sample input.

FlagDescriptionRequired
--input <json>JSON input payloadYes
Terminal window
fyrn adapters test abc123 --input '{"order_id": "12345"}'

List available pre-built adapter templates.

Terminal window
fyrn adapters templates

List all lookup tables with name, description, version, and created date.

Terminal window
fyrn lookup list

Show a lookup table and its entries.

FlagDescriptionDefault
-s, --search <query>Search entries by key or value
-l, --limit <n>Max entries to display20
Terminal window
fyrn lookup show abc123
fyrn lookup show abc123 --search "US" --limit 50

Create a new lookup table.

FlagDescription
-d, --description <text>Table description
Terminal window
fyrn lookup create country-codes
fyrn lookup create country-codes --description "ISO country code mappings"

Delete a lookup table.

Terminal window
fyrn lookup delete abc123

Add or update an entry in a lookup table.

Terminal window
fyrn lookup set abc123 US "United States"

Delete an entry from a lookup table.

Terminal window
fyrn lookup remove abc123 US

Import entries from a CSV file. Requires key and value columns.

Terminal window
fyrn lookup import abc123 country-codes.csv

Export a lookup table as CSV to stdout.

Terminal window
fyrn lookup export abc123
fyrn lookup export abc123 > countries.csv

Export and import flow bundles as ZIP files for backup or cross-environment migration.

Export a flow as a ZIP bundle.

FlagDescription
-o, --output <file>Output file path (default: <flow-name>.zip)
Terminal window
fyrn bundle export my-flow
fyrn bundle export my-flow --output /tmp/my-flow-bundle.zip

Import a flow from a ZIP bundle. Displays imported flow, lookup tables, and warnings.

Terminal window
fyrn bundle import my-flow.zip

Manage self-healing events. When fyrn detects an API schema change, it auto-generates a fix and creates a healing event for review.

List healing events.

FlagDescription
--status <status>Filter by status (pending, approved, rejected)
--flow <flow-id>Filter by flow
Terminal window
fyrn healing list
fyrn healing list --status pending
fyrn healing list --flow abc123

Show full details of a healing event — the detected change, proposed fix, and diff.

Terminal window
fyrn healing show heal-abc123

Approve a healing event and apply the proposed fix.

Terminal window
fyrn healing approve heal-abc123

Reject a healing event. The flow remains unchanged.

Terminal window
fyrn healing reject heal-abc123

Manage governance policies. Alias: fyrn gov.

List all governance policies.

Terminal window
fyrn governance list
fyrn gov list

Show details of a governance policy.

Terminal window
fyrn governance show policy-abc123

Run governance checks against a flow, or all flows.

FlagDescription
--allCheck all flows
Terminal window
fyrn governance check abc123
fyrn gov check --all

Manage AI agent API keys and monitor agent activity.

List all agent API keys.

Terminal window
fyrn agents keys list

Create a new agent API key.

FlagDescription
--name <name>Key name
--tier <tier>Access tier
--rate-limit <n>Requests per minute
--daily-quota <n>Daily request quota
--sandboxRestrict to sandbox environment
--approvalRequire approval for destructive actions
Terminal window
fyrn agents keys create --name "CI bot" --tier standard --rate-limit 60
fyrn agents keys create --name "Dev agent" --sandbox --approval --daily-quota 1000

Update an existing agent API key.

FlagDescription
--name <name>Update key name
--tier <tier>Update access tier
--approvalToggle approval requirement
Terminal window
fyrn agents keys update ak-abc123 --tier premium
fyrn agents keys update ak-abc123 --name "Production bot" --approval

Revoke an agent API key. This is immediate and irreversible.

Terminal window
fyrn agents keys revoke ak-abc123

View recent agent activity.

FlagDescription
--key <key-id>Filter by key
--tool <tool>Filter by tool used
--status <status>Filter by status
--limit <n>Max results
Terminal window
fyrn agents activity
fyrn agents activity --key ak-abc123 --limit 50
fyrn agents activity --tool flow.create --status failed

Manage APIs published through fyrn.

List all published APIs.

Terminal window
fyrn apis list

Open interactive API documentation for a published API.

Terminal window
fyrn apis docs orders-api

Output the OpenAPI spec for a published API.

FlagDescriptionDefault
-f, --format <format>Output format (json or yaml)yaml
-o, --output <file>Write to file instead of stdout
Terminal window
fyrn apis spec orders-api
fyrn apis spec orders-api -f json -o openapi.json

Manage environments.

List all environments.

Terminal window
fyrn env list

Switch the active environment.

Terminal window
fyrn env switch staging
fyrn env switch prod

Show the current active environment.

Terminal window
fyrn env current

Create a new environment.

FlagDescription
--color <hex>Environment color for the dashboard
Terminal window
fyrn env create staging
fyrn env create qa --color "#f59e0b"

Manage accounts (for users with access to multiple accounts).

List all accounts you have access to.

Terminal window
fyrn accounts list

Switch the active account.

Terminal window
fyrn accounts switch acme-corp
fyrn accounts switch acc-abc123

Show the current active account.

Terminal window
fyrn accounts current

Manage billing and subscription.

Show current billing status — plan, usage, and renewal date.

Terminal window
fyrn billing status

Upgrade to a new plan.

FlagDescription
--annualSwitch to annual billing
Terminal window
fyrn billing upgrade pro
fyrn billing upgrade enterprise --annual

Open the billing portal in your browser to manage payment methods and invoices.

Terminal window
fyrn billing portal

Show current usage vs plan limits — flows, messages, connectors, and API calls.

Terminal window
fyrn usage

Show current plan details — name, limits, features, and renewal date.

Terminal window
fyrn plan

Run fyrn with no arguments to launch an AI-powered conversational assistant (powered by Claude). The assistant can list flows, create flows, deploy, manage connectors, search message logs, and more — all through natural language.

Terminal window
fyrn

History is stored at ~/.fyrn/history (max 500 lines).


Terminal window
fyrn flow create "Sync orders from Shopify to my ERP system"
# Review the generated YAML, confirm
fyrn flow deploy <flow-id>
Terminal window
fyrn pull my-flow
# Edit flows/my-flow.yaml in your editor
fyrn diff my-flow # review changes
fyrn push my-flow # upload as draft
fyrn flow deploy <flow-id> # activate
Terminal window
fyrn flow test flows/my-flow.yaml --sample-data test-data.json
Terminal window
fyrn flow list # see all flows and status
fyrn flow show <flow-id> # flow details
fyrn logs tail <flow-id> # live log stream
fyrn logs search <flow-id> --status failed # find failures
fyrn logs replay <message-id> # replay a failed message
Terminal window
fyrn lookup create country-warehouses --description "Maps countries to warehouse IDs"
fyrn lookup set <id> US warehouse-east-01
fyrn lookup set <id> FI warehouse-eu-01
fyrn lookup import <id> countries.csv
fyrn lookup export <id> > backup.csv