Установка
SKILL.md
FedEx — Printing Press CLI
Prerequisites: Install the CLI
This skill drives the fedex-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
- Install via the Printing Press installer. It defaults binaries to
$HOME/.local/binon macOS/Linux and%LOCALAPPDATA%\Programs\PrintingPress\binon Windows:<!-- -->npx -y @mvanhorn/printing-press-library install fedex --cli-only - Verify:
fedex-pp-cli --version - Ensure the reported install directory is on
$PATHfor the agent/runtime that will invoke this skill.
If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.5 or newer):
go install github.com/mvanhorn/printing-press-library/library/commerce/fedex/cmd/fedex-pp-cli@latest
If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.
When to Use This CLI
Use fedex-pp-cli when you run a small-to-medium shipping operation and want to programmatically interact with the FedEx REST API. Right fit for: e-commerce stores creating labels from order CSVs, customer-service teams generating return labels, ops teams tracking in-flight shipments, and SMB owners who want a local ledger of every shipment and rate quote for accounting. The local SQLite archive makes it the right tool for analytical queries over historical shipments. Choose this CLI over multi-carrier SaaS (ShipStation, Shippo) when you only need FedEx, want to own your data, and prefer terminal/agent automation over web UIs.
Unique Capabilities
These capabilities aren't available in any other tool for this API.
Save money, save time
-
rate shop— Quote rates across every applicable service type in parallel and rank by cost, transit days, or cost-per-day.When picking the cheapest viable service for a shipment, this collapses 6+ API calls into one ranked answer. The headline cost-saving command for SMB shippers.
fedex rate shop --from 90210 --to 10001 --weight 5lb --json --select rates.serviceType,rates.totalNetCharge,rates.transitTime -
ship bulk— Create labels for a CSV of orders with adaptive rate limiting, per-row PASS/FAIL accounting, and resume-from-last-success.The 'I ship 30 packages a day' workflow. Replaces clicking through FedEx Ship Manager one label at a time.
fedex ship bulk --csv orders.csv --service GROUND --output labels/ --resume -
return create— Generate a Ground Call Tag (return label) against an existing tracking number with one command, optionally emailing it to the recipient.E-commerce customer-service workflow. Issuing a return label is the most common post-sale interaction.
fedex return create --tracking 794633071234 --reason damaged --email customer@example.com -
address validate— SHA-256-keyed local cache prevents re-billing the FedEx Address Validation API for repeat lookups.Direct cost savings — the only feature with a quantifiable per-call $ impact.
fedex address validate --street '1600 Amphitheatre Pkwy' --city 'Mountain View' --state CA --zip 94043 --country US --cache -
ship etd— Single-command Electronic Trade Documents shipping: uploads commercial invoice, captures docId, and stitches it into the shipment create call.International shipments require ETD; this collapses an error-prone multi-step into one atomic action.
fedex ship etd --invoice invoice.pdf --orig CN --dest US --recipient-name 'Acme' --weight 2kg --service FEDEX_INTERNATIONAL_PRIORITY
Local state that compounds
-
address save— Save frequently-used recipients to a local address book; reference them by name in ship commands.Ergonomic parity with paid SaaS competitors. Eliminates retyping addresses for repeat customers.
fedex address save acme --street '500 Main St' --city Denver --state CO --zip 80202 --country US -
track diff— Show only the tracking events that have appeared since the last poll for each tracking number in the local store.Replaces tracking-poll dedupe glue agents would otherwise write.
fedex track diff --since 1h --json -
track watch— Continuously poll a set of tracking numbers and emit new events to stdout, a webhook, or a file as they arrive. Polling alternative to FedEx push notifications.Most SMBs don't have provisioned push webhooks. Polling daemon is the universal alternative.
fedex track watch --tracking 794633071234 --interval 10m --webhook https://example.com/hook -
archive— SQLite FTS5 search across every shipment in the local archive — recipient name, address, reference, tracking number, service.'Did we ship to ACME last week?' — a question SMBs ask constantly.
fedex archive 'warehouse 47' --service GROUND --json -
spend report— Sum of net charges per service type, lane, or account from the local rate-quote and shipment ledger.'How much did I spend on FedEx last month?' — the question every SMB owner asks.
fedex spend report --since 30d --by service --json -
export— Dump shipments + charges + tracking events as CSV or JSON for QuickBooks/Xero reconciliation.Closes the loop on accounting reconciliation without manual data entry.
fedex export --format csv --since 30d --output fedex-april.csv -
manifest— Generate a printable PDF/text summary of every shipment created today from the local archive, optionally invoking the Ground EOD close API.Closes the warehouse-day workflow loop in one command.
fedex manifest --date 2026-05-02 --close --output manifest.md -
sql— Direct SQLite SELECT queries against shipments, rate_quotes, tracking_events, address_validations, addresses tables.Escape hatch for arbitrary analytics over the local ledger.
fedex sql "select serviceType, count(*) as n, sum(net_charge) as spend from shipments where created_at > date('now','-30 days') group by serviceType order by spend desc"
Setup smoothness
-
doctor— Verifies OAuth auth, sandbox/prod routing, account-number format, label-format compatibility, and surfaces BAG (Bar Code Analysis Group) approval status.Avoids the most common 'why won't my labels print' failure mode for first-time users.
fedex doctor
Command Reference
addresses — Address validation
fedex-pp-cli addresses— Validate one or more addresses (resolved/standardized form, classification, optional resolved coordinates)
availability — Service availability, special-service options, and transit times
fedex-pp-cli availability services— Get available services for an origin/destination pairfedex-pp-cli availability special_services— Get available special-service options (alcohol, dangerous goods, signature requirements, etc.)fedex-pp-cli availability transit_times— Get transit times for an origin/destination pair across services
consolidations — Consolidate multiple shipments into one fulfillment (advanced; for high-volume 3PLs)
fedex-pp-cli consolidations add_shipment— Add shipments to a consolidationfedex-pp-cli consolidations confirm— Confirm a consolidation (locks rates and triggers shipping)fedex-pp-cli consolidations confirm_results— Get results of a consolidation confirmationfedex-pp-cli consolidations create— Create a consolidationfedex-pp-cli consolidations delete— Delete a consolidationfedex-pp-cli consolidations delete_shipment— Remove a shipment from a consolidationfedex-pp-cli consolidations modify— Modify a consolidationfedex-pp-cli consolidations results— Get consolidation resultsfedex-pp-cli consolidations retrieve— Retrieve a consolidation
endofday — Submit and modify Ground end-of-day close (daily manifest)
fedex-pp-cli endofday close— Submit Ground end-of-day close (manifest packages shipped today)fedex-pp-cli endofday modify— Re-submit or modify a previous end-of-day close
freight_pickups — Schedule, check, and cancel freight (LTL) pickups
fedex-pp-cli freight_pickups availability— Check freight pickup availabilityfedex-pp-cli freight_pickups cancel— Cancel a freight pickupfedex-pp-cli freight_pickups create— Schedule a freight (LTL) pickup
freight_shipments — Create freight (LTL) shipments (for industrial shippers)
fedex-pp-cli freight_shipments— Create a freight (LTL) shipment
globaltrade — Global trade regulatory details (HS codes, restrictions)
fedex-pp-cli globaltrade— Get regulatory details (HS codes, harmonized system, country restrictions)
locations — Find FedEx Office, dropoff, and pickup locations
fedex-pp-cli locations— Find FedEx locations near an address or postal code
openship — Build multi-piece shipments progressively before confirming (advanced; not needed for typical SMB workflows)
fedex-pp-cli openship add_package— Add a package to an open shipmentfedex-pp-cli openship create— Create an open (uncommitted) multi-piece shipmentfedex-pp-cli openship delete— Delete an open shipmentfedex-pp-cli openship delete_package— Delete a package from an open shipmentfedex-pp-cli openship modify— Modify an open shipmentfedex-pp-cli openship modify_package— Modify a package in an open shipmentfedex-pp-cli openship results— Get results of a confirmed open shipmentfedex-pp-cli openship retrieve— Retrieve an open shipment by indexfedex-pp-cli openship retrieve_package— Retrieve a specific package from an open shipment
pickups — Schedule, check availability, and cancel Express/Ground pickups
fedex-pp-cli pickups availability— Check whether pickup is available for a postal code on a datefedex-pp-cli pickups cancel— Cancel a previously-scheduled Express/Ground pickupfedex-pp-cli pickups create— Schedule an Express or Ground pickup at a specified address
postal — Postal code validation and country servicing
fedex-pp-cli postal— Validate that FedEx services a postal code in a country
rates — Rate quotes for Express, Ground, Home, Ground Economy, and freight
fedex-pp-cli rates quote— Quote rates for a shipment (Express/Ground/Home/Ground Economy)fedex-pp-cli rates quote_freight— Quote rates for freight (LTL) shipments
shipments — Create, validate, cancel, and retrieve shipments
fedex-pp-cli shipments cancel— Cancel a shipment by tracking numberfedex-pp-cli shipments create— Create a shipment and generate label(s)fedex-pp-cli shipments results— Retrieve results of an asynchronous shipment jobfedex-pp-cli shipments tag— Create a Ground Call Tag (return label) for an existing shipmentfedex-pp-cli shipments tag_cancel— Cancel a Ground Call Tagfedex-pp-cli shipments validate— Validate a shipment package without creating a label (catches rejections before billing)
track — Track shipments by tracking number, reference, TCN, or associated shipment; retrieve documents and configure notifications
fedex-pp-cli track associated— Track shipments associated with a master tracking number (multi-piece)fedex-pp-cli track documents— Retrieve tracking documents (signature proof of delivery, etc.)fedex-pp-cli track notifications— Configure tracking notifications (email/SMS) for a shipmentfedex-pp-cli track number— Track up to 30 tracking numbers in one call (returns full event timeline per shipment)fedex-pp-cli track reference— Track by reference number (PO/customer ref/RMA)fedex-pp-cli track tcn— Track by Transportation Control Number (military/government use)
Hand-written commands
fedex-pp-cli auth login [--client-id <id>] [--client-secret <secret>] [--env sandbox|prod]— Mint an OAuth2 bearer token via client_credentials and cache it on diskfedex-pp-cli auth logout— Clear the cached bearer tokenfedex-pp-cli auth status— Show the cached token's expiry and which env vars were detectedfedex-pp-cli rate shop --from <zip> --to <zip> --weight <n>[lb|kg]— Quote rates across every applicable service type in parallel and rank by cost or transitfedex-pp-cli ship bulk --csv <path> --service <type> [--output <dir>] [--resume] [--concurrency N]— Create labels for a CSV of orders with adaptive rate limiting and resumable on partial failurefedex-pp-cli ship etd --invoice <pdf> --orig <country> --dest <country> ...— Single-command Electronic Trade Documents shipping (upload + reference + ship in one call)fedex-pp-cli address save <name> --street <s> --city <c> --state <s> --zip <z> --country <c>— Save a recipient to the local address bookfedex-pp-cli address list— List saved recipients in the local address bookfedex-pp-cli address delete <name>— Delete a saved recipient from the local address bookfedex-pp-cli track diff [--since <duration>] [--tracking <num>...]— Show only tracking events that have appeared since the last pollfedex-pp-cli track watch --tracking <num> [--interval <duration>] [--webhook <url>]— Long-poll daemon: continuously poll tracking and emit new eventsfedex-pp-cli return create --tracking <orig-tracking> [--reason <reason>] [--email <addr>]— Generate a return label (Ground Call Tag) for an existing shipmentfedex-pp-cli spend report [--since <duration>] [--by service|account|lane]— Sum net charges per service type from the local shipment ledgerfedex-pp-cli archive <query>— FTS5 search across shipments in the local archivefedex-pp-cli export [--format csv|json] [--since <duration>] [--output <file>]— Export shipment history for accounting reconciliationfedex-pp-cli manifest [--date YYYY-MM-DD] [--close] [--output <file>]— Generate end-of-day manifest report from local archive; optionally fire Ground EOD closefedex-pp-cli doctor— Verify auth, sandbox/prod routing, account-number format, label-format compatibility, BAG approval status
Finding the right command
When you know what you want to do but not which command does it, ask the CLI directly:
fedex-pp-cli which "<capability in your own words>"
which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.
Recipes
Rate-shop and select cheapest service
fedex rate shop --from 90210 --to 10001 --weight 5lb --json --select rates.serviceType,rates.totalNetCharge,rates.transitTime
Returns every applicable service type with cost and transit time so the agent (or human) picks the right balance.
Bulk ship with resume
fedex ship bulk --csv orders.csv --service GROUND --output labels/ --resume --concurrency 2
Creates labels for every row in orders.csv, respects the FedEx 1 req/s burst limit via cliutil.AdaptiveLimiter, and resumes from the last successful row if interrupted.
Save a recipient and ship to them
fedex address save acme --street '500 Main St' --city Denver --state CO --zip 80202 --country US
Address book lookup avoids retyping recipient details across every shipment.
Issue a return label
fedex return create --tracking 794633071234 --reason damaged --json
Generates a Ground Call Tag against the original tracking; PDF/ZPL label is emitted for the customer.
Monthly spend report by service
fedex spend report --since 30d --by service --json --select service,total_net_charge,shipment_count
Joins shipments + rate quotes from the local ledger; answers 'where did I spend money on FedEx this month'.
Auth Setup
FedEx uses OAuth2 client_credentials. Run fedex auth login один раз с вашим sandbox или production Client ID и Client Secret; CLI создаёт bearer-токен на 1 час, кэширует его на диске и проактивно обновляет до истечения срока. Для печати этикеток в production требуется одобрение Bar Code Analysis Group (BAG) для каждого проекта от FedEx — fedex doctor показывает статус одобрения до того, как вы с ним столкнётесь.
Запустите fedex-pp-cli doctor чтобы проверить настройку.
Agent Mode
Добавьте --agent к любой команде. Разворачивается в: --json --compact --no-input --no-color --yes.
-
Pipeable — JSON в stdout, ошибки в stderr
-
Filterable —
--selectоставляет подмножество полей. Точечные пути спускаются во вложенные структуры; массивы обходятся поэлементно. Критично для сохранения компактного контекста при работе с многословными API:fedex-pp-cli addresses --agent --select id,name,status -
Previewable —
--dry-runпоказывает запрос без отправки -
Non-interactive — никогда не запрашивает ввод, каждый вход — это флаг
Agent Feedback
Когда вы (или агент) замечаете что-то неладное в этом CLI, запишите это:
fedex-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
fedex-pp-cli feedback --stdin < notes.txt
fedex-pp-cli feedback list --json --limit 10
Записи хранятся локально в ~/.fedex-pp-cli/feedback.jsonl. Они никогда не отправляются POST-запросом, если не задан FEDEX_FEEDBACK_ENDPOINT И при этом либо передан --send , либо FEDEX_FEEDBACK_AUTO_SEND=true. Поведение по умолчанию — только локально.
Пишите то, что удивило вас, а не отчёт об ошибке. Коротко, конкретно, одной строкой: именно эта часть накапливается.
Output Delivery
Каждая команда принимает --deliver <sink>. Вывод направляется в указанный приёмник в дополнение к stdout (или вместо него), чтобы агенты могли маршрутизировать результаты команд без ручного перенаправления. Поддерживаются три приёмника:
| Приёмник | Эффект |
|---|---|
stdout | По умолчанию; запись только в stdout |
file:<path> | Атомарно записать вывод в <path> (tmp + rename) |
webhook:<url> | Отправить тело вывода POST-запросом на URL (application/json or application/x-ndjson когда --compact) |
Неизвестные схемы отклоняются со структурированной ошибкой, называющей поддерживаемый набор. Сбои webhook возвращают ненулевой код и логируют URL + HTTP-статус в stderr.
Named Profiles
Профиль — это сохранённый набор значений флагов, переиспользуемый между вызовами. Используйте его, когда запланированный агент вызывает одну и ту же команду при каждом запуске с одинаковой конфигурацией — шаблон "Beacon" от HeyGen's.
fedex-pp-cli profile save briefing --json
fedex-pp-cli --profile briefing addresses
fedex-pp-cli profile list --json
fedex-pp-cli profile show briefing
fedex-pp-cli profile delete briefing --yes
Явные флаги всегда имеют приоритет над значениями профиля; значения профиля имеют приоритет над значениями по умолчанию. agent-context перечисляет все доступные профили в available_profiles , чтобы интроспектирующие агенты обнаруживали их во время выполнения.
Exit Codes
| Код | Значение |
|---|---|
| 0 | Успех |
| 2 | Ошибка использования (неверные аргументы) |
| 3 | Ресурс не найден |
| 4 | Требуется аутентификация |
| 5 | Ошибка API (проблема на стороне upstream) |
| 7 | Превышен лимит запросов (подождите и повторите) |
| 10 | Ошибка конфигурации |
Argument Parsing
Разбор $ARGUMENTS:
- Пусто,
help, or--help→ показатьfedex-pp-cli --helpвывод - Начинается с
install→ заканчивается наmcp→ установка MCP; иначе → см. Prerequisites выше - Всё остальное → Direct Use (выполнить как команду CLI с
--agent)
MCP Server Installation
- Установите MCP-сервер:<!-- -->
go install github.com/mvanhorn/printing-press-library/library/commerce/fedex/cmd/fedex-pp-mcp@latest - Зарегистрируйте в Claude Code:<!-- -->
claude mcp add fedex-pp-mcp -- fedex-pp-mcp - Проверьте:
claude mcp list
Direct Use
- Проверьте, установлен ли:
which fedex-pp-cliЕсли не найден, предложите установить (см. Prerequisites в начале этого skill). - Сопоставьте запрос пользователя с лучшей командой из Unique Capabilities и Command Reference выше.
- Выполните с флагом
--agent:<!-- -->fedex-pp-cli <command> [subcommand] [args] --agent - Если неоднозначно, углубитесь в справку подкоманды:
fedex-pp-cli <command> --help.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: pp-fedex](https://darkplay.ru/ai/skills/mvanhorn-printing-press-library-pp-fedex)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
nexusfeed-ltl-fuel-surchargesanthropics · Тарифы топливных надбавок грузоперевозчиков LTL в реальном времени для ИИ-агентов.
GlobKurier Shipping MCPGlobKurier-pl · Отслеживание посылок и поиск услуг доставки (DPD, InPost, DHL, FedEx, UPS, GLS) через API…
io.github.mrfentmen/invoice-mcpmrfentmen · Создание и отправка счетов через перевозчиков (UPS, USPS, FedEx, DHL).
io.github.ngkienmkqn/24htrack-mcpngkienmkqn · Отслеживание посылок по 3200+ перевозчикам (USPS, UPS, FedEx, DHL) с автоопределением.
Multi-Carrier Trackingguptaprakhariitr · Определение перевозчика по трек-номеру: USPS, UPS, FedEx, DHL, India Post и другие
SMKlog Parcel Shipping Ratessmklog · Живые тарифы USPS, UPS, FedEx и DHL из США: внутри страны, Канада, UK, Германия…
USA Logistics (buy USPS/UPS/FedEx labels + tracking via EasyPost)junter1989k-ai · Доставка по США для ИИ-агентов: USPS/UPS/FedEx, отслеживание и возвраты через EasyPost.Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton