Combined with parallel downloads (configured via --threads ), flat downloading helps you assemble a build environment quickly.
Avoid deep, nested directories (e.g., target/com/company/project/v1/app.jar ) when you only need the .jar file.
{ "files": [ { "pattern": "generic-local/builds/*.tar.gz", "target": "dist/", "flat": "true" } ] } Use code with caution. Run it with: jf rt dl --spec myspec.json . 2. Combining with Placeholders jfrog download flat
Use the abbreviation dl instead of download to save keystrokes. Advanced Flat Downloading Techniques 1. Using File Specs for Complex Tasks
The solution is the --flat flag. This guide explores how to use "jfrog download flat" to streamline your artifact management. What Does the --flat Flag Do? Run it with: jf rt dl --spec myspec
The CLI recreates the full repository path. For example, downloading my-repo/path/to/artifact.zip creates a local folder structure: ./path/to/artifact.zip .
Many CI/CD tools expect artifacts to be in a specific root-level folder to proceed with deployment or testing. Advanced Flat Downloading Techniques 1
The standard syntax for a flat download using the JFrog CLI is: jf rt download "repo-name/path/to/file.zip" --flat Use code with caution. Common Use Cases and Examples Command Example jf rt dl "my-repo/apps/app-v1.zip" --flat Download to a specific folder jf rt dl "my-repo/libs/*.jar" ./local-libs/ --flat Recursive flat download