New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@devx-cli/devx

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devx-cli/devx

A TypeScript-based CLI tool for project management and task execution

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

DevX CLI

A TypeScript-based CLI tool for project management and task execution.

Installation

npm install -g @devx-cli/devx

Or use it directly with npx:

npx @devx-cli/devx <command>

Features

  • 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.

Usage

Initialize a new project

devx init

This will create a .devx file in your current directory with default settings.

Run a script or task

devx run <script|task>

Validate your .devx file

devx validate

Display project information

devx info

List available scripts and tasks

devx list

.devx File Format

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

Plugin System

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');
    },
  };
}

VS Code Extension

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.

Installation

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

Features

  • 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

License

MIT

Keywords

cli

FAQs

Package last updated on 01 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts