### Install Ownfoil as a persistent uv tool Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Installs Ownfoil as a uv tool so the 'ownfoil' command remains available. After installation, run 'ownfoil' to start it. ```bash uv tool install ownfoil ownfoil ``` -------------------------------- ### Install develop version from git with uv tool Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Install the develop branch from git using uv tool. ```bash uv tool install git+https://github.com/a1ex4/ownfoil@develop ``` -------------------------------- ### Install specific version with uv tool Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Install Ownfoil with a pinned version using uv tool. ```bash uv tool install ownfoil==2.4.0 ``` -------------------------------- ### Install Ownfoil with Helm chart Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Run this command from the chart directory after cloning the repository. It installs or upgrades the Ownfoil release in the specified namespace with the provided values file. ```bash helm upgrade --install ownfoil ./ -n namespace -f values.yaml ``` -------------------------------- ### Run capture harness commands Source: https://github.com/a1ex4/ownfoil/blob/master/tests/capture/README.md List available capture scenarios and start recording for a specific client. Use --scenario to recapture a single scenario and --fresh to discard the workdir when the fixture shop needs rebuilding. ```bash python tests/capture/run_capture.py --list ``` ```bash python tests/capture/run_capture.py --client tinfoil ``` ```bash python tests/capture/run_capture.py --client sphaira --scenario download ``` -------------------------------- ### Upgrade uv tool installation Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Upgrade the globally installed Ownfoil tool via uv. ```bash uv tool upgrade ownfoil ``` -------------------------------- ### Docker run command to start Ownfoil Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Starts the Ownfoil container on local port 8465, mounting the game directory and persisting config and data directories. Use `docker logs -f ownfoil` to view logs. ```bash docker run -d -p 8465:8465 \ -v /your/game/directory:/games \ -v ./config:/app/config \ -v ./data:/app/data \ --name ownfoil \ a1ex4/ownfoil ``` ```bash docker logs -f ownfoil ``` -------------------------------- ### Run Ownfoil once with uvx Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Run Ownfoil without installing it permanently. On first run, Windows Defender Firewall will prompt to allow Python on private networks, which is required for Switch discovery and shop usage. ```bash uvx ownfoil ``` -------------------------------- ### Docker Compose configuration for Ownfoil Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Defines the Ownfoil service with volumes, ports, and optional environment variables for user creation and permissions. Start with `docker-compose up -d`. ```yaml --- services: ownfoil: container_name: ownfoil image: a1ex4/ownfoil # environment: # # For write permission in config directory # - PUID=1000 # - PGID=1000 # # to create/update an admin user at startup # - USER_ADMIN_NAME=admin # - USER_ADMIN_PASSWORD=asdvnf!546 # # to create/update a regular user at startup # - USER_GUEST_NAME=guest # - USER_GUEST_PASSWORD=oerze!@8981 volumes: - /your/game/directory:/games - ./data:/app/data - ./config:/app/config ports: - "8465:8465" # # for LAN discovery, replaces the ports mapping above with: # network_mode: host ``` ```bash docker-compose up -d ``` -------------------------------- ### Specify a custom directory for config and data Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md By default, 'config/' and 'data/' are created in the current directory. Pass a directory to use instead. Works the same way with uvx by appending the path after 'ownfoil'. ```bash ownfoil /path/to/persist uvx ownfoil /path/to/persist ``` -------------------------------- ### Run develop version from git with uvx Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Run the develop branch directly from git using uvx. ```bash uvx --from git+https://github.com/a1ex4/ownfoil@develop ownfoil ``` -------------------------------- ### Pin version with uvx Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Run Ownfoil with a specific version using uvx. ```bash uvx ownfoil@2.4.0 ``` -------------------------------- ### Run Docker container with pinned version Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Run Ownfoil with a specific image tag (e.g., 2.3). ```bash docker run ... a1ex4/ownfoil:2.3 ``` -------------------------------- ### enqueueTask(name, input) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Enqueues a task by name with an optional input payload. Delegates to tasks.enqueue_task. ```APIDOC ## enqueueTask(name, input) ### Description Enqueues a task by name with an optional input payload. Delegates to tasks.enqueue_task. ### Arguments - **name** (String) - Required - The name of the task to enqueue. - **input** (String) - Optional - JSON payload as a string; shape varies per task name. ### Behavior - Delegates to `tasks.enqueue_task`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### Update Docker image Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Pull the latest Docker image and recreate the container. ```bash docker pull a1ex4/ownfoil ``` -------------------------------- ### titles(owned:, filter:, search:, orderBy:, page:) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Fetches a paginated list of titles. Supports filtering by ownership, arbitrary filters, search, ordering, and pagination. Requires shop access. ```APIDOC ## titles(owned:, filter:, search:, orderBy:, page:) ### Description Fetches a paginated list of titles. Supports filtering by ownership, arbitrary filters, search, ordering, and pagination. Requires shop access. ### GraphQL Query ```graphql titles(owned: Boolean, filter: StringFilter, search: String, orderBy: String, page: Int): TitleConnection ``` ### Parameters - **owned** (Boolean) - Optional - Filter to owned titles only. - **filter** (StringFilter) - Optional - Filter criteria. - **search** (String) - Optional - Search string. - **orderBy** (String) - Optional - Ordering specification. - **page** (Int) - Optional - Page number for pagination. ### Access - **shop** - Requires shop access. ``` -------------------------------- ### verifyFile(fileId) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Verifies a file by ID. Resets file verification and enqueues a 'verify_file' task. ```APIDOC ## verifyFile(fileId) ### Description Verifies a file by ID. Resets file verification and enqueues a 'verify_file' task. ### Arguments - **fileId** (ID) - Required - The ID of the file to verify. ### Behavior - Delegates to `reset_file_verification` and `enqueue_task('verify_file')`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### scanLibrary(path) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Scans a library at the given path, or all libraries when path is omitted. Delegates to enqueue_task('scan_library'). ```APIDOC ## scanLibrary(path) ### Description Scans a library at the given path, or all libraries when path is omitted. Delegates to enqueue_task('scan_library'). ### Arguments - **path** (String) - Optional - The path of the library to scan. If omitted, all libraries are scanned. ### Behavior - Delegates to `enqueue_task('scan_library')`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### deleteFile(file) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Deletes a file. Delegates to enqueue_task('delete_file'), refused if the file's path changed since shown. ```APIDOC ## deleteFile(file) ### Description Deletes a file. Delegates to enqueue_task('delete_file'), refused if the file's path changed since shown. ### Arguments - **file** (FileInput) - Required - The file to delete. ### Behavior - Delegates to `enqueue_task('delete_file')`. - Refused if the file's path changed since shown. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### Disable browser auto-open with --no-browser Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md The Web UI opens in the default browser once the server is ready. Pass '--no-browser' (or set OWNFOIL_NO_BROWSER=1) to disable this behavior. ```bash ownfoil --no-browser ``` -------------------------------- ### Update Docker Compose stack Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Pull new images and recreate containers in detached mode. ```bash docker compose pull && docker compose up -d ``` -------------------------------- ### compressFile(fileId) / decompressFile(fileId) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Compresses or decompresses a file by ID. Delegates to enqueue_task, guarded on file existence, state, and extension. ```APIDOC ## compressFile(fileId) / decompressFile(fileId) ### Description Compresses or decompresses a file by ID. Delegates to enqueue_task, guarded on file existence, state, and extension. ### Arguments - **fileId** (ID) - Required - The ID of the file to compress or decompress. ### Behavior - Delegates to `enqueue_task`. - Guarded: file must exist, not already in that state, and extension must be in `COMPRESS_EXT`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### title(titleId:) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Fetches a single Title by its ID. Returns one Title, either owned or catalogue-only. Requires shop access. ```APIDOC ## title(titleId:) ### Description Fetches a single Title by its ID. Returns one Title, either owned or catalogue-only. Requires shop access. ### GraphQL Query ```graphql title(titleId: ID!): Title ``` ### Parameters - **titleId** (ID!) - Required - The ID of the title to fetch. ### Access - **shop** - Requires shop access. ``` -------------------------------- ### Set image tag in Docker Compose file Source: https://github.com/a1ex4/ownfoil/blob/master/Install.md Specify the image tag in the compose file's image line. ```yaml image: a1ex4/ownfoil:develop ``` -------------------------------- ### removeDuplicates(files) / removeOutdatedUpdates(files) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Removes duplicate files or outdated updates. Delegates to enqueue_task; the task deletes only files both shown and still selected when it runs. ```APIDOC ## removeDuplicates(files) / removeOutdatedUpdates(files) ### Description Removes duplicate files or outdated updates. Delegates to enqueue_task; the task deletes only files both shown and still selected when it runs. ### Arguments - **files** (List of FileInput) - Required - The files to remove. ### Behavior - Delegates to `enqueue_task`. - The task deletes only files both shown and still selected when it runs. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### retryIdentification(fileId) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Retries identification for a file by ID. Resets file identification and enqueues a 'process_file' task. ```APIDOC ## retryIdentification(fileId) ### Description Retries identification for a file by ID. Resets file identification and enqueues a 'process_file' task. ### Arguments - **fileId** (ID) - Required - The ID of the file to retry identification for. ### Behavior - Delegates to `reset_file_identification` and `enqueue_task('process_file')`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### setTitleOverride(titleId, record) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Sets a title override for a given title ID. Delegates to titledb.store.set_override and identify_library. ```APIDOC ## setTitleOverride(titleId, record) ### Description Sets a title override for a given title ID. Delegates to titledb.store.set_override and identify_library. ### Arguments - **titleId** (ID) - Required - The ID of the title to override. - **record** (String) - Required - JSON payload as a string; shape varies per metadata source. ### Behavior - Delegates to `titledb.store.set_override` and `identify_library`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### dismissTask(id) / purgeFailedTasks Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Dismisses a failed task by ID, or purges all failed tasks. Delegates to tasks.dismiss_task, only for failed tasks. ```APIDOC ## dismissTask(id) / purgeFailedTasks ### Description Dismisses a failed task by ID, or purges all failed tasks. Delegates to tasks.dismiss_task, only for failed tasks. ### Arguments - **id** (ID) - Required for `dismissTask` - The ID of the failed task to dismiss. - No arguments for `purgeFailedTasks`. ### Behavior - Delegates to `tasks.dismiss_task`. - Only affects failed tasks. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### deleteTitleOverride(titleId) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Deletes a title override for a given title ID. Delegates to titledb.store.delete_override. ```APIDOC ## deleteTitleOverride(titleId) ### Description Deletes a title override for a given title ID. Delegates to titledb.store.delete_override. ### Arguments - **titleId** (ID) - Required - The ID of the title override to delete. ### Behavior - Delegates to `titledb.store.delete_override`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ``` -------------------------------- ### cancelTask(id) Source: https://github.com/a1ex4/ownfoil/blob/master/app/gql/README.md Cancels a task by its ID. Delegates to tasks.cancel_task. ```APIDOC ## cancelTask(id) ### Description Cancels a task by its ID. Delegates to tasks.cancel_task. ### Arguments - **id** (ID) - Required - The ID of the task to cancel. ### Behavior - Delegates to `tasks.cancel_task`. - Raises `NotAuthorized` or `MutationFailed` on denial or failure. - Not cached; responses include `no-store`. - GET requests are refused with 405. ```