Skip to main content
⏳ Estimated read time: 2 min read

Install Cloud-to-Code CLI on Windows

Install using .exe file

If you have an executable file of the CLI, you need to set up its path in the system environment variables to use it directly from the terminal. Follow these steps to set up the CLI in Windows using the executable file:

  1. Extract your executable files and store them in a proper folder.
  2. Open Start and search for Edit the system environment variables.
  3. Go to Environment Variables.
  4. Under the User variables section, search for the PATH variable, and select it.
  5. Click Edit and select New.
  6. Copy and paste the folder path where the .exe is stored.
  7. Restart your terminal and use the CLI directly.

Install using Docker

If you have Docker installed, you can use the CLI directly from the Docker container. Follow these steps to set up the CLI in Windows using Docker:

  1. Open your terminal and run the following command to pull the latest version of the CLI image:

    docker pull ghcr.io/stackgenhq/cloud2code
  2. Once the image has been pulled, you can run the CLI using the following command:

    docker run --platform linux/arm64 --rm `
    -e AWS_ACCESS_KEY_ID="***************" ` // access key id
    -e AWS_SECRET_ACCESS_KEY="***************" ` // secret access key
    -e AWS_SESSION_TOKEN="***************" ` // enter an aws session token
    -v C:\Users\abc\output:/output `
    ghcr.io/stackgenhq/cloud2code import aws --region us-east-1 --include aws_s3_bucket --output-dir /output

    Replace the asterisks in the above command with your own AWS credentials and the path where you want to save the output files. The -v flag is used to mount a volume from your local machine to the Docker container.

  3. This will start the CLI and run the command you specified. The output files will be saved in the directory you specified in the -v flag.