boxlang-runtime-cli-scripting

Orchestrate BoxLang CLI workflows with argument parsing and REPL usage.

16|78|Updated Nov 28, 2014
One-click install
npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-runtime-cli-scripting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-runtime-cli-scripting
Source: https://github.com/ortus-docs/coldbox-docs/tree/main/.agents/skills/boxlang-runtime-cli-scripting
Command: npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-runtime-cli-scripting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang CLI scripting unifies building robust command-line tools by providing a structured approach to argument parsing, REPL interaction, and action-driven workflows.

Core Features & Use Cases

  • Argument parsing with CLIGetArgs() to consistently access options and positionals
  • Interactive REPL support for exploratory development and debugging
  • Running actions (compile, cftranspile, featureaudit, schedule) from the CLI
  • Runtime detection and environment awareness via server.boxlang and server.cli
  • Simple, executable scripts with shebang support and main() entry points

Quick Start

Create a BoxLang CLI script (for example, MyApp.bxs) with a main() entry point and run it via boxlang to parse arguments and execute a basic workflow

Frequently Asked Questions about boxlang-runtime-cli-scripting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse command-line arguments in BoxLang scripts?

You parse command-line arguments in BoxLang scripts using the CLIGetArgs() helper, which provides reliable access to incoming options and positional parameters. This allows developers to consistently manage inputs within a main() entry point.

What is the best way to build interactive automation scripts with BoxLang?

The best way to build interactive automation scripts with BoxLang is by defining a main() entry point and using the CLIRead helper for REPL interaction. This structure supports exploratory development, debugging, and action-driven workflows directly from the command line.

Can I execute runtime actions like compile and schedule from the BoxLang command line?

Yes, you can execute runtime actions like compile, cftranspile, featureaudit, and schedule directly from the BoxLang command line. The CLI orchestrates these workflows using built-in helpers and runtime awareness via server.boxlang.

Does BoxLang CLI scripting support executable scripts with shebang support?

BoxLang CLI scripting supports simple, executable scripts with shebang support and main() entry points. Developers can create .bxs files and run them directly via the boxlang command to execute workflows without additional boilerplate.

How do I detect the runtime environment in a BoxLang CLI script?

You detect the runtime environment in a BoxLang CLI script by checking server.boxlang and server.cli. This environment awareness allows your automation scripts and tests to adapt behavior across local development and deployment contexts.