Enable running non-JS programs with apify run
It would be nice to use Apify CLI for non-JS programs for env vars injection (token + proxy password)
One example how it could look like:
apify run -p --command "cargo run" (to run Rust program)
This just occured to me, but... Why do we need the env-var injection if we don't have the non-JS SDKs that would read the env vars in the first place?
I mean, the fact that the CLI injects APIFY_STORAGE_LOCAL_DIR and the various XXX_DEFAULT_ID is largely irrelevant, because there's no code that would actually save anything to those directories.
And as far as APIFY_TOKEN goes, we don't have access to a run ID locally (there's no run), so we don't have any remote storages either. So the only thing this would work for is for API operations like listing the users actors, downloading data from a pre-selected dataset etc.
We can't use the local env-vars for the simple read input -> run -> save output scenario. Or am I missing something?
The main use-cases are probably API actions & proxy password
Yeah, but you still need to know the env-vars and add them manually into your own code, so installing CLI is pretty much the same as installing a language specific env var manager.
It would make a little more sense if the CLI was native, so you wouldn't need to install Node to install it. But if you're running Rust, it's probably easier to just use whatever Rust uses to inject 2 env vars than installing Node and CLI.
You get the token & proxy password via apify login which is more convenient than storing them somewhere. We can see how many people will want to use this