I am a Julia user who wants to understand how to manage different project environments. Specifically, I need to know how to activate a project environment, what the `instantiate` command does, and how to add a package to a specific project environment. Additionally, what is the purpose of the `Project.toml` and `Manifest.toml` files?
Navigate to 'pkgdocs.julialang.org'. Click on the 'Working with Environment' link (ID 50). Locate and identify the command to activate a project environment. Find the description of the `instantiate` command and its purpose. Identify the method for adding a package to a specific project environment. Locate the explanation of the purpose of `Project.toml` and `Manifest.toml` files. Synthesize all gathered information into a concise answer.
The agent successfully navigates to the 'Working with Environment' page. The agent states that `activate .` or `activate /path/to/project` is used to activate a project environment. The agent explains that `instantiate` downloads and installs all direct and indirect dependencies listed in the `Manifest.toml` (or `Project.toml` if `Manifest.toml` is absent/outdated). The agent states that `add PackageName` (after activating the environment) or `Pkg.add("PackageName", project="/path/to/project")` is used to add a package to a specific environment. The agent explains that `Project.toml` lists direct dependencies and their compatible versions, while `Manifest.toml` records the exact versions of all direct and indirect dependencies for reproducibility.