Skip to main content

A command-line tool for managing Foundry VTT instances

Project description

Foundry Instance Manager

A CLI tool for managing multiple Docker containers that share the same image but have individual data directories and a shared data directory.

Features

  • Create and manage multiple Docker containers from the same image
  • Each container has its own isolated data directory
  • Shared data directory accessible by all containers
  • Easy-to-use CLI interface
  • Container status monitoring
  • Automated changelog generation
  • Automated version bumping and release workflow
  • Security checks (Bandit, Safety)

Installation

  1. Clone this repository
  2. Install Poetry
  3. Install dependencies:
poetry install

Usage

# Create a new container
poetry run fim create --name my-container --image my-image

# List all containers
poetry run fim list

# Start a container
poetry run fim start --name my-container

# Stop a container
poetry run fim stop --name my-container

# Remove a container
poetry run fim remove --name my-container

Configuration

The tool uses the following directory structure:

  • ./data/shared/ - Shared data directory accessible by all containers
  • ./data/containers/<container-name>/ - Individual container data directories

Requirements

  • Python 3.11+
  • Docker installed and running
  • Poetry

CI/CD Pipeline (GitHub Actions)

This project uses a robust CI/CD pipeline with the following stages:

  • Quality Checks: Linting (flake8, black, isort), type checking (mypy), and unit tests with coverage (pytest, pytest-cov). Coverage is uploaded to Codecov.
  • Security: Bandit for static security analysis and Safety for dependency vulnerability checks.
  • Version Management: Automated version bumping and changelog generation on every push to main.
  • Release: Builds the package, creates a GitHub release, and publishes to PyPI when a new tag is created.

How it works

  • On every push or pull request to main, the pipeline runs quality and security checks.
  • On pushes to main, if all checks pass, the version is bumped, a changelog is generated, and a new tag is created.
  • When a tag is pushed, a release is created and the package is published to PyPI.

Changelog Generation

Changelog is automatically generated using the changelog tool. To manually generate or update the changelog:

poetry run changelog generate-md CHANGELOG.md

Security

  • Run Bandit:
    poetry run bandit -r foundry_instance_manager
    
  • Run Safety:
    poetry run safety check
    

Development with Cursor

Cursor is an AI-powered IDE that can help with development tasks. Here are some useful prompts you can use:

Code Quality

  • "Run flake8. For each issue found, understand the issue and surrounding code, explain the issue and your proposed solution, and finally implement your solution. Then rerun flake8 to verify the issue has been fixed. Repeat until all issues are fixed."
  • "Run mypy. For each type error found, understand the issue and surrounding code, explain the issue and your proposed solution, and finally implement your solution. Then rerun mypy to verify the issue has been fixed. Repeat until all issues are fixed."
  • "Run pytest. For each failing test, understand the failure and surrounding code, explain the issue and your proposed solution, and finally implement your solution. Then rerun pytest to verify the test passes. Repeat until all tests pass."

Code Generation

  • "Generate unit tests for the following function/class: [function/class name]"
  • "Add docstrings to all public methods in [file name]"
  • "Add type hints to all functions in [file name]"

Code Review

  • "Review the changes in [file name] and suggest improvements for code quality, performance, and maintainability"
  • "Check for potential security issues in [file name]"
  • "Suggest ways to improve error handling in [file name]"

Documentation

  • "Update the README.md with documentation for [feature/functionality]"
  • "Generate API documentation for [module/class]"
  • "Add inline comments to explain complex logic in [file name]"

Refactoring

  • "Refactor [function/class] to improve readability and maintainability"
  • "Extract common functionality into a shared utility module"
  • "Split [large function/class] into smaller, more focused components"

Remember to be specific in your prompts and provide context when needed. Cursor works best when given clear instructions and relevant information about the task at hand.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foundry_instance_manager-0.1.28.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foundry_instance_manager-0.1.28-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file foundry_instance_manager-0.1.28.tar.gz.

File metadata

  • Download URL: foundry_instance_manager-0.1.28.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for foundry_instance_manager-0.1.28.tar.gz
Algorithm Hash digest
SHA256 7e0d37221cc422efdb57d7f13e5e3091500c9e62102606e1ae8b272ec090ff66
MD5 54c914eb2c5c24930f0a1f918cf00c31
BLAKE2b-256 6de5a4e6d138cf2b676800a5574da38a57ce51c09234c25dd1aa9fa1bd7eb24a

See more details on using hashes here.

File details

Details for the file foundry_instance_manager-0.1.28-py3-none-any.whl.

File metadata

File hashes

Hashes for foundry_instance_manager-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 1e23448fca19b06f67e5df254ca707fe7ce211a8484ce07b86d0985f2e39a956
MD5 ed53ea3135331531d628d174039ade8e
BLAKE2b-256 37201567e5b06c5fbe68558329552498f16d5f8ea9b8821161ebada771a32eb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page