Right now, apify-cli hosts two sub-clis: apify and actor. We currently build executables TWICE, and when installing we have 3 different copies dropped in ~/.apify/bin (apify, apify-cli and actor).
All 3 files also have common file sizes, meaning each apify cli install when using binaries takes up well over 300MB!!
We should unify the bundles in one big executable, and update both our install scripts, upgrade scripts, and just in general ensure we can seamlessly unite them in one.
Ideally what the end result would be is:
$ ls ~/.apify/bin
- apify-cli
- apify
- actor
Where apify and actor are actually shell scripts that call apify-cli with a different APIFY_CLI_ENTRYPOINT env variable. When apify-cli is called standalone it assumes its running under the apify entrypoint
Code wise not much needs to be changed, especially not for npm (where our build step already is smart enough to separate the entrypoints). We will need to adjust
- install.sh script to handle symlinks
- install.ps1 script to create apify.cmd and actor.cmd files (and test those out... will be fun) (we might even need to create a very lightweight native shim, ala volta's, to handle this gracefully)
- upgrade.ps1 to do the same
- the building of bundles. Ideally this would just mean we have a third entrypoint to the CLI, that bun will use when bundling
Right now, apify-cli hosts two sub-clis: apify and actor. We currently build executables TWICE, and when installing we have 3 different copies dropped in
~/.apify/bin(apify, apify-cli and actor).All 3 files also have common file sizes, meaning each apify cli install when using binaries takes up well over 300MB!!
We should unify the bundles in one big executable, and update both our install scripts, upgrade scripts, and just in general ensure we can seamlessly unite them in one.
Ideally what the end result would be is:
$ ls ~/.apify/bin - apify-cli - apify - actorWhere apify and actor are actually shell scripts that call apify-cli with a different APIFY_CLI_ENTRYPOINT env variable. When
apify-cliis called standalone it assumes its running under theapifyentrypointCode wise not much needs to be changed, especially not for npm (where our build step already is smart enough to separate the entrypoints). We will need to adjust