I am looking for an equivalent of pip freeze that lists all installed package with full version in the current environment.
From my understanding, this would be the content of [full_requires] in conaninfo.txt.
Hi @gsemet
There is no such thing as "environment", but the Conan cache can host simultaneously many packages, different versions and configurations from multiple projects. I guess you don't want to capture the whole state of the cache.
I would say that you might be interested in the conan lock command: https://docs.conan.io/en/latest/versioning/lockfiles.html
With conan lock create conanfile.py --profile=mywinprofile --lockfile-out=windows.lock you can get a snapshot of that dependency graph, that you can later reuse to reproduce the graph, even if the dependencies changed. Please have a look and let me know if you have further questions.
Another cool tool is info with the --graph flag which will do a graphical representation of your dependencies and build requirements.
$ conan info path-to-conanfile --graph graph.html
$ google-chrome graph.html
Good hint @ericriff, thanks
Now, the HTML template used to create the .html file can also be customized and shared with the team with conan config install, so this might help if you need to change something in the output.
The lockfiles might be a bit more detailed, containing the recipe and package revisions, the options values, and capturing also the profiles used to create that graph, but if having a look to the dependencies is enough, then conan info --graph can be indeed very useful.
I see that conan info .. --json conan-info.json outputs a nice json but it is not pretty formatted by default, isn't it possible to format it by default (without additional scripting?)
Yes, I think it could be enough to add json.dumps(..., indent=4, to the code, if you want to try to contribute a PR, I don't see a strong reason not to merge that change.