Chevere Workflow VSCode Extension
A Visual Studio Code extension that provides autocompletion support for the Chevere Workflow PHP package.

Features
- Intelligent autocompletion for Chevere Workflow functions and methods
- Code snippets for common patterns
- Quick help command with examples
Autocompletion
The extension provides context-aware autocompletions for:
- Core Workflow functions:
workflow()
, sync()
, async()
, variable()
, response()
, run()
- Job methods:
withRunIf()
, withDepends()
Autocompletions include detailed descriptions and appropriate parameter placeholders.
Snippets
The following snippets are available:
chevere-workflow-import
: Import all Chevere Workflow functions
chevere-workflow-class
: Create a class with WorkflowTrait
chevere-workflow-try
: Add a try-catch block for workflow error handling
chevere-action
: Create a basic Chevere Action class
Command
Chevere Workflow: Show Help
: Opens a help panel with examples and documentation
Requirements
- Visual Studio Code 1.70.0 or newer
- PHP files must use the Chevere Workflow package imports for autocompletion to work
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Chevere Workflow"
- Click Install
From VSIX File
- Download the .vsix file from Releases
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click the "..." menu in the top-right of the Extensions panel
- Select "Install from VSIX..." and choose the downloaded file
Example Usage
<?php
use function Chevere\Workflow\{workflow, sync, async, variable, response, run};
// Define a workflow
$workflow = workflow(
validate: sync(
new ValidateImage(),
file: variable('file')
),
thumb: async(
new ResizeImage(),
file: variable('file'),
width: 150
),
store: sync(
new StoreFile(),
file: response('thumb', 'path')
)
);
// Run the workflow
try {
$run = run(
workflow: $workflow,
arguments: [
'file' => '/path/to/image.jpg'
]
);
$storedPath = $run->response('store')->string();
} catch (\Chevere\Workflow\Exceptions\WorkflowException $e) {
// Handle error
}
Development
Building from Source
- Clone the repository
git clone https://gitlab.com/trinavoprivate/chevere-workflow-vscode.git
cd chevere-workflow-vscode
- Install dependencies
npm install
- Run ESLint
npm run lint
- Package the extension
npm run package
License
This extension is licensed under the Apache License 2.0 - see the LICENSE file for details.
Acknowledgments
Support
If you like this extension, please consider supporting me with a coffee.
