Skip to content

TipsGroup/get-command-line

Repository files navigation

get-command-line

This project provides a Node.js addon written in Rust to retrieve the command line of a process by its name on Windows.

Prerequisites

Installation

  1. Install the package:
    yarn add @tipspace/get-command-line
    # or
    npm install @tipspace/get-command-line

Usage

JavaScript

const { getProcessCommandLine } = require('@tipspace/get-command-line');

try {
  const commandLine = getProcessCommandLine('LeagueClientUx.exe');
  console.log(`Command Line: ${commandLine}`);
} catch (err) {
  console.error(`Error: ${err.message}`);
}

Typescript

import { getProcessCommandLine } from '@tipspace/get-command-line';

try {
  const commandLine = getProcessCommandLine('LeagueClientUx.exe');
  console.log(`Command Line: ${commandLine}`);
} catch (err) {
  console.error(`Error: ${err.message}`);
}

Development

Building

You'll need Rust (>= 1.50.0) to build the project. To build the project, run:

yarn build
# or
npm run build

Testing

To run test, use:

yarn test
# or
npm test

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.