A TypeScript-based CLI tool for project management and task execution.
npm install -g @devx-cli/devx
Or use it directly with npx:
npx @devx-cli/devx <command>
-
Project Configuration: Manage project metadata and settings in a
.devx
file. -
Script & Task Runner: Run custom scripts and tasks defined in your
.devx
file. - Plugin System: Extend functionality with custom plugins.
- Environment Variables: Define and use environment variables in your scripts.
devx init
This will create a .devx
file in your current directory with default settings.
devx run <script|task>
devx validate
devx info
devx list
The .devx
file uses YAML format:
project:
name: "my-app"
type: "web"
language: "node"
version: "1.0.0"
scripts:
build: "npm run build"
dev: "vite"
lint: "eslint ."
tasks:
- name: "deploy"
run: "bash scripts/deploy.sh"
description: "Deploy the application to production"
env:
PORT: "3000"
NODE_ENV: "development"
plugins:
- name: "example-plugin"
path: "./plugins/example-plugin.js"
config:
enabled: true
Plugins can hook into various lifecycle events:
-
onInit
: Called when the plugin is initialized -
onRun
: Called before a script or task is run -
onValidate
: Called during validation -
onInfo
: Called when displaying project info
Example plugin:
import { DevxConfig, DevxPlugin } from '@devx-cli/devx';
export default function createPlugin(config: any): DevxPlugin {
return {
name: 'my-plugin',
onInit(config: DevxConfig) {
console.log('Plugin initialized');
},
onRun(scriptName: string, command: string) {
console.log(`Running ${scriptName}`);
},
onValidate(config: DevxConfig): string[] {
return []; // Return validation errors
},
onInfo(config: DevxConfig) {
console.log('Custom project info');
},
};
}
To enhance your experience with .devx
files in Visual Studio Code, we've created a VS Code extension that provides a custom icon for .devx
files without changing your existing file icon theme.
You can install the extension from the VS Code Marketplace:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "DevX File Icon" or look for the publisher "DevX-cli"
- Click Install
Alternatively, you can install it directly from the command line:
code --install-extension DevX-cli.devx-file-icon
Or use the built-in command in the DevX CLI:
devx install-extension
- Custom icon for
.devx
files in the VS Code file explorer - Preserves your existing file icon theme for all other files
- No configuration required - works automatically after installation
MIT