🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

astra-cli

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astra-cli

🚀 Fast, reliable and easy-to-use js-to-exe compiler.

1.3.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

Astra

🚀 Fast, reliable and easy-to-use js-to-exe compiler.

Docs | npm | GitHub

NPM Downloads NPM Version GitHub Actions Workflow Status
Netlify status GitHub Repo stars

Why Astra?

Astra is (probably) the best compiler available on npm.

Average exe is ~70-80MB (depends on your code) so it's lighter than most compilers

Using upx you can go down up to ~30MB

It's aiming to compile servers (express, fastify) or CLIs (commander) so it's not replacement of electron.

For now it only compiles windows applications. (I'm working on macOS and linux)

Features

  • Different than the others - Astra is a new approach to compiling JavaScript/TypeScript applications. It uses a different method than other compilers like pkg or nexe.

  • Compile newest versions of Node.js - Astra supports the latest Node.js versions.

  • Fast build time - Powered by esbuild, Astra ensures the fastest possible compilation speed.

  • Improved support for ECMAScript - Astra supports compiling ESM-based applications, with workarounds for limitations in Node.js SEA.

  • Delightful DX - With signale, inquirer and chalk, Astra provides a great developer experience.

  • Standalone Executable - Generates a single .exe or binary file that includes all dependencies.

  • Make exe your own - Modify metadata (icon, name, version, etc.) of the generated executable.

  • Future-proof - Made with trusted, constantly evolving tools.

Contributing

🤝 I welcome pull requests! Every contribution will be reviewed and appreciated - even small fixes.

Getting Started

Install Astra globally using Yarn or npm:

# npm 
npm i -g astra-cli
# yarn (classic)
yarn global add astra-cli
# pnpm
pnpm add -g astra-cli

# for one project only
# npm
npm i --save-dev astra-cli
# yarn
yarn add --dev astra-cli
# pnpm
pnpm add -D astra-cli

Then, compile your JavaScript/TypeScript project:

astra build src/index.js

For more options, run:

astra --help

How it works?

  • Code is linted and bundled with esbuild,
  • Then astra is generating blob which will be injected into node.exe binary,
  • Next astra is editing metadata of your binary (adding icon, copyright),
  • And finally postject injects blob into final executable.

License

Astra is licensed under the MIT License.

Made with ❤️ by QwertyCodeQC

Keywords

astra

FAQs

Package last updated on 20 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts