NAME

pasar - handle Electron ASAR archive files

SYNOPSIS

pasar --list ARCHIVE
pasar -l ARCHIVE

pasar --extract ARCHIVE [DIRECTORY]
pasar -x ARCHIVE [DIRECTORY]

pasar --extract --unpacked=UDIR ARCHIVE [DIRECTORY]
pasar -x -u UDIR ARCHIVE [DIRECTORY]

pasar --create ARCHIVE FILE[...]
pasar -c ARCHIVE FILE[...]

DESCRIPTION

The pasar utility provides basic support for reading and creating Electron ASAR (Atom Shell Archive) files. It can list the contents of an archive, extract the contents of an archive as a file tree, and create an archive from a file tree.

The mode of operation must be selected with command-line options. Either -l/--list (for listing) or -x/--extract (for extracting) or -c/--create (for creating) must be given.

The first non-option argument is the name of the .asar file to be read or created. In extract mode, an optional second argument can be given to specify the output directory; if omitted, it defaults to . (the current working directory). If the output directory does not exist, it will be created automatically. In create mode, all arguments following the name of the .asar file are taken to be names of files or directories to be added to the archive.

Members of an .asar file can be marked unpacked; they are stored externally, not in the archive file. In extract mode, such unpacked files are automatically looked up in (and copied from) a directory whose name matches the archive file with an .unpacked suffix (if it exists).

For example, if you try to unpack foo.asar and it contains an unpacked member named bar/baz, then the file will be automatically looked up in foo.asar.unpacked/bar/baz.

You can control this behavior with the -u/--unpacked option. If set to an empty string, unpacked files are skipped and ignored during extraction. If set to a non-empty string, it is taken to be the source directory in which unpacked files should be looked up.

SEE ALSO

Archive::Asar

AUTHOR

Lukas Mai, <lmai at web.de>

COPYRIGHT & LICENSE

Copyright 2026 Lukas Mai.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.