bl store
Store a folder/file as snippet or stack
Synopsis
Section titled “Synopsis”Store a file as a snippet or directory as a stack in your Boiler store.
Files are stored as snippets with version numbers. Directories must have a boiler.stack.json config file (run 'bl init' first).
Version Management: If snippet already exists, you'll be prompted with options:
- (o) Overwrite - Replace the latest version with new content
- (n) New version - Create a new incremental version
- (c) Cancel - Abort the operation
- First-time storage automatically creates version 1
Stacks require boiler.stack.json with:
- id: Stack name
- version: Version number
- ignore: Patterns to exclude
If a stack version already exists, you'll be prompted to overwrite.
Use --command (or --cmd) to store a .bl script in the global commands directory
(~/.boiler/commands/) so it can be run with 'bl new <script_name>'.
bl store [path] [flags]Examples
Section titled “Examples” # Store current directory as stack bl store
# Store specific file as snippet (first version) bl store ./utils/logger.js # Output: ✓ Stored snippet 'logger@1.js'
# Store again - prompts for action bl store ./utils/logger.js # Prompt: Snippet 'logger' already exists (1 version(s)). Options: # (o) Overwrite latest version (1) # (n) Create new version (2) # (c) Cancel
# Store directory as stack bl store ./my-template
# Store with custom name bl store ./config.js --name dbConfig.js
# Store a .bl script as a runnable command bl store ./route.bl --commandOptions
Section titled “Options” --cmd Alias for --command --command Store .bl file in the global commands directory (~/.boiler/commands/) -h, --help help for store -m, --name string Name for the resource (auto-detected from path if not provided) -n, --snippet Force store as snippet -k, --stack Force store as stackOptions inherited from parent commands
Section titled “Options inherited from parent commands” --global Force global scope for this command --local Force local scope for this command -V, --verbose Enable verbose debug output