# command-sniffer **Repository Path**: liujianpersonal/command-sniffer ## Basic Information - **Project Name**: command-sniffer - **Description**: General process creation interceptor while running shell commands. A typical usage of this tool is to generate compilation command database from a complicated build system, e.g., Make, CMake. - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2024-11-23 - **Last Updated**: 2025-02-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # command-sniffer Command-sniffer is a python package that monitors the execution of an arbitrary shell command. It can store the sub-command it executes (e.g. compilation commands during the execution of the build command, e.g. `make`) and replay the command history. ## Install You will need to install the package before using it. ```shell cd /path/to/command_interceptor python3 -m pip install . ``` For developer installation, you can use the following command to install the package. ```shell cd /path/to/command_interceptor python3 -m pip install -e . [dev] ``` And then you can use the command `intercept` ;) # Usage ```shell sniffcmd -o db.json -c /usr/bin/ls -- bash -c "ls"` ```