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
loopsh login ak_your_key_here
# Option 2: Environment variable
export ALPHALOOPS_API_KEY=ak_your_key_here
# Option 3: Pass it directly
loopsh --api-key ak_... carriers get 2247505
Get your API key at runalphaloops.com.
Usage
Carrier Profiles
# Look up by DOT number
loopsh carriers get 2247505
# Look up by MC number
loopsh carriers mc 624748
# Field projection
loopsh carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Fuzzy search
loopsh carriers search "Swift Transportation"
loopsh carriers search "JB Hunt" --state AR --limit 5
# Authority history
loopsh carriers authority 2247505
# News
loopsh carriers news 2247505 --start-date 2025-01-01
Fleet Data
loopsh fleet trucks 2247505
loopsh fleet trucks 2247505 --limit 200
loopsh fleet trailers 2247505
Inspections
loopsh inspections list 2247505
loopsh inspections violations INS-12345
Crashes
loopsh crashes list 2247505
loopsh crashes list 2247505 --severity FATAL --start-date 2024-01-01
Contacts
# Search for people
loopsh contacts search --dot 2247505
loopsh contacts search --company "Swift" --levels c_suite,vp
# Enrich a contact (1 credit)
loopsh contacts enrich contact_id_here
JSON Output
Every command supports --json for machine-readable output:
loopsh --json carriers get 2247505
loopsh --json carriers search "Swift" | jq '.results[].legal_name'
loopsh --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
loopsh carriers search "Werner Enterprises" --limit 1
loopsh carriers get 2247505 --fields legal_name,total_trucks,total_drivers
# Get all fatal crashes for a carrier
loopsh --json crashes list 2247505 --severity FATAL | jq '.results[]'
# Find C-suite contacts and enrich them
loopsh --json contacts search --dot 2247505 --levels c_suite | jq '.results[].name'
loopsh contacts enrich abc123
# Pipeline: search → get details → get fleet
DOT=$(loopsh --json carriers search "Swift" | jq -r '.results[0].dot_number')
loopsh carriers get "$DOT"
loopsh fleet trucks "$DOT"
All Commands
| Command | Description |
|---|---|
loopsh login <key> |
Save API key to ~/.alphaloops |
loopsh carriers get <dot> |
Carrier profile by DOT number |
loopsh carriers mc <mc> |
Carrier profile by MC number |
loopsh carriers search <name> |
Fuzzy search carriers |
loopsh carriers authority <dot> |
Authority history |
loopsh carriers news <dot> |
News and press mentions |
loopsh fleet trucks <dot> |
Registered trucks |
loopsh fleet trailers <dot> |
Registered trailers |
loopsh inspections list <dot> |
Roadside inspections |
loopsh inspections violations <id> |
Violations for an inspection |
loopsh crashes list <dot> |
Crash history |
loopsh contacts search |
Find contacts at a carrier |
loopsh 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.4.0.tar.gz.
File metadata
- Download URL: alphaloops_freight_cli-0.4.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
296b09bdcbeccc3826166757570941eb7f6d9b959792f29ca75541173b60cb1a
|
|
| MD5 |
49697efb06aee7d5031362e72fdceffb
|
|
| BLAKE2b-256 |
ff92d9ba35996dc063ce16fea20a72fa470cd09658e6b8d77188eed5c7bd0301
|
Provenance
The following attestation bundles were made for alphaloops_freight_cli-0.4.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.4.0.tar.gz -
Subject digest:
296b09bdcbeccc3826166757570941eb7f6d9b959792f29ca75541173b60cb1a - Sigstore transparency entry: 1082629304
- Sigstore integration time:
-
Permalink:
RunAlphaLoop/freight-cli@e6b907e266c78e93a5474d6eb1c63ad184af8b35 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/RunAlphaLoop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e6b907e266c78e93a5474d6eb1c63ad184af8b35 -
Trigger Event:
release
-
Statement type:
File details
Details for the file alphaloops_freight_cli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: alphaloops_freight_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 18.6 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 |
e12e3f0d442f8849aaae9ce5c279640c861956932484dd8d6e5aa9506a1ac4ad
|
|
| MD5 |
773dc8ddfb6fc43ebd20dffa47b8f64f
|
|
| BLAKE2b-256 |
e7b3d23671128b76c899b53560e9e499675e56010e67c3d32fa2f026f096b193
|
Provenance
The following attestation bundles were made for alphaloops_freight_cli-0.4.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.4.0-py3-none-any.whl -
Subject digest:
e12e3f0d442f8849aaae9ce5c279640c861956932484dd8d6e5aa9506a1ac4ad - Sigstore transparency entry: 1082629372
- Sigstore integration time:
-
Permalink:
RunAlphaLoop/freight-cli@e6b907e266c78e93a5474d6eb1c63ad184af8b35 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/RunAlphaLoop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e6b907e266c78e93a5474d6eb1c63ad184af8b35 -
Trigger Event:
release
-
Statement type: