Skip to content

Installation

Choose your installation path based on how you want to use the cyber.trackr.live API:

🎯 For API Consumers (Ruby Client)

Prerequisites

  • Ruby 3.2+ (check our .ruby-version)
  • No additional dependencies (pure Ruby using Faraday/Net::HTTP)

Install the Gem

Option 1: Direct installation

bash
gem install cyber_trackr_live

Option 2: Add to Gemfile

ruby
gem 'cyber_trackr_live'

Then run:

bash
bundle install

Verify Installation

ruby
require 'cyber_trackr_live'
helper = CyberTrackrHelper.new
puts "✅ Installation successful!"

Ready to start? See the Ruby Client guide for complete examples and workflows, or head to Quick Start to make your first API calls!

🔧 For Developers (Project Contributors)

Prerequisites

  • Ruby 3.2+
  • Node.js 22+ (for documentation and OpenAPI validation)
  • Git

Clone and Setup

bash
# Clone the repository
git clone https://github.com/mitre/cyber-trackr-live.git
cd cyber-trackr-live

# Install Ruby dependencies
bundle install

# Install Node.js dependencies (for docs)
npm install

# Verify setup
bundle exec rake test
npm run docs:validate

Development Workflow

Development Commands

bash
# OpenAPI validation
npm run docs:validate              # Spectral OpenAPI linting
npm run docs:validate-mermaid      # Mermaid diagram validation
npm run docs:validate-all          # Both validations

# Ruby testing  
bundle exec rake test              # Core gem tests
bundle exec rake test:live         # Live API integration tests

# Documentation
npm run docs:dev                   # Start VitePress dev server
npm run docs:build                 # Build static documentation

# Client generation
./scripts/generate_client.sh       # Regenerate Ruby client from OpenAPI

Next: See the Testing Guide to understand our two-tier testing approach.

📚 Documentation Only

No installation required! Use our interactive documentation:

Generate Your Own Client

Use our OpenAPI specification to generate clients in any language:

bash
# TypeScript/JavaScript
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
  -i https://raw.githubusercontent.com/mitre/cyber-trackr-live/main/openapi/openapi.yaml \
  -g typescript-fetch \
  -o ./cyber-trackr-client

# Python
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
  -i https://raw.githubusercontent.com/mitre/cyber-trackr-live/main/openapi/openapi.yaml \
  -g python \
  -o ./cyber-trackr-client

# Go  
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
  -i https://raw.githubusercontent.com/mitre/cyber-trackr-live/main/openapi/openapi.yaml \
  -g go \
  -o ./cyber-trackr-client

Platform Support

✅ Fully Supported Platforms

PlatformRuby VersionsCI/CD Status
Ubuntu Linux3.2, 3.3, 3.4✅ All tests pass
Windows3.2, 3.3, 3.4✅ All tests pass
macOS3.2, 3.3, 3.4✅ All tests pass

Why Cross-Platform Works

Our Faraday migration eliminated Windows compatibility issues by using pure Ruby dependencies instead of native libraries.

Troubleshooting

Ruby Version Issues

bash
# Check your Ruby version
ruby --version

# Install Ruby 3.2+ using rbenv (recommended)
rbenv install 3.2.8
rbenv global 3.2.8

# Or using RVM
rvm install 3.2.8
rvm use 3.2.8 --default

Bundle Install Failures

bash
# Clear bundle cache and retry
bundle clean --force
bundle install

# Check for platform-specific issues
bundle lock --add-platform ruby
bundle lock --add-platform x86_64-linux
bundle lock --add-platform x64-mingw32
bundle lock --add-platform arm64-darwin

API Connection Issues

ruby
# Test API connectivity
require 'net/http'
require 'json'

uri = URI('https://cyber.trackr.live/api/stig')
response = Net::HTTP.get_response(uri)

if response.code == '200'
  puts "✅ API is accessible"
  data = JSON.parse(response.body)
  puts "📋 Found #{data.size} documents"
else
  puts "❌ API connection failed: #{response.code}"
end

Next Steps

Released under the Apache-2.0 License.