Skip to content

Ylemir/Scoop-Create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scoop-create

Generate Scoop app manifests from GitHub repository URLs, replacing scoop create.

Features

  • Auto-detection: Fetches repo info, latest release, and selects the best Windows asset automatically
  • Smart asset ranking: Prefers x64 portable .zip/.7z builds; filters out source code and non-Windows artifacts
  • App type inference: Detects CLI, GUI, or both from repo topics/description and asset names
  • SHA256 hashing: Downloads the asset and computes hash when no digest is provided by GitHub
  • Manifest update: Merges new data into existing manifest files, preserving manual edits
  • Interactive mode: Confirm and edit every field before writing
  • Scoop hook: Seamlessly replace scoop create with scoop-create

Installation

uv tool install https://github.com/Ylemir/Scoop-Create

Usage

# Basic usage — full URL or owner/repo shorthand
scoop-create https://github.com/owner/repo
scoop-create owner/repo

# Specify output path
scoop-create owner/repo -o ./my-bucket

# Interactive mode (edit fields before writing)
scoop-create owner/repo --interactive

# Dry-run (print JSON without writing)
scoop-create owner/repo --dry-run

# Target a specific release
scoop-create owner/repo --release v1.2.3

# Include pre-releases
scoop-create owner/repo --include-pr

# Use a proxy
scoop-create owner/repo -p http://127.0.0.1:7890

# Disable TLS verification
scoop-create owner/repo --no-verify

# Custom config file
scoop-create owner/repo -c /path/to/config.json

# Enable debug output
scoop-create owner/repo --debug

# Print PowerShell hook to replace scoop create
scoop-create --hook

Options

Option Short Description
--output -o Output directory path (overrides config output_dir)
--proxy -p Proxy URL (overrides config and env vars)
--interactive -i Enable interactive mode for editing manifest fields
--include-pr Include pre-releases when selecting latest release
--release -r Specify a specific release version/tag
--dry-run -n Print manifest JSON to console without writing
--verify / --no-verify Enable/disable TLS verification (default: enabled)
--timeout -t HTTP request timeout in seconds (default: 20)
--config -c Path to config file (default: config.json)
--debug -d Enable debug output
--hook Print PowerShell hook to replace scoop create
--version -v Print version and exit
--help -h Show help message and exit

PowerShell Hook

Method 1: Scoop alias (simple)

If you only want a shorter command (without overriding Scoop's built-in create subcommand):

scoop alias add gen "scoop-create @args" "Generate a custom app manifest from GitHub repo"

Then you can run:

scoop gen owner/repo

Method 2: Hook scoop create (drop-in replacement)

To replace scoop create with scoop-create, import a small PowerShell module generated by scoop-create --hook.

Add this to your PowerShell profile (usually $PROFILE):

New-Module -Name scoop-create -ScriptBlock { Invoke-Expression (& scoop-create --hook) } |
  Import-Module -Global

Notes:

  • This intercepts scoop create <url> and routes it to scoop-create.
  • If you use Invoke-FuzzyScoop (PsFzf), this hook may not be suitable because it relies on wrapping the scoop function.
  • To apply without restarting PowerShell, run: . $PROFILE
  • To disable for the current session, run: Remove-Module scoop-create

Configuration

Config file: config.json, searched in order:

  1. Explicit path via --config flag
  2. Current working directory
  3. ~/.config/scoop-create/
{
  "github_token": "",
  "output_dir": "D:\\scoop-buckets\\bucket",
  "proxy": "http://127.0.0.1:7890",
  "ignore_manifest_fields": ["bin", "architecture.64bit.hash"],
  "include_pr": false,
  "interactive": false,
  "verify": true,
  "timeout": 20.0,
  "debug": false
}
Field Description
github_token GitHub personal access token (or GITHUB_TOKEN env var)
output_dir Default output directory for generated manifests
proxy HTTP/HTTPS proxy URL (or HTTP_PROXY / HTTPS_PROXY env vars)
ignore_manifest_fields Fields to skip when updating an existing manifest (dot-separated for nested fields)
include_pr Include pre-releases when selecting the latest release
interactive Enable interactive mode by default
verify Enable TLS certificate verification
timeout HTTP request timeout in seconds
debug Enable debug logging

Priority: CLI args > config file > env vars (GITHUB_TOKEN, HTTP_PROXY, HTTPS_PROXY) > defaults

Generated Manifest

{
  "version": "1.2.3",
  "description": "Repo description",
  "homepage": "https://github.com/owner/repo",
  "license": "MIT",
  "bin": "app.exe",
  "shortcuts": [["app.exe", "App Name"]],
  "architecture": {
    "64bit": {
      "url": "https://github.com/owner/repo/releases/download/v1.2.3/app.exe",
      "hash": "sha256:abc123..."
    }
  },
  "checkver": {
    "github": "https://github.com/owner/repo"
  },
  "autoupdate": {
    "architecture": {
      "64bit": {
        "url": "https://github.com/owner/repo/releases/download/$version/app.exe"
      }
    }
  }
}

Development

uv sync              # Install dependencies
uv run scoop-create --help

Lint & Format

uv run ruff check src/
uv run ruff format src/

Type Check

uv run mypy src/

Test

uv run pytest
uv run pytest tests/test_file.py -v
uv run pytest tests/test_file.py::test_name -v

Build

uv build

License

MIT

About

Generate Scoop app manifests from GitHub repository URLs, replacing scoop create

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages