LinuxCommandLibrary

asar

TLDR

Create asar archive

$ asar pack [dir/] [output.asar]
copy
Extract asar archive
$ asar extract [archive.asar] [output_dir/]
copy
List contents
$ asar list [archive.asar]
copy
Extract single file
$ asar extract-file [archive.asar] [path/in/archive] [output_file]
copy

SYNOPSIS

asar pack|extract|list|extract-file arguments

DESCRIPTION

asar creates and extracts Electron archive files. ASAR (Atom Shell Archive) is a tar-like format used by Electron applications to package source files into a single file while maintaining random access capability.
The format allows Electron to read files directly from the archive without extraction, improving load times.

PARAMETERS

pack dir output

Create archive from directory
extract archive dest
Extract archive to directory
list archive
List archive contents
extract-file archive file dest
Extract single file

CAVEATS

ASAR archives are not encrypted; contents can be easily extracted. Some Electron apps may integrity-check their archives. Not suitable for sensitive data.

HISTORY

ASAR was developed for the Atom text editor (later Electron framework) as a way to package Node.js applications efficiently.

SEE ALSO

tar(1), npm(1), electron(1)

Copied to clipboard