Stofscout CLI

Gebruik de Stofscout CLI in je terminal of in een script. Je hebt Node.js 22 of hoger en npm nodig. De CLI gebruikt de openbare API en vereist geen sleutel.

Uitvoeren met npm

npm exec --yes --package='https://stofscout.nl/techbybuild-stofscout-cli-1.0.1.tgz' -- stofscout modellen max_prijs=400 limiet=3

Voor lokaal gebruik kun je het npm-pakket downloaden of het installeren met npm install -g 'https://stofscout.nl/techbybuild-stofscout-cli-1.0.1.tgz'.

Installeren met Homebrew

De officiële Homebrew-formule voor stofscout staat in de Stofscout-tap.

brew install techbybuild/stofscout/stofscout
stofscout modellen max_prijs=400 limiet=3

Vraagt Homebrew om toestemming voor de formule? Gebruik brew trust --formula techbybuild/stofscout/stofscout en probeer de installatie opnieuw.

Sandbox

npm exec --yes --package='https://stofscout.nl/techbybuild-stofscout-cli-1.0.1.tgz' -- stofscout --sandbox model slug=voorbeeld-a

De opdrachten en queryparameters staan in de Stofscout API-documentatie. De CLI schrijft JSON naar stdout. Bij een fout schrijft hij naar stderr en geeft hij exitcode 1 terug.