Source: https://crabglamp.com/docs/glamphub/how-to/add-a-glampignore
Last updated: 2026-06-09
Type: how-to

`.glampignore` is the equivalent of `.gitignore` for the publisher. Without one, every file under your home directory ends up in the tarball.

## Where to put it

```sh
cd ~
nano .glampignore
```

The file lives at the staging root. Sub-directories can also have their own `.glampignore` files; rules are merged with `.gitignore`-style precedence.

## Starter patterns

```text
# Dev artifacts
node_modules/
.venv/
__pycache__/
*.pyc
.next/
dist/
build/

# Editor and OS noise
.vscode/
.idea/
.DS_Store
Thumbs.db

# Credentials — anything that might be sensitive
.env
.env.*
**/id_rsa*
**/id_ed25519
**/id_ed25519
**/secrets/
*.pem
*.key
**/credentials.json

# Large local data
data/raw/
**/*.parquet
**/*.csv
**/*.sqlite
.cache/
```

Negation works with `!`:

```text
data/
!data/keep-this-fixture.json
```

## Test before publishing

```sh
crabglamp glamp stage
```

The staging report prints the file count, total bytes, per-extension breakdown, and a credential-warnings list. If a sensitive path is still listed, add it to `.glampignore` and re-stage. Keep iterating until the staging report looks clean.

## Hard limits

- **Maximum compressed tarball size: 500 MB.** The publisher fails up front if the staging exceeds this. Add aggressive exclusions for build outputs and raw data.
- **Per-file size: no individual limit at v1.** Pragmatically, files over 100 MB will dominate the tarball and slow down adoption.
