Is it Mix Local tasks or Global tasks?

On running the following command

mix local

gives me

mix hex             # Prints Hex help information
mix hex.build       # Builds a new package version locally
mix hex.config      # Reads, updates or deletes Hex config
mix hex.docs        # Fetch or open documentation of a package
mix hex.info        # Prints Hex information
mix hex.install     # false
mix hex.key         # Manages Hex API key
mix hex.outdated    # Shows outdated Hex deps for the current project
mix hex.owner       # Manages Hex package ownership
mix hex.public_keys # Manages Hex public keys
mix hex.publish     # Publishes a new package version
mix hex.retire      # Retires a package version
mix hex.search      # Searches for package names
mix hex.user        # Registers or manages Hex user
mix local.phoenix   # Updates Phoenix locally
mix phoenix.new     # Creates a new Phoenix v1.2.1 application

I am interested to know why these tasks grouped as local? To me these look like global tasks because I can call these tasks from any location and not from a particular elixir project folder.

I searched the docs and looked at the code https://github.com/elixir-lang/elixir/blob/master/lib/mix/lib/mix/tasks/local.ex but couldn’t find a description of why and what is local about these tasks?

@shankardevy: These tasks come from your local installed archives. Please look at results of mix archives.

Now I get the meaning of why these tasks are grouped under mix local. But I still wonder if mix global would have been a more appropriate :wink:

Since you mentioned local installed, can there be a remote archive?

Global in Elixir usually means globally in a cluster, so I would say local has the right connotation.

2 Likes