@tipspace/get-command-line
v1.0.0
Published
This project provides a Node.js addon written in Rust to retrieve the command line of a process by its name on Windows
Downloads
2
Readme
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
- 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
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.