Currently, the fromFile feature for generating executables from shell scripts only supports a limited subset of executable configuration fields via f: comments. This forces users to maintain both shell scripts and YAML configurations when they want to use advanced executable features.
Currently supported fields:
name
verb
description
tags
aliases
visibility
timeout
Proposed Enhancement
Expand the generated executable parser to support the full range of exec executable type fields, enabling complete replacement of YAML configurations with in-file comments.
Requested Fields to Add
Environment & Parameters:
f:params - Environment parameters (secretRef, prompt, text)
f:args - Command line arguments configuration
f:dir - Working directory override
Execution Control:
f:logMode - Log output format (hidden, json, logfmt, text)
Example Usage
#!/bin/bash
# f:name=deploy-app f:verb=deploy
# f:description=Deploy application to production with secrets
# f:tags=deployment,production f:aliases=prod-deploy
# f:timeout=10m f:visibility=private
# f:dir=//
# f:logMode=json
# f:params=secretRef:api-key:API_TOKEN,prompt:Environment?:ENV_NAME
# f:args=flag:dry-run:DRY_RUN:bool:false,pos:1:VERSION:string:true
echo "Deploying version $VERSION to $ENV_NAME"
if [ "$DRY_RUN" = "true" ]; then
echo "DRY RUN MODE - would deploy with token: ${API_TOKEN:0:8}..."
else
# actual deployment logic
fi
This would generate the equivalent of:
executables:
- verb: deploy
name: deploy-app
aliases: [prod-deploy]
description: Deploy application to production with secrets
tags: [deployment, production]
timeout: 10m
visibility: private
exec:
file: deploy-app.sh
dir: //
logMode: json
params:
- secretRef: api-key
envKey: API_TOKEN
- prompt: Environment?
envKey: ENV_NAME
args:
- flag: dry-run
envKey: DRY_RUN
type: bool
default: false
- pos: 1
envKey: VERSION
type: string
required: true
Currently, the
fromFilefeature for generating executables from shell scripts only supports a limited subset of executable configuration fields viaf:comments. This forces users to maintain both shell scripts and YAML configurations when they want to use advanced executable features.Currently supported fields:
nameverbdescriptiontagsaliasesvisibilitytimeoutProposed Enhancement
Expand the generated executable parser to support the full range of
execexecutable type fields, enabling complete replacement of YAML configurations with in-file comments.Requested Fields to Add
Environment & Parameters:
f:params- Environment parameters (secretRef, prompt, text)f:args- Command line arguments configurationf:dir- Working directory overrideExecution Control:
f:logMode- Log output format (hidden, json, logfmt, text)Example Usage
This would generate the equivalent of: