A fast inspector to inspect and edit files
Inspector is a simple tool that can be used to search in a directory for a given string or pattern.
Inspector is available as a composer package on packagist. Installing it is quite simple:
$ composer create-project wouterj/inspector
This is a quick documentation, advantage documentation is added during the BETA period
Inspector has just one command at this moment, called
inspect. This will
inspect a directory:
# searches for files which contains 'hello' $ php inspector.php inspect -p 'hello'
This command has multiple options:
-p): This is the pattern which you are looking for. (required)
# searches for files which contains 'foo' or 'bar' $ php inspector.php inspect -p '/(foo|bar)/'
-d): This is the directory to search in, if this is empty it will search in the current directory.
# searches in the %current_dir%/hello directory $ php inspector.php inspect -p 'foo' -d hello
-f): This can be a Regex, to determine which files should be ignored, or a name of one of the build in filters (more about this in the filters section).
# ignores all php files $ php inspector.php inspect -p 'foo' -f '*.php'
Inspector has one build-in filter at the moment. Filters provide a solution
This filter will search for a
.gitignore file in the root of the document
and ingores every file that is in there.
$ php inspector.php inspect -p 'foo' --filter gitignore
Inspector love contributors. Please, fork this repo, create a new branch, improve this code and open a PR. Inspector uses the Symfony Coding Standards
If you do not want to contribute with writing code, you can also help to review the issues/PRs.