-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
App Manifests
HUMORCE edited this page May 17, 2023
·
87 revisions
An app manifest is a JSON file that describes how to install a program.
{
"version": "1.0",
"url": "https://github.com/lukesampson/cowsay-psh/archive/master.zip",
"extract_dir": "cowsay-psh-master",
"bin": "cowsay.ps1"
}
When this manifest is run with scoop install
it will download the zip file specified by url
, extract the "cowsay-psh-master" directory from the zip file, and then make the cowsay.ps1
script available on your path.
For more examples, see the app manifests in the main Scoop bucket.
-
version
: The version of the app that this manifest installs. -
description
: A one line string containing a short description of the program. Don’t include the name of the program, if it’s the same as the app’s filename. Not technically required, but all new or updated manifests should include a description. -
homepage
: The home page for the program. -
license
: A string or hash of the software license for the program. For well-known licenses, please use the identifier found at https://spdx.org/licenses For other licenses, use the URL of the license, if available. Otherwise, use “Freeware”, “Proprietary”, “Public Domain”, “Shareware”, or “Unknown” (defined below), as appropriate. If different files have different licenses, separate licenses with a comma (,). If the entire application is dual licensed, separate licenses with a pipe symbol (|).-
identifier
: The SPDX identifier, or “Freeware” (free to use forever), “Proprietary” (must pay to use), “Public Domain”, “Shareware” (free to try, must pay eventually), or “Unknown” (unable to determine the license), as appropriate. -
url
: For non-SPDX licenses, include a link to the license. It is acceptable to include links to SPDX licenses, as well. - If it is difficult to determine all of the different licenses, it is acceptable to add
,...
at the end of the SPDX list. If there are both open-source and not open-source licenses, please list all non-open source licenses first (e.g., Freeware/Proprietary/Shareware). - If you are unable to determine what license the application has, use "Unknown".
-
-
##
: A one-line string, or array of strings, containing comments. -
architecture
: If the app is not 32bit, architecture can be used to wrap the differences (example).-
32bit|64bit|arm64
: contains architecture-specific instructions (bin
,checkver
,extract_dir
,hash
,installer
,pre_install
,post_install
,shortcuts
,uninstaller
,url
, andmsi
[msi
is deprecated]).
-
-
autoupdate
: Definition of how the manifest can be updated automatically. -
bin
: A string or array of strings of programs (executables or scripts) to make available on the user's path.- You can also create an alias shim which uses a different name to the real executable and (optionally) passes arguments to the executable. Instead of just using a string for the executable, use e.g:
[ "program.exe", "alias", "--arguments" ]
. See busybox for an example. - However if you declare just one shim like this, you must ensure it's enclosed in an outer array, e.g:
"bin": [ [ "program.exe", "alias" ] ]
. Otherwise it will be read as separate shims.
- You can also create an alias shim which uses a different name to the real executable and (optionally) passes arguments to the executable. Instead of just using a string for the executable, use e.g:
-
checkver
: App maintainers and developers can use the bin/checkver tool to check for updated versions of apps. Thecheckver
property in a manifest is a regular expression that can be used to match the current stable version of an app from the app's homepage. For an example, see the go manifest. If the homepage doesn't have a reliable indication of the current version, you can also specify a different URL to check—for an example see the ruby manifest. -
depends
: Runtime dependencies for the app which will be installed automatically. See alsosuggest
(below) for an alternative todepends
. -
env_add_path
: Add this directory to the user's path (or system path if--global
is used). The directory is relative to the install directory and must be inside the install directory. -
env_set
: Sets one or more environment variables for the user (or system if--global
is used) (example). -
extract_dir
: Ifurl
points to a compressed file (.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract just the directory specified from it. -
extract_to
: Ifurl
points to a compressed file (.zip, .7z, .tar, .gz, .lzma, and .lzh are supported), Scoop will extract all content to the directory specified (example). -
hash
: A string or array of strings with a file hash for each URL inurl
. Hashes are SHA256 by default, but you can use SHA512, SHA1 or MD5 by prefixing the hash string with 'sha512:', 'sha1:' or 'md5:'. -
innosetup
: set to the booleantrue
(without quotes) if the installer is InnoSetup based. -
installer
: Instructions for running a non-MSI installer.-
file
: The installer executable file. Forinstaller
this defaults to the last URL downloaded. Must be specified foruninstaller
. -
script
: A one-line string, or array of strings, of commands to be executed as an installer/uninstaller instead offile
. -
args
: An array of arguments to pass to the installer. Optional. -
keep
:"true"
if the installer should be kept after running (for future uninstallation, as an example). If omitted or set to any other value, the installer will be deleted after running. Seeextras/oraclejdk
for an example. This option will be ignored when used in anuninstaller
directive. - Variables available to
script
andargs
:$fname
(the file last downloaded),$manifest
(the deserialized manifest reference),$architecture
(64bit
or32bit
),$dir
(install directory) - Called during both
scoop install
andscoop update
.
-
-
notes
: A one-line string, or array of strings, with a message to be displayed after installing the app. -
persist
A string or array of strings of directories and files to persist inside the data directory for the app. Persistent data -
post_install
: A one-line string, or array of strings, of the commands to be executed after an application is installed. These can use variables like$dir
,$persist_dir
, and$version
. See Pre/Post (un)install scripts for more details. -
pre_install
: Same options aspost_install
, but executed before an application is installed. -
pre_uninstall
: Same options aspost_install
, but executed before an application is uninstalled. -
post_uninstall
: Same options aspost_install
, but executed after an application is uninstalled. -
psmodule
: Install as a PowerShell module in~/scoop/modules
.-
name
(required forpsmodule
): the name of the module, which should match at least one file in the extracted directory for PowerShell to recognize this as a module.
-
-
shortcuts
: Specifies the shortcut values to make available in the startmenu. See sourcetree for an example. The array has to contain a executable/label pair. The third and fourth element are optional.- Path to target file [required]
- Name of the shortcut (supports subdirectories:
<AppsSubDir>\\<AppShortcut>
e.g. sysinternals) [required] - Start parameters [optional]
- Path to icon file [optional]
-
suggest
: Display a message suggesting optional apps that provide complementary features. See ant for an example.-
["Feature Name"] = [ "app1", "app2"... ]
e.g."JDK": [ "extras/oraclejdk", "openjdk" ]
If any of the apps suggested for the feature are already installed, the feature will be treated as 'fulfilled' and the user won't see any suggestions.
-
-
uninstaller
: Same options asinstaller
, but the file/script is run to uninstall the application.- Called during both
scoop uninstall
andscoop update
.
- Called during both
-
url
: The URL or URLs of files to download. If there's more than one URL, you can use a JSON - array, e.g."url": [ "http://example.org/program.zip", "http://example.org/dependencies.zip" ]
. URLs can be HTTP, HTTPS or FTP.- To change the filename of the downloaded URL, you can append a URL fragment (starting with
#
) to URLs. For example, -
"http://example.org/program.exe"
->"http://example.org/program.exe#/dl.7z"
- Note the fragment must start with
#/
for this to work. - In the above example, Scoop will download
program.exe
but save it asdl.7z
, which will then be extracted automatically with 7-Zip. This technique is commonly used in Scoop manifests to bypass executable installers which might have undesirable side-effects like registry changes, files placed outside the install directory, or an admin elevation prompt.
- To change the filename of the downloaded URL, you can append a URL fragment (starting with
-
cookie
: only found here
-
_comment
: A one-line string, or array of strings, containing comments. Use##
instead. -
msi
(deprecated): Settings for running an MSI installer
This property is deprecated and support will be removed in a future version of Scoop.- The new method is to treat .msi files just like a .zip and extract the files from it without running the full install. You can use the new method simply by not including thismsi
property in your manifest.-
code
required: the product code GUID for the MSI installer -
silent
: should normally betrue
to try to install without popups and UAC prompts
-