WF is a minimalist and procedural language designed to simplify the automation of common tasks, such as building, installing, or deploying applications.
|
|
преди 1 седмица | |
|---|---|---|
| .github | преди 1 година | |
| .gitignore | преди 1 година | |
| LICENSE | преди 1 година | |
| README.md | преди 1 седмица | |
| build.sh | преди 1 година | |
| go.mod | преди 1 година | |
| go.sum | преди 1 година | |
| main.go | преди 1 седмица |
WF is a stupidly simple procedural language to automate your everyday tasks (build, install, deploy).
Write your workflows in .wf files. No complex syntax, no steep learning curve. Just simple, sequential commands.
WF shines when you split your tasks into logical blocks. Calling one workflow from another creates a beautiful, readable execution tree.
Create a deploy.wf file:
[build] # Sub-workflow: Build the app
echo "Building the application..."
run npm install
run npm run build
sync_time
[permissions] # Sub-workflow: Set correct rights
echo "Setting permissions..."
set_permissions dist/ 0777
[deploy] # Main workflow
echo "Starting deployment pipeline..."
SET ENV=production
wf build
wf permissions
notify_success "Deployment done!"
Run the main workflow:
wf deploy
WF automatically parses all .wf files in the current folder, detects the sections, and executes them top-to-bottom. Sub-workflows (wf build) will be visually indented in your terminal like a tree.
WF comes with native cross-platform commands. If a command isn't native, you can simply use run <command> to execute it via your operating system's default shell!
Native Commands:
SET VAR=value : Define an environment variable for the sessionwf <section> : Call another workflow section (creates a visual tree 🌳)copy <src> <dst> : Copy a file or directorymkdir <dir> : Create a directory (and its parents)touch <file> : Create an empty fileset_permissions <path> <mode> : Apply permissions (e.g., 0777). Applied recursively for folders.sync_time : Synchronize system clockecho <msg> : Print a simple messagedocker_compose <cmd> : Run Docker Compose (auto-detects docker compose or docker-compose)notify <msg> : Standard OS notificationnotify_success <msg> : Success OS notificationnotify_error <msg> : Error OS notificationnotify_warning <msg> : Warning OS notificationnotify_info <msg> : Info OS notificationexit : Stop the workflow immediatelySystem Commands:
run <cmd> : Execute ANY system command (e.g., run composer install, run php bin/console).WF excelle lorsque vous divisez vos tâches en blocs logiques. Appeler un workflow depuis un autre crée un arbre d'exécution propre et lisible.
Créez un fichier deploy.wf :
[build] # Sous-workflow : Build l'application
echo "Construction de l'application..."
run npm install
run npm run build
sync_time
[permissions] # Sous-workflow : Gère les droits
echo "Configuration des permissions..."
set_permissions dist/ 0777
[deploy] # Workflow principal
echo "Lancement du pipeline de déploiement..."
SET ENV=production
wf build
wf permissions
notify_success "Déploiement terminé !"
Exécutez le workflow principal :
wf deploy
WF analyse automatiquement tous les fichiers .wf, détecte les sections, et les exécute de haut en bas. Les sous-workflows (wf build) seront visuellement indentés dans votre terminal sous forme d'arborescence.
WF intègre des commandes natives multiplateformes. Si une commande n'est pas native, utilisez simplement run <commande> pour l'exécuter via le shell de votre système d'exploitation !
Commandes Natives :
SET VAR=value : Définir une variable d'environnement pour la sessionwf <section> : Appeler une autre section de workflow (crée un arbre visuel 🌳)copy <src> <dst> : Copier un fichier ou dossiermkdir <dir> : Créer un dossier (et ses parents)touch <file> : Créer un fichier videset_permissions <path> <mode> : Appliquer des droits (ex: 0777). Récursif pour les dossiers.sync_time : Synchroniser l'horloge systèmeecho <msg> : Afficher un message simpledocker_compose <cmd> : Lancer Docker Compose (détecte docker compose ou docker-compose)notify <msg> : Notification système standardnotify_success <msg> : Notification système de succèsnotify_error <msg> : Notification système d'erreurnotify_warning <msg> : Notification système d'avertissementnotify_info <msg> : Notification système d'informationexit : Arrêter le workflow immédiatementCommandes Système :
run <cmd> : Exécuter N'IMPORTE QUELLE commande système (ex: run composer install, run ls -la).AGPL-3.0. Free to use, modifications must be open-sourced under the same license.