Skip to main content

ValkyrAI Utilities

ValkyrAI includes several utility tools that enhance the development, deployment, and management of your applications. These utilities provide convenient functionality for tasks such as encryption, command-line operations, and more.

Overview

The ValkyrAI utilities are designed to streamline common tasks and provide additional functionality beyond the core features of the platform. These utilities include:

  • VIDAR: A data encryption utility for securing file system data
  • vai: A command-line runner for ValkyrAI operations
  • list-to-file: A utility for converting lists to files

VIDAR

Vidar — named after a Norse god of locking things up and guarding them tight — is a data encryption utility used to zip up and encrypt file system data and create a self-extracting encrypted jar file.

Purpose

VIDAR is designed to securely package and encrypt entire projects or sensitive data files. For example, it can be used to zip and encrypt an entire generated ValkyrAI project prior to generation of the final service for compression purposes.

Usage

To use VIDAR, run the vidar command:

./vidar

You will be prompted to enter a password for encryption:

Enter a password for encryption:
Zipping the payload directory...

The utility will then compress and encrypt the specified directory, creating a self-extracting encrypted jar file.

Features

  • Strong Encryption: Uses industry-standard encryption algorithms to protect your data
  • Self-Extracting: Creates jar files that can be easily extracted with the correct password
  • Compression: Reduces file size while maintaining data integrity
  • Cross-Platform: Works on any system that supports Java

vai Command

The vai command — short for ValkyrAI — is a simple bash script that provides an easy way to run the ValkyrAI generator, manage and deploy front and backend artifacts, generate necessary encryption keys, run the VIDAR script, and more.

Purpose

The vai command serves as a convenient entry point for various ValkyrAI operations, simplifying common tasks and providing a guided interface for users.

Usage

To use the vai command, simply run:

./vai

This will display a menu of options:

☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️
..................................................................................................
░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒▒▓█▓▒░░▒▓████████▓▒░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░
░▒▓█▓▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓██▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️☮️

WELCOME TO THE VAI GUIDED RUNNER

Features

The vai command provides the following options:

  • Clean generated files: Remove generated files from a previous run
  • Enhance OpenAPI: Enhance the input OpenAPI with ThorAPI extensions
  • Build and generate code: Build the generator and generate code from the enhanced OpenAPI
  • Run backend instance: Run the backend instance for development
  • Run frontend instance: Build and run the frontend instance for development
  • Deploy artifacts: Deploy generated artifacts
  • SSH into server: SSH into a server to restart services
  • Generate JWT Secret Key: Generate a JWT Secret Key for authentication
  • Generate THORAPI Secret Key: Generate a THORAPI Secret Key for encryption
  • Create VIDAR file: Create an encrypted VIDAR file

list-to-file

The list-to-file utility is a simple tool for converting lists to files. It can be used to generate files from lists of items, such as generating configuration files from a list of parameters.

Usage

To use the list-to-file utility, run:

bin/list-to-file <input-list> <output-file>

Where:

  • <input-list> is a file containing a list of items
  • <output-file> is the path to the output file

Integration with ValkyrAI

These utilities are designed to work seamlessly with ValkyrAI and its components:

  • VIDAR can be used to securely package ValkyrAI projects for deployment
  • vai provides a convenient interface for common ValkyrAI operations
  • list-to-file can be used to generate configuration files for ValkyrAI components

Best Practices

  • Secure Passwords: Use strong, unique passwords when encrypting files with VIDAR
  • Regular Backups: Maintain backups of encrypted files and their passwords
  • Script Automation: Consider automating common tasks using the vai command in scripts
  • Documentation: Document any custom configurations or usage patterns for your team

Future Enhancements

The ValkyrAI utilities roadmap includes:

  • Enhanced encryption options for VIDAR
  • Additional command-line options for the vai command
  • Integration with cloud storage services
  • Support for additional file formats and conversion options