apify-cli icon indicating copy to clipboard operation
apify-cli copied to clipboard

Rename `apify init` to `apify actorize`

Open honzajavorek opened this issue 9 months ago • 5 comments

After learning about the differences between various ways how to start a project with the Apify CLI (see https://github.com/apify/apify-cli/issues/746#issuecomment-2713656964), I think the apify init command is named in a way which might not be completely clear to everyone immediately.

My hunch is that many people learning about Apify will be familiar with git init, which usually happens when starting a new project from scratch.

The apify init has the same name, but is supposed to be used in a very different situation - when I have an existing project and I want to turn it into something that can run on the Apify platform.

Maybe it should be called apify actorize to better convey the meaning? Credits to this idea go to @vdusek, but I agree with it and I decided it deserves an issue as an official proposal.

honzajavorek avatar Mar 11 '25 10:03 honzajavorek

One addition: I think this can be done in a completely backwards-compatible way:

  • The command would rename to actorize and the docs would change everywhere to recommend actorize.
  • The init command would still work. If someone used it, it would give a warning about being deprecated, but otherwise it'd call implementation of actorize and work completely the same.
  • The init command would be mentioned in docs only as a deprecated alias of actorize.
  • The init command can stay like this forever 🤷‍♂

honzajavorek avatar Mar 14 '25 14:03 honzajavorek

My hunch is that many people learning about Apify will be familiar with git init, which usually happens when starting a new project from scratch.

The apify init has the same name, but is supposed to be used in a very different situation - when I have an existing project and I want to turn it into something that can run on the Apify platform.

That's not entirely true, you can use git init on an existing project, all it does is to initialize the .git folder for you. So exactly the same as with apify init and its .actor folder.

Also, this is all modeled based on the Actor whitepaper, we can't just rename things.

cc @netmilk

B4nan avatar Mar 16 '25 09:03 B4nan

I think this comment might describe the root of this issue: https://github.com/apify/apify-cli/issues/761#issuecomment-2729373664 Currently, the init command doesn't behave like git init, i.e. just adds a folder and nothing else. My experience was that it has refused to create the folder and refused to tell me why and what I'm supposed to do.

honzajavorek avatar Mar 18 '25 08:03 honzajavorek

Ok, but that comment is in no way backing up what you are proposing here, quite the opposite, it says we should rather align with git init instead of renaming.

B4nan avatar Mar 18 '25 09:03 B4nan

Yes. My point is that if apify init behaved like git init, I wouldn't be surprised and confused by its behavior, I wouldn't crave for additional docs, and perhaps I wouldn't suggest renaming it to actorize.

honzajavorek avatar Mar 18 '25 10:03 honzajavorek