Command Line Reference¶
harp¶
HTTP Application Runtime Proxy (HARP)
The following commands are available to help you setup and run your HTTP proxy application.
harp [OPTIONS] COMMAND [ARGS]...
create¶
Creates a new project using cookiecutter.
harp create [OPTIONS] {project}
Arguments
- TEMPLATE¶
Required argument
db:create-migration¶
harp db:create-migration [OPTIONS] MESSAGE
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
Arguments
- MESSAGE¶
Required argument
db:feature¶
harp db:feature [OPTIONS] {add|remove} [FEATURES]...
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
Arguments
- OPERATION¶
Required argument
- FEATURES¶
Optional argument(s)
db:history¶
harp db:history [OPTIONS]
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
db:merge¶
harp db:merge [OPTIONS] MESSAGE [REVISIONS]...
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
Arguments
- MESSAGE¶
Required argument
- REVISIONS¶
Optional argument(s)
db:migrate¶
harp db:migrate [OPTIONS] {up|down} REVISION
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
- --reset¶
Reset the database (drop all before migrations).
Arguments
- OPERATION¶
Required argument
- REVISION¶
Required argument
db:reset¶
harp db:reset [OPTIONS]
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
examples¶
Examples related commands.
harp examples [OPTIONS] COMMAND [ARGS]...
list¶
List available examples.
harp examples list [OPTIONS]
Options
- --raw¶
Simple output without any decoration.
install-dev¶
Installs the development dependencies.
harp install-dev [OPTIONS]
rules¶
Rules engine related commands.
harp rules [OPTIONS] COMMAND [ARGS]...
lint¶
Lint the rules.
harp rules lint [OPTIONS]
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
run¶
harp rules run [OPTIONS] ENDPOINT METHOD PATH
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
Arguments
- ENDPOINT¶
Required argument
- METHOD¶
Required argument
- PATH¶
Required argument
server¶
Starts HARP server, using the provided configuration. This is the main process and will be the only process you need on a live server, it will serve both the proxy ports and the compiled frontend assets (dashboard).
harp server [OPTIONS]
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
start¶
Starts the local development environment, using honcho to spawn a configurable set of processes that you
can adapt to your needs. By default, it will starts the dashboard (frontend dev server) and server (python
server) processes. For live instances, you’ll prefer harp server.
harp start [OPTIONS] [SERVICES]...
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
- --with-docs, --no-docs¶
Append the sphinx doc process to the process list.
- --with-ui, --no-ui¶
Append the storybook process to the process list.
- --mock¶
Enable mock data instead of real api data (dashboard only).
- -XS, --server-subprocess <NAME:PORT:CMD>¶
Add a server subprocess to the list of services to start (experimental, can be used multiple times).
Arguments
- SERVICES¶
Optional argument(s)
system¶
Inspect system configuration and services.
These commands allow you to view the compiled configuration and registered services, which is useful for debugging and understanding how your HARP instance is set up.
harp system [OPTIONS] COMMAND [ARGS]...
config¶
Compiles and dumps the current configuration.
Example:
$ harp-proxy system config –file … –example … –set …
harp system config [OPTIONS]
Options
- --raw¶
Prints the raw configuration as a dictionary.
- --json¶
Prints the raw configuration as JSON.
- --unsecure¶
Prints the configuration without hiding sensitive information.
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
services¶
Prints all configured services with their dependencies and configuration.
Example:
$ harp-proxy system services –file config.yml
harp system services [OPTIONS]
Options
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- --example <examples>¶
Load configuration from example (can be used multiple times).
- --set <options>¶
Add configuration options (e.g.
--set foo=baror--set foo bar, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/, can be used multiple times).
- --applications <applications>¶
List of applications to enable.
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --strict¶
Enforce strict configuration validation (convert warnings to errors)
version¶
Show HARP version.
harp version [OPTIONS]
How to use¶
For PIP and source installs, it will be available as harp in your python environment.
For source installations, you may need to use uv run harp-proxy ….
Docker¶
For Docker installs, the harp CLI being the default command of the container you can pass arguments to the docker run command directly.
docker run -it --rm \
makersquad/harp-proxy \
server --endpoint httpbin=4000:https://httpbin.org
Python package¶
For regular python installations (for example, using pip to install it from PyPI), you’ll find the harp-proxy command in your python environment’s path, thus you’ll be able to run:
harp-proxy server --endpoint httpbin=4000:https://httpbin.org
Sources¶
For sources installations, the behaviour is similar to installing it from a packaged wheel (python package), but you may need to force using the right environment using uv.
uv run harp-proxy server --endpoint httpbin=4000:https://httpbin.org
Another way would be to activate the uv environment and run the command directly:
source .venv/bin/activate # or .venv\Scripts\activate on Windows
harp-proxy server --endpoint httpbin=4000:https://httpbin.org