The Judgment CLI is a command-line tool that allows you to manage your Judgment resources and backend infrastructure.
Detailed documentation for this CLI can also be found here.
⚠️ Make sure you have Python installed on your system before proceeding with the installation.
To install the Judgment CLI, follow these steps:
-
Clone the repository:
git clone https://github.com/JudgmentLabs/judgment-cli.git
-
Navigate to the project directory:
cd judgment-cli
-
Set up a fresh Python virtual environment:
Choose one of the following methods:
Built-In venv
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
pipenv
pipenv shell
uv
uv venv source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
-
Install the package:
Built-In
pip install -e .
pipenv
pipenv install -e .
uv
uv pip install -e .
To verify that the CLI was installed correctly, run:
judgment --help
You should see a list of available commands and their descriptions.
The Judgment CLI provides the following commands:
Command | Description |
---|---|
judgment self-host main |
Deploy a self-hosted instance of Judgment (and optionally set up the HTTPS listener) |
judgment self-host https-listener |
Set up the HTTPS listener for a self-hosted Judgment instance |
⚠️ If you are setting up self-hosting for the first time, please read the self-hosting documentation here before you get started with this section!
⚠️ Make sure the Judgment CLI is installed before proceeding.
Please refer to the Installation section above for more information.
⚠️ Do not delete.tfstate
files generated during setup. They are used by Terraform to track the state of deployed infrastructure.
The self-host
command is used to deploy and manage your own self-hosted instance of Judgment.
self-host main
deploys a Supabase project and the Judgment AWS infrastructure.self-host https-listener
configures an HTTPS listener for your self-hosted Judgment instance and is only needed if you skip the listener setup in themain
command.
To see usage information, run:
judgment self-host --help
judgment self-host main --help
judgment self-host https-listener --help
⚠️ Before proceeding, ensure you have:
- An empty AWS account registered with us
- An Osiris API key (optional, for evaluations)
- A valid email address and app password (for sending invites)
- A Supabase account and organization with admin access
As mentioned above, please read and follow the documentation here if any of the above aren't set up.
Install the AWS CLI:
macOS
brew install awscli
Windows
Download and run the installer from AWS CLI MSI
Linux
sudo apt install awscli
After installation, configure your local environment with the relevant AWS credentials:
aws configure
Terraform is required for AWS infrastructure deployment.
macOS
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
Windows
choco install terraform
Linux
Follow: Terraform Install Guide
- Create a
creds.json
file with the following structure:
{
"supabase_token": "your_supabase_personal_access_token_here",
"org_id": "your_supabase_organization_id_here",
"db_password": "your_desired_supabase_database_password_here",
"invitation_sender_email": "email_address_to_send_org_invitations_from",
"invitation_sender_app_password": "app_password_for_invitation_sender_email",
"osiris_api_key": "your_osiris_api_key_here (optional)",
"openai_api_key": "your_openai_api_key_here (optional)",
"togetherai_api_key": "your_togetherai_api_key_here (optional)",
"anthropic_api_key": "your_anthropic_api_key_here (optional)"
}
supabase_token
: Use an existing one or generate a new one here
org_id
: Extract this from the URL of your Supabase dashboard (make sure you have the correct organization selected in the top left corner). For example, if your organization URL ishttps://supabase.com/dashboard/org/uwqswwrmmkxgrkfjkdex
, then yourorg_id
isuwqswwrmmkxgrkfjkdex
db_password
can be any password of your choice. It is necessary for creating the Supabase project and can be used later to directly connect to the project database
invitation_sender_email
andinvitation_sender_app_password
are required because the only way to add users to the self-hosted Judgment instance is via email invitations
💡 The four LLM API keys are optional. If you are not planning to run evaluations with the models that require any of these API keys, you do not need to specify them.
- Run the main self-host command. The command syntax is:
judgment self-host main [OPTIONS]
Required options:
--root-judgment-email
or-e
: Email address for the root Judgment user--root-judgment-password
or-p
: Password for the root Judgment user--domain-name
or-d
: Domain name to request SSL certificate for (make sure you own this domain)
Optional options:
⚠️ Supabase free tier only supportsnano
for--supabase-compute-size
. Larger sizes require a paid plan.
--creds-file
or-c
: Path to credentials file (default: creds.json)--supabase-compute-size
or-s
: Size of the Supabase compute instance (default: small)- Available sizes: nano, micro, small, medium, large, xlarge, 2xlarge, 4xlarge, 8xlarge, 12xlarge, 16xlarge
--invitation-email-service
or-i
: Email service for sending organization invitations (default: gmail)- Available services: gmail, outlook, yahoo, zoho, fastmail
Example usage:
judgment self-host main \
--root-judgment-email [email protected] \
--root-judgment-password password \
--domain-name api.example.com \
--creds-file creds.json \
--supabase-compute-size nano \
--invitation-email-service gmail
What this command does:
- Creates a new Supabase project
- Sets up the root Judgment user
- Deploys AWS infrastructure
- Connects AWS services to Supabase
- Requests an SSL certificate
- Optionally configures the HTTPS listener
📘 For SSL, you'll be given two DNS records to manually add to your DNS registrar.
🕒 After steps 1-5, you will be prompted to either continue with the HTTPS listener setup now or to come back later. If you choose to proceed with the setup now, the program will wait for the certificate to be issued before continuing.
⚠️ This step is optional; you can choose to have the HTTPS listener setup done as part of the main self-host command.
⚠️ This command will only work afterjudgment self-host main
has already been run AND the ACM certificate has been issued. To accomplish this:
- Add the two DNS records returned by the main self-host command to your DNS registrar/service
- Monitor the ACM console here until the certificate has status ‘Issued’
After your ACM SSL certificate has been issued, set up the HTTPS listener by running the following:
judgment self-host https-listener
This command:
- Sets up an HTTPS listener with your ACM-issued SSL certificate
- Returns the final HTTPS endpoint of your self-hosted Judgment server