Speed up your CI/CD pipeline with Flash Install, a fast npm alternative with deterministic caching
- β‘ 30-50% faster than standard npm install
- π Deterministic caching for consistent builds
- βοΈ Cloud caching support for team sharing
- π Multiple package managers support (npm, yarn, pnpm, bun)
- π οΈ Optimized for CI/CD environments
- π¦ GitHub Actions caching integration
- ποΈ Monorepo support with workspace detection
- π Fallback to npm if Flash Install encounters an error
Add Flash Install to your GitHub Actions workflow:
steps:
- uses: actions/checkout@v3
- name: Install dependencies with Flash Install
uses: flash-install-cli/flash-install-action@v1
with:
# Optional parameters (shown with defaults)
command: 'install' # Command to run (install, restore, snapshot, clean)
directory: '.' # Directory to run the command in
cache-enabled: 'true' # Enable GitHub Actions caching
cloud-cache: 'false' # Enable cloud caching
cloud-provider: 's3' # Cloud provider (s3, azure, gcp)
cloud-bucket: '' # Cloud bucket name
cloud-region: '' # Cloud region
cloud-prefix: 'flash-install-cache' # Cloud prefix
package-manager: 'npm' # Package manager to use (npm, yarn, pnpm, bun)
concurrency: '4' # Number of concurrent downloads
- name: Install dependencies
uses: flash-install-cli/flash-install-action@v1
- name: Install dependencies with S3 caching
uses: flash-install-cli/flash-install-action@v1
with:
cloud-cache: 'true'
cloud-provider: 's3'
cloud-bucket: 'my-ci-cache-bucket'
cloud-region: 'us-east-1'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Install dependencies with Yarn
uses: flash-install-cli/flash-install-action@v1
with:
package-manager: 'yarn'
- name: Install dependencies with PNPM
uses: flash-install-cli/flash-install-action@v1
with:
package-manager: 'pnpm'
- name: Install dependencies with Bun
uses: flash-install-cli/flash-install-action@v1
with:
package-manager: 'bun'
Here's a complete workflow example using Flash Install:
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies with Flash Install
uses: flash-install-cli/flash-install-action@v1
- name: Run tests
run: npm test
- name: Build
run: npm run build
Parameter | Description | Required | Default |
---|---|---|---|
command |
Command to run (install, restore, snapshot, clean) | No | install |
directory |
Directory to run the command in | No | . |
cache-enabled |
Enable GitHub Actions caching | No | true |
cloud-cache |
Enable cloud caching | No | false |
cloud-provider |
Cloud provider (s3, azure, gcp) | No | s3 |
cloud-bucket |
Cloud bucket name | No | '' |
cloud-region |
Cloud region | No | '' |
cloud-prefix |
Cloud prefix | No | flash-install-cache |
package-manager |
Package manager to use (npm, yarn, pnpm, bun) | No | npm |
concurrency |
Number of concurrent downloads | No | 4 |
- Setup Node.js: The action sets up Node.js v16
- Install Flash Install: Installs the Flash Install CLI globally
- Setup Cache Directory: Creates a cache directory for Flash Install
- Cache Dependencies: Uses GitHub Actions caching to store and retrieve the Flash Install cache
- Run Flash Install: Executes the Flash Install command with the specified parameters
- Fallback to npm: If Flash Install fails, falls back to npm for reliability
Project Type | npm install | flash-install | Improvement |
---|---|---|---|
Small App | 45s | 28s | 38% faster |
Medium App | 1m 32s | 52s | 44% faster |
Large Monorepo | 4m 15s | 2m 10s | 49% faster |
*Benchmarks run on GitHub-hosted runners with cold cache
- Faster CI/CD: Reduce your GitHub Actions workflow time
- Cost Savings: Shorter workflow runs mean lower GitHub Actions minutes usage
- Better Developer Experience: Faster feedback loops for your team
- Reliable Builds: Deterministic caching ensures consistent builds
- Team Sharing: Share caches across your team with cloud caching
- Monorepo Support: Optimized for monorepo projects
- Fallback Mechanism: Automatically falls back to npm if any issues occur
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository at https://github.com/flash-install-cli/flash-install-action
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Flash Install CLI - The main Flash Install CLI project
- Flash Install Documentation - Comprehensive documentation for Flash Install
MIT
- Thanks to all the open-source projects that made this possible
- Special thanks to all our sponsors who make this project sustainable