Skip to main content

Let Me Search That For You

Project description

lmstfy is an Apache2 licensed Python CLI for searching for error messages.

TODO

  • Support stdout and stderr output.

  • Filter output to only error messages.

  • Filter output to last N error messages.

Quickstart

  1. Install pipx.

  2. Then install lmstfy.

System Requirements

Python 3.6+ is required to install lmstfy. Don’t have Python 3.6 or later? See the Python 3 Installation & Setup Guide.

You also need to have pip installed on your machine for python3. Installing it varies from system to system. Consult pip’s installation instructions. Installing on Linux works best with a Linux Package Manager.

Installing via Python

$ python3 -m pip install --user pipx
$ python3 -m pipx ensurepath
$ python3 -m pipx install lmstfy

Installing via Brew

Pipx works on MacOS, Linux, and Windows.

Pipx can be installed on macOS using brew.

$ brew install pipx
$ pipx ensurepath
$ pipx install lmstfy

Tutorial

Follow the Installation steps to install lmstfy.

Running Commands

Invoke a build system using the “run” subcommand:

$ lmstfy run make
$ lmstfy run cmake
$ lmstfy run gradlew build
$ lmstfy run maven mypackage

Invoke a hot-reloading webserver using the “run” subcommand:

$ lmstfy run python3 manage.py runserver

Invoke an interpreter using the “run” subcommand:

$ lmstfy run python3

The stdin, stdout, and stderr streams are wrapped around the executed process. Signals are also passed to the subprocess.

Piping Input

Pipe output to lmstfy.

$ ./script.sh | grep -i -C 10 error | lmstfy pipe

It’s also possible to provide metadata:

$ ./script.sh | lmstfy pipe --hint language=python3

Parsing Output

Parse log files using cat:

$ lmstfy cat log.txt

Or parse log files using curl:

$ lmstfy curl https://path/to/log.txt

Or parse the output in your terminal:

CMD-a CMD-c
$ lmstfy pipe << EOF
CMD-v EOF RET

Reference

License

Copyright 2020 Grant Jenks

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmstfy-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

lmstfy-0.0.1-py2.py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page