Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uptriever

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uptriever

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Build

Uptriever

Uptriever is a CLI to upload documentation source file (HTML, Markdown) to Trieve for search indexing.

Installation

Install Uptreiver as a Ruby gem (Ruby 3.1+ is required):

gem install uptriever

Usage

Currently, Uptriever requires an index configuration file (.trieve.yml) to be present in the documentation root folder containing the list of files to index and their metadata. A minimal example of indexing everything looks as follows:

hostname: https://myproject.example/docs
pages:
  - "**/*.md"

The hostname field is used to generate the link property for chunks (see Trieve API).

The pages field contains the list of pages to index. It supports glob patterns.

With config in place, you can run the uptriever executable to perform the indexing:

$ uptriever -d ./docs --api-key=<Trieve API key> --dataset=<Trieve dataset>

Groups: |===========================|
Chunks: |===========================|

Why do we need a configuration file? To leverage Trieve features such as groups, tags, and weights. Here is a real-life example:

# Ignore patterns for globs in pages
ignore:
 - "**/*/Readme.md"
hostname: https://docs.anycable.io
# Prepend file paths with this prefix.
# Useful when you store documentation in multiple sources.
url_prefix: anycable-go/

# Make sure the following chunk groups are created
groups:
  - name: PRO version
    tracking_id: pro
  - name: Server
    tracking_id: server
  - name: Client
    tracking_id: client
  - name: Go package
    tracking_id: package

# Default metadata for pages (can be overriden)
defaults:
  groups: ["server"]
  tags: ["docs"]

pages:
  # You can use a dictionary to define source paths
  # along with metadata
  - source: "./apollo.md"
    groups: ["pro", "server"]
  - source: "./binary_formats.md"
    groups: ["pro", "server", "client"]
  - "./broadcasting.md"
  - "./broker.md"
  - "./health_checking.md"
  - "./instrumentation.md"
  - source: "./library.md"
    groups: ["package"]
  - "./pubsub.md"
  - source: "./js/**/*.md"
    groups: ["client"]

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/palkan/uptriever.

Credits

This gem is generated via newgem template by @palkan.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 03 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc