Files
herolib/examples
Mahmoud-Emad 5cee9a4d5a refactor: Extract git repository management into a dedicated module
- Moved git repository handling logic from `gittools` to a new
  `gitresolver` module for better code organization and reusability.
- Created a `GitUrlResolver` interface to abstract git URL resolution.
- Implemented a `GitToolsResolver` struct to adapt the existing
  `gittools` functionality to the new interface.  This allows for
  future extensibility with different git repository management
  strategies.
- Improved error handling and added more informative error messages.
- Improved the structure of the `heroscript` by breaking down the
  actions into smaller, more manageable units.
2025-07-23 19:00:43 +03:00
..
...
2025-05-04 08:19:47 +03:00
...
2025-03-24 06:44:39 +01:00
...
2025-07-21 12:46:31 +02:00
...
2025-02-06 21:09:20 +03:00
...
2025-03-24 06:44:39 +01:00
...
2025-07-21 06:51:13 +02:00
...
2025-03-24 06:44:39 +01:00
...
2025-07-19 15:54:23 +02:00
...
2025-03-24 06:44:39 +01:00
...
2025-01-31 15:39:44 +03:00
2025-03-14 02:37:48 +01:00
...
2025-07-19 15:54:23 +02:00
...
2025-07-19 15:54:23 +02:00
...
2025-03-24 06:44:39 +01:00
...
2024-12-30 08:01:17 +01:00
...
2025-01-31 15:39:44 +03:00
...
2025-03-24 06:44:39 +01:00
2025-02-12 09:02:33 +00:00
...
2025-07-19 17:08:33 +02:00
...
2025-03-29 08:23:33 +01:00
...
2025-07-21 11:16:51 +02:00
...
2025-01-31 15:39:44 +03:00
...
2024-12-30 08:01:17 +01:00

HeroLib Examples

This repository contains examples and utilities for working with HeroLib, a comprehensive library for V language.

Sync Do Script

The sync_do.sh script is a utility for development that:

  • Synchronizes the local HeroLib codebase with a remote server
  • Uses rsync to efficiently transfer only changed files
  • Automatically connects to a tmux session on the remote server
  • Helps maintain development environment consistency

Examples Structure

The examples directory demonstrates various capabilities of HeroLib:

  • builder/: Examples of builder patterns and remote execution
  • core/: Core functionality examples including configuration, database operations, and API integrations
  • data/: Data handling examples including encryption and encoding
  • develop/: Development tools including git integration and OpenAI examples
  • hero/: Hero-specific implementations and API examples
  • installers/: Various installation scripts for different tools and services
  • lang/: Language integration examples (e.g., Python)
  • osal/: Operating system abstraction layer examples
  • threefold/: ThreeFold Grid related examples and utilities
  • tools/: Utility examples for imagemagick, tmux, etc.
  • ui/: User interface examples including console and telegram
  • virt/: Virtualization examples for Docker, Lima, Windows, etc.
  • webtools/: Web-related tools and utilities

V Script Requirements

When creating V scripts (.vsh files), always use the following shebang:

#!/usr/bin/env -S v -n -w -gc none  -cc tcc -d use_openssl -enable-globals run

This shebang ensures:

  • Direct execution of V shell scripts without needing to use the V command
  • No main() function requirement in .vsh files
  • Proper compilation flags and settings
  • OpenSSL support enabled
  • Global variables enabled
  • TCC compiler usage
  • No retry compilation

These examples serve as practical demonstrations and reference implementations for various HeroLib features and integrations.