New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

trieve-fern-adapter

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trieve-fern-adapter

Trieve adapter for Fern

  • 0.0.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
240
increased by11900%
Maintainers
0
Weekly downloads
 
Created

Trieve Fern adapter

The easiest way to use Trieve in combination with Fern.

Collect all the data

Trieve

You need to retrieve your Org ID and a new API Key:

  1. Go to the Trieve dashboard.
  2. Copy the Org ID, you will need it later.
  3. Press on the API Keys tab.
  4. Press Create New Key and select OWNER for the permission.
  5. Copy the API Key, you will need it later.

Documents

You need:

  • the path to your <docs.yml>, e.g. ./fern/docs.yml.
  • (optional): the url to your <openapi.json>, e.g. https://api.vapi.ai/api-json.
  • (optional): the <root url> to your docs, e.g. https://docs.vapi.ai.
  • (optional): the <api-reference-path>, e.g. api-reference.

Local Setup

Installation

npm install -g trieve-fern-adapter

Environment

You need these environment variables set:

TRIEVE_API_HOST=https://api.trieve.ai
TRIEVE_API_KEY=
TRIEVE_ORGANIZATION_ID=
TRIEVE_DATASET_TRACKING_ID=

The TRIEVE_DATASET_TRACKING_ID must be an unique identifier for the dataset, e.g. vapi.

Execution

trieve-fern-adapter --file <docs.yml> -s <openapi.json> -r <root-url> -a <api-reference-page>

CI Setup (GitHub)

Environment

Set these repository secrets:

TRIEVE_API_HOST=https://api.trieve.ai
TRIEVE_API_KEY=
TRIEVE_ORGANIZATION_ID=
TRIEVE_DATASET_TRACKING_ID=

Workflow

Add this workflow to .github/workflows.

name: Update Trieve

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref }}
  cancel-in-progress: true

on:
  push:
    branches:
      - main

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Trieve Fern Adapter
        run: npm install -g trieve-fern-adapter

      - name: Update Trieve Chunks 
        env:
          TRIEVE_API_HOST: ${{ secrets.TRIEVE_API_HOST }}
          TRIEVE_API_KEY: ${{ secrets.TRIEVE_API_KEY }}
          TRIEVE_ORGANIZATION_ID: ${{ secrets.TRIEVE_ORGANIZATION_ID }}
          TRIEVE_DATASET_TRACKING_ID: ${{ secrets.TRIEVE_DATASET_TRACKING_ID }}
        run: trieve-fern-adapter --file <docs.yml> -s <openapi.json> -r <root-url> -a <api-reference-page>

Replace <docs.yml>, <openapi.json>, <root-url>, and <api-reference-page>.

License

MIT

FAQs

Package last updated on 06 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts