Skip to content

feat(cli): add preload command and --no-pull flag#196

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/add-firewall-logging-feature
Closed

feat(cli): add preload command and --no-pull flag#196
Copilot wants to merge 4 commits intomainfrom
copilot/add-firewall-logging-feature

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

Adds a preload subcommand to pre-download container images and a --no-pull flag to use locally cached images, ensuring faster startup when running awf commands.

Changes

  • src/commands/preload.ts: Command handler that pulls squid and agent images sequentially (sequential to avoid interleaved output)
  • src/cli.ts: Registers preload subcommand with --image-registry and --image-tag options, and adds --no-pull flag to main command
  • src/types.ts: Adds skipPull option to WrapperConfig
  • src/docker-manager.ts: Updates startContainers to pass --pull never when skipPull is true
  • src/cli-workflow.ts: Updates interface and workflow to pass skipPull parameter
  • src/commands/preload.test.ts: Unit tests covering success, error handling, and custom registry/tag
  • src/docker-manager.test.ts: Unit tests for --pull never behavior

Usage

# Pre-download images
awf preload

# Pre-download with custom registry and tag
awf preload --image-registry my-registry.example.com/awf --image-tag v1.0.0

# Use pre-downloaded images (skip pulling)
awf --allow-domains github.com --no-pull -- curl https://api.github.com
Original prompt

#193


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 9, 2026 19:30
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add logging feature for firewall activities feat(cli): add preload command to pre-download container images Jan 9, 2026
Copilot AI requested a review from Mossaka January 9, 2026 19:34
@Mossaka
Copy link
Collaborator

Mossaka commented Jan 10, 2026

@copilot how about improve the existing commands to add a flag to not pull a container image but use the one from local (pre downloaded)

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 10, 2026

@copilot how about improve the existing commands to add a flag to not pull a container image but use the one from local (pre downloaded)

Added --no-pull flag to the main command in commit 53be951. Now you can:

# Pre-download images
awf preload

# Use pre-downloaded images without pulling
awf --allow-domains github.com --no-pull -- curl https://api.github.com

When --no-pull is used, Docker Compose runs with --pull never to use locally cached images.

Copilot AI changed the title feat(cli): add preload command to pre-download container images feat(cli): add preload command and --no-pull flag Jan 10, 2026
@Mossaka Mossaka marked this pull request as ready for review January 13, 2026 07:48
@github-actions
Copy link

Test Coverage Report

Metric Coverage Covered/Total
Lines 77.25% 1308/1693
Statements 77.3% 1339/1732
Functions 76.59% 144/188
Branches 69.04% 435/630
Coverage Thresholds

The project has the following coverage thresholds configured:

  • Lines: 38%
  • Statements: 38%
  • Functions: 35%
  • Branches: 30%

Coverage report generated by `npm run test:coverage`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants