Only make compilation of a script

I only want to know if it’s possible to make a compilation for a script without running the script
if it’s possible, how can I do it?

Are you thinking about a sysimage?

https://julialang.github.io/PackageCompiler.jl/dev/sysimages/

Sysimages depend on a “tracing” run. Therefore, they do not exactly fit the “make a compilation for a script without running the script” criteria. However, I suppose you could somehow fake the output of the tracing run, and use it to generate the sysimage.

my program needs to read stdin, if I try to create the sysimage I’m going to get a failure, isn’t it?

If it’s like that this approach won’t work for me

Also, I need to do this task (create the sysimage) with only one command is a little complex if I follow de docs for PackageCompiler same thing If I try to create a executable.

The link shared by @johnh has a section handling this case. You can create the sysimage from a REPL execution in which you can interact with any stdin requests your code does.