Is a package to trawl through the files in a package/folder and surface all the packages used within?

R’s renv has a function called renv::init() which does that.

Also, for bonus points, is there a package to automatically put bounds on the Project.toml for each package that is used?

Would this work for you?
find . -name "*.jl" -exec grep using {} \; | sort | uniq

The Manifest.toml contains all the dependencies of the current project, and their versions.

1 Like

It’s not automatic, but PackageCompatUI makes it quite convenient to add compat bounds.

1 Like

CompatHelperLocal (disclaimer: my package) does exactly this (and more): checks whether all dependencies have a compat entry, and whether the entries are up to date. If not, suggests the replacement [compat] section to put into Project.toml.