Back to blog

How to Run Hellotracks From the Command Line With ht-cli

Stop Clicking, Start Scripting: A Practical Guide to Terminal-Driven Automation with the Hellotracks CLI.

Most field operations software is designed to be used through a browser. Administrators log in, navigate menus, and manage configurations through a web interface. For the vast majority of operational tasks, this works perfectly well.

For teams that want to automate operational tasks through scripts, manage Hellotracks configuration as code, integrate field operations into CI/CD pipelines, or run high-volume job creation workflows from the terminal, the browser interface becomes the constraint. Start a free trial and enable API access to begin using ht-cli today.

The Hellotracks CLI, known as ht-cli, removes that constraint.

What ht-cli Is

ht-cli is the official Hellotracks command-line interface. It provides terminal access to core Hellotracks operations: creating jobs, syncing data, optimizing routes, configuring webhooks, managing API keys, and running operational tasks from a terminal, CI runner, or AI coding agent.

The interface supports structured JSON output for scripting, dry-run previews that show what a command will execute before running it, and explicit support for AI coding environments including Codex and Claude Code. Full installation documentation is available at hellotracks.com/en/cli.

Installing ht-cli

Prerequisites: An active Hellotracks account with API access enabled. API access is turned on under Settings, then API and Integrations in the Hellotracks web dashboard. Full API reference is available in the Hellotracks API docs.

Installation via npm:

npm install -g @hellotracks/cli

Authentication: After installation, authenticate ht-cli with your Hellotracks account:

ht login

Follow the authentication prompts. Your API credentials will be stored locally for subsequent commands.

Core Commands

Creating a job:

ht jobs create --title "Inspection: 123 Main St" --location "123 Main St, City, State" --assignee worker@company.com --date 2026-07-15

Listing jobs:

ht jobs list --status pending --date 2026-07-15
Optimizing a route:

ht routes optimize --worker worker@company.com --date 2026-07-15

Configuring a webhook:

ht webhooks add --event job.completed --url https://your-endpoint.com/webhook

Managing API keys:

ht api-keys list
ht api-keys create --name "CI Pipeline Key"

Dry-Run Previews

The --dry-run flag shows exactly what a command will execute without actually running it. This is particularly valuable when building new scripts or running commands in production-adjacent environments.

ht jobs create --title "Test Job" --location "456 Oak Ave" --dry-run

The output shows the job that would be created, including all fields that would be populated, without creating anything in Hellotracks. Use this to verify script logic before executing against live operational data.

Practical Use Cases

High-volume job creation from a CSV: Read a CSV file of job locations and create Hellotracks jobs programmatically. This is significantly faster than manual creation through the web interface for operations that import job data from external sources. See how job dispatching works once jobs are created and pushed to field workers.

Daily route optimization on a schedule: Configure a cron job that runs ht-cli route optimization commands each morning for all active field workers. The optimized routes are pushed to workers' apps automatically before their shifts begin.

Webhook configuration as code: Store webhook endpoint configurations in version control alongside application code. Deploy webhook updates through the same CI/CD pipeline as code changes, ensuring that operational configuration is reviewable and reversible.

Integration with AI coding agents: The explicit support for Codex and Claude Code means that AI-assisted development workflows can include Hellotracks operational tasks. An AI agent can create jobs, configure routes, and set up webhooks based on natural language operational requirements.

How ht-cli Fits in the Integration Stack

ht-cli sits at the top of the Hellotracks integration stack. The native integrations with HubSpot, Salesforce, and Monday.com handle standard CRM-to-dispatch workflows. No-code automation via Zapier and n8n handles mid-complexity workflows. Alert webhooks and Slack routing handle event-driven notifications. ht-cli handles high-volume scripted automation, infrastructure-as-code configuration, and pipeline-integrated operational management.

For operations teams that have built out the native integrations and no-code automation layers and need to go further, ht-cli is the appropriate next step. For enterprise teams with high-frequency API requirements, see Hellotracks Enterprise.

Ready to run Hellotracks from your terminal?

Start your free 30-day trial and enable API access to begin using ht-cli.

Book a live demo to see ht-cli demonstrated alongside the full Hellotracks platform.

FAQs

1. What are the system requirements and prerequisites to install ht-cli?

To use ht-cli, you must have an active Hellotracks account with API access enabled. This can be toggled on under Settings, then API and Integrations within your web dashboard. Since the CLI is installed via npm (npm install -g @hellotracks/cli), you also need Node.js and npm set up on your machine.

2. Can I safely test automated scripts before running them against live operational data?

Yes. Every core command supports a --dry-run flag. This allows you to preview exactly what mutations or actions a command will execute (including the full layout of fields that will be populated) without making any actual changes or creating any live records in Hellotracks.

3. How does ht-cli authenticate and store my security credentials?

After installation, you run the ht login command in your terminal and follow the interactive prompts. The CLI securely stores your API credentials locally on your machine for subsequent command execution, saving you from entering credentials manually with every script call.

4. Can this command-line interface be used by AI coding assistants or automated pipelines?

Yes. The ht-cli tool explicitly supports structured machine-readable outputs (such as JSON) for seamless scripting. Additionally, it has built-in compatibility for AI-assisted development environments like Codex and Claude Code, meaning AI agents can easily parse and execute jobs, routing, or webhook updates using natural language commands.

5. How does the CLI handle automated routing for field teams?

You can automate your field dispatch logic by writing simple scripts or cron jobs around the core routing engine. For example, a morning cron job can run the ht routes optimize command for all active workers, which programmatically calculates and pushes optimized daily routes straight to the field staff's mobile apps before their shifts begin.

Start optimizing your field staff with Hellotracks

Create your free account in minutes. No credit card required.