AlphaLoops Freight CLI — command-line interface for FMCSA carrier data
Project description
AlphaLoops Freight CLI
Command-line interface for the AlphaLoops FMCSA API. Look up carriers, fleet data, inspections, crashes, and contacts from your terminal.
Built on the AlphaLoops Freight SDK.
Installation
pip install alphaloops-freight-cli
Authentication
# Option 1: Save your key
al login ak_your_key_here
# Option 2: Environment variable
export ALPHALOOPS_API_KEY=ak_your_key_here
# Option 3: Pass it directly
al --api-key ak_... carriers get 2247505
Get your API key at runalphaloops.com.
Usage
Carrier Profiles
# Look up by DOT number
al carriers get 2247505
# Look up by MC number
al carriers mc 624748
# Field projection
al carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Fuzzy search
al carriers search "Swift Transportation"
al carriers search "JB Hunt" --state AR --limit 5
# Authority history
al carriers authority 2247505
# News
al carriers news 2247505 --start-date 2025-01-01
Fleet Data
al fleet trucks 2247505
al fleet trucks 2247505 --limit 200
al fleet trailers 2247505
Inspections
al inspections list 2247505
al inspections violations INS-12345
Crashes
al crashes list 2247505
al crashes list 2247505 --severity FATAL --start-date 2024-01-01
Contacts
# Search for people
al contacts search --dot 2247505
al contacts search --company "Swift" --levels c_suite,vp
# Enrich a contact (1 credit)
al contacts enrich contact_id_here
JSON Output
Every command supports --json for machine-readable output:
al --json carriers get 2247505
al --json carriers search "Swift" | jq '.results[].legal_name'
al --json fleet trucks 2247505 | jq '.results | length'
This makes the CLI agent-friendly — pipe to jq, feed into scripts, or use from AI agents.
Examples
# Find a carrier and get their fleet size
al carriers search "Werner Enterprises" --limit 1
al carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Get all fatal crashes for a carrier
al --json crashes list 2247505 --severity FATAL | jq '.results[]'
# Find C-suite contacts and enrich them
al --json contacts search --dot 2247505 --levels c_suite | jq '.results[].name'
al contacts enrich abc123
# Pipeline: search → get details → get fleet
DOT=$(al --json carriers search "Swift" | jq -r '.results[0].dot_number')
al carriers get "$DOT"
al fleet trucks "$DOT"
All Commands
| Command | Description |
|---|---|
al login <key> |
Save API key to ~/.alphaloops |
al carriers get <dot> |
Carrier profile by DOT number |
al carriers mc <mc> |
Carrier profile by MC number |
al carriers search <name> |
Fuzzy search carriers |
al carriers authority <dot> |
Authority history |
al carriers news <dot> |
News and press mentions |
al fleet trucks <dot> |
Registered trucks |
al fleet trailers <dot> |
Registered trailers |
al inspections list <dot> |
Roadside inspections |
al inspections violations <id> |
Violations for an inspection |
al crashes list <dot> |
Crash history |
al contacts search |
Find contacts at a carrier |
al contacts enrich <id> |
Enrich a contact (email, phone) |
API Documentation
Full API reference: runalphaloops.com/fmcsa-api/docs
License
MIT — see LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alphaloops_freight_cli-0.1.0.tar.gz.
File metadata
- Download URL: alphaloops_freight_cli-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a3e503f3686cea423a01be2c39eb15c3ff2c4244d120845075862c372cfdbf4
|
|
| MD5 |
773f71041f9226a921ebb6b27984022d
|
|
| BLAKE2b-256 |
8f05d96f631c200b2e1fb388223ff2cd8f0bbc061b2537fa04a67eef060ab528
|
Provenance
The following attestation bundles were made for alphaloops_freight_cli-0.1.0.tar.gz:
Publisher:
publish.yml on RunAlphaLoop/freight-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphaloops_freight_cli-0.1.0.tar.gz -
Subject digest:
5a3e503f3686cea423a01be2c39eb15c3ff2c4244d120845075862c372cfdbf4 - Sigstore transparency entry: 1075677034
- Sigstore integration time:
-
Permalink:
RunAlphaLoop/freight-cli@374a79e807e66866296e30f7397dd39997f80745 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RunAlphaLoop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@374a79e807e66866296e30f7397dd39997f80745 -
Trigger Event:
release
-
Statement type:
File details
Details for the file alphaloops_freight_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: alphaloops_freight_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0e68a63b870324decdd6dd7e2e26696ae9830a2a0b9c6d64b5d5212faf1b4e3
|
|
| MD5 |
119364dd126db0835ad6ffc6ad17ba9d
|
|
| BLAKE2b-256 |
4ab3a4e934cdb049d74030c7ebde34d334b8dfb2305036495c8ffe076ec96968
|
Provenance
The following attestation bundles were made for alphaloops_freight_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on RunAlphaLoop/freight-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphaloops_freight_cli-0.1.0-py3-none-any.whl -
Subject digest:
e0e68a63b870324decdd6dd7e2e26696ae9830a2a0b9c6d64b5d5212faf1b4e3 - Sigstore transparency entry: 1075677070
- Sigstore integration time:
-
Permalink:
RunAlphaLoop/freight-cli@374a79e807e66866296e30f7397dd39997f80745 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/RunAlphaLoop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@374a79e807e66866296e30f7397dd39997f80745 -
Trigger Event:
release
-
Statement type: