CLI Documentation

Costruisci più velocemente con Source Parts CLI

Installa, autentica e automatizza l'intero flusso di lavoro di approvvigionamento con il nostro toolkit della riga di comando incentrato sui componenti.

Installa la CLI per il tuo ambiente

Usa un comando per installare su macOS, Linux o Windows e autenticarti con Source Parts.

Copy a command to get started
Choose your operating system
Run the command in your terminal and follow the prompts to authenticate with Source Parts.
curl -fsSL https://source.parts/cli/install.sh | bash

Need a different platform? Visit the GitHub repository for container images and build instructions.

Autenticati in pochi minuti

Applica gli stessi standard di sicurezza utilizzati su tutta la piattaforma Source Parts.

Genera chiavi API con ambito
Emetti chiavi per ambiente con autorizzazioni basate sui ruoli e scadenza automatica.
Assegna ambiti con privilegi minimi
Mappa i profili CLI ai ruoli di Source Parts per controllare l'accesso in lettura, scrittura e approvazione.
Automatizza la rotazione delle chiavi
Ruota le credenziali secondo una pianificazione utilizzando comandi di rinnovo integrati e promemoria di policy.

Riferimento comandi

Esplora le famiglie di comandi principali che alimentano i flussi di lavoro di approvvigionamento, preventivi ed evasione.

Ricerca e intelligenza
Interroga milioni di componenti, analizza il rischio del ciclo di vita ed esporta istantanee di prezzo.
CLI

components search

Search the Source Parts catalog with filters for stock, manufacturer, compliance, and lifecycle status.

parts components search --query "stm32f4" --in-stock

components lifecycle

Inspect lifecycle events, alternates, and risk signals for critical components.

parts components lifecycle --mpn ESP32-C3

inventory availability

Return regional inventory, lead times, and allocation windows in real time.

parts inventory availability --sku 100-443-ESP32 --region us
Preventivi e commercio
Automatizza i preventivi, i caricamenti di distinte base e i flussi di lavoro degli ordini di acquisto.
CLI

quotes create

Upload BOM files, apply pricing tiers, and generate shareable quotes.

parts quotes create --file ./bom.csv --customer-id 98213

orders submit

Convert approved quotes to orders with payment terms and shipment preferences.

parts orders submit --quote Q-14233 --method net-30

fulfillment track

Monitor fulfillment milestones, logistics updates, and delivery ETA.

parts fulfillment track --order SO-55821
Automazione e integrazioni
Collega la CLI a pipeline CI, schedulatori e sistemi a valle.
CLI

automation workflows run

Execute saved workflows that bundle multiple commands with approvals and notifications.

parts automation workflows run nightly-replenishment

integrations sync

Synchronize Source Parts data with ERP, PLM, or data warehouses.

parts integrations sync --target erp

audit log export

Export command history with user, timestamp, and result metadata for compliance review.

parts audit log export --since 7d --format csv

Ricette di automazione

Avvia i tuoi flussi di lavoro con esempi pronti all'uso che puoi adattare al tuo ambiente.

Monitor lifecycle risk
Schedule a job that flags lifecycle changes and sends alerts to Slack.
parts components lifecycle --mpn $1 --json | jq '.alerts[]' | slackctl send --channel sourcing-alerts
Sync BOM alternates
Update engineering alternates nightly and persist results to your PLM.
parts quotes bom-sync --project ${PROJECT_ID} | plmctl import --workspace hardware
Gate releases in CI
Fail builds when BOM risk exceeds tolerance before merging to main.
parts automation evaluate --workflow ci-bom-check || exit 1

Configura una volta, riutilizza ovunque

I profili consentono ai team di condividere connessioni mantenendo i segreti al sicuro.

Key configuration fields
Define defaults in ~/.sourceparts/config.json or set environment overrides for CI.
Profiles

profile

Named profile used to scope credentials and default workspace settings.

{"default": "production"}

workspaceId

Source Parts workspace identifier used to fetch quotes, orders, and analytics.

{"workspaceId": "org-sp-enterprise"}

output.format

Control the default response format across commands (json, table, csv).

{"output": { "format": "table" }}
Reference the REST API
Pair CLI automation with direct API calls for custom integrations.
Explore full examples
See how teams embed Source Parts into dashboards, pipelines, and ERP systems.

Domande frequenti

Risposte per distribuzione, sicurezza e operazioni quotidiane.

Eccellenza operativa dalla riga di comando

Distribuisci l'automazione dell'approvvigionamento in giorni, non trimestri, con la CLI di Source Parts.

Documentazione CLI - Interfaccia a Riga di Comando Source Parts | Source Parts