Command Line Interface Overview
The tideways
CLI simplifies tracing PHP console scripts and
HTTP API requests for you. You can prefix any php
, curl
, http
(httpie)
or wget
command you want to trace with tideways run <app>
and it will set
local environment variables for a PHP script or arguments to send HTTP headers
with curl/wget.
Installation
The tool is currently supported on both Linux and macOS. |
On servers or machines where the package repositories for Tideways are set up,
you can install the tideways
CLI via a package manager.
apt-get install tideways-cli
dnf install tideways-cli
brew install tideways-cli
Setup
The first step to use the CLI is importing the settings for your account. Open
Commandline user settings
dialog and follow the instructions to call tideways import
.
tideways import <copy your generated token here>
[OK] Imported Settings for Tideways CLI.
You can now start profiling with 'tideways run <args>'
From here you can start profiling, create events and tracepoints.
Installation via Docker
For some use cases, like CI/CD pipelines or certain dev setups, it might be useful to install the Tideways CLI via Docker.
To install the tideways
CLI binary in your own container images you can
copy the standalone binary from the official ghcr.io/tideways/cli
image.
COPY --from=ghcr.io/tideways/cli:latest /usr/bin/tideways /usr/bin/tideways
The image can also be used directly. A valid CLI token needs to be
available in the TIDEWAYS_CLI_TOKEN
environment variable and exposed
to the container.
export TIDEWAYS_CLI_TOKEN=your_token
docker run -it --rm -e TIDEWAYS_CLI_TOKEN ghcr.io/tideways/cli list
The docker image does not contain a PHP binary and does not have access to your application source code. Certain commands might not work as expected compared to a native installation on the host system. |