Skip to content

Ignore Files

The .pilumignore file lets you exclude directories and services from Pilum’s automatic discovery. This is useful for skipping examples, tests, or archived services.

Basic Usage

Create a .pilumignore file in your project root:

.pilumignore
examples
test-*
archived/

When Pilum runs, it will skip any directories or pilum.yaml files matching these patterns.

Pattern Syntax

Directory Names

Match any directory with that name, anywhere in your project:

Terminal window
# Ignore any directory named "examples"
examples
# Ignore any directory named "fixtures"
fixtures

This matches:

  • examples/
  • services/examples/
  • deep/nested/examples/

Rooted Paths

End a pattern with / to match only at the project root:

Terminal window
# Only ignore the root examples/ directory
examples/
# Only ignore archived/ at root
archived/

This matches:

  • examples/ (at root)

This does NOT match:

  • services/examples/

Glob Patterns

Use * for wildcard matching:

Terminal window
# Ignore directories starting with "test-"
test-*
# Ignore directories ending with "-old"
*-old
# Ignore directories starting with underscore
_*

Comments

Lines starting with # are comments:

Terminal window
# Development fixtures
fixtures
# Old services pending deletion
archived/
# Template files
templates

Blank Lines

Blank lines are ignored for readability:

Terminal window
# Test directories
test-*
fixtures
# Archived services
archived/
*-deprecated

Example .pilumignore

.pilumignore
# Development and testing
examples
fixtures
test-*
testdata
# Build artifacts (shouldn't have pilum.yaml, but just in case)
dist
node_modules
vendor
# Archived/deprecated services
archived/
*-deprecated
*-old
# Template services (for pilum init)
templates/
# Documentation
docs

Debugging

Use --debug to see which paths are being ignored:

Terminal window
$ pilum list --debug
DEBUG: Loaded 5 ignore patterns from .pilumignore
DEBUG: Ignoring directory: examples
DEBUG: Ignoring directory: archived
DEBUG: Ignoring service: test-service/pilum.yaml

Common Patterns

Monorepo with Examples

my-project/
├── .pilumignore # examples
├── services/
│ ├── api/
│ │ └── pilum.yaml # ✓ discovered
│ └── worker/
│ └── pilum.yaml # ✓ discovered
└── examples/
└── demo-service/
└── pilum.yaml # ✗ ignored

Archived Services

.pilumignore
archived/
*-deprecated
my-project/
├── services/
│ ├── payments/
│ │ └── pilum.yaml # ✓ discovered
│ └── payments-deprecated/
│ └── pilum.yaml # ✗ ignored
└── archived/
└── old-api/
└── pilum.yaml # ✗ ignored

Test Fixtures

.pilumignore
test-*
*_test
fixtures

Notes

  • Patterns are matched against the path relative to project root
  • Both directories and pilum.yaml files are checked against patterns
  • Ignored directories are skipped entirely (not traversed)
  • The file must be named exactly .pilumignore at the project root

Next Steps