Span CLI

The Span CLI is a command-line utility to interact with the Span API. The source code is open source and available at GitHub.

You can download a precompiled version from the release page on GitHub.


You’ll need an API Token to use the Span CLI. Create one in on the management pages. You can either specify the token on the command line or set an environment variable named $SPAN_API_TOKEN.

List collections

`span col ls``

List devices

`span dev ls –collection-id=[your-collection-id-here]``

If you find yourself accessing the same collection over and over you can set the environment variable $SPAN_COLLECTION_ID.

Show help

There are a lot of other commands available through the Span CLI. Show all by typing

span --help