Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable running non-JS programs with apify run #271

Open
metalwarrior665 opened this issue Apr 27, 2022 · 4 comments
Open

Enable running non-JS programs with apify run #271

metalwarrior665 opened this issue Apr 27, 2022 · 4 comments
Labels
enhancement New feature or request. t-platform Issues with this label are in the ownership of the platform team.

Comments

@metalwarrior665
Copy link
Member

metalwarrior665 commented Apr 27, 2022

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)

@metalwarrior665 metalwarrior665 added the enhancement New feature or request. label Apr 27, 2022
@mnmkng
Copy link
Member

mnmkng commented Apr 27, 2022

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?

@metalwarrior665
Copy link
Member Author

The main use-cases are probably API actions & proxy password

@mnmkng
Copy link
Member

mnmkng commented Apr 27, 2022

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.

@metalwarrior665
Copy link
Member Author

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

@mtrunkat mtrunkat added the t-platform Issues with this label are in the ownership of the platform team. label Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. t-platform Issues with this label are in the ownership of the platform team.
Projects
None yet
Development

No branches or pull requests

3 participants