Skip to content

DiscTechnologies/disc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disc CLI

Native Rust CLI for Disc – discover signals and consume live data streams.


Quick start (30 seconds)

brew install disctechnologies/tap/disc

# set your API key once
disc auth api-key set

# stream a signal
disc signals passive subscribe <passive-signal-id> --format ndjson

What it does

  • 🔍 Discover passive and active signals
  • 📡 Subscribe to live signal streams (WebSocket)
  • 🔐 Authenticate via API key (X-Disc-Api-Key)
  • ⚡ Stream data to stdout (pipe-friendly)

Backed by:

  • HTTP: api.disc.tech
  • WS: signals.disc.tech (MessagePack protocol)

Installation

Homebrew (recommended)

brew tap disctech/tap
brew install disc

Verify:

disc --version

Authentication

Set your API key (stored locally):

disc auth api-key set

Or pass per command:

DISC_API_KEY=... disc auth whoami

Check current auth:

disc auth whoami

Discover signals

Passive signals

disc signals passive list
disc signals passive get <passive-signal-id>

Active signals

disc signals active list --for-passive <passive-signal-id>
disc signals active get <active-signal-id>

Stream live data

Subscribe (machine-friendly)

Streams events to stdout (best for piping):

disc signals passive subscribe <passive-signal-id> --format ndjson

Pipe to another process:

disc signals passive subscribe <passive-signal-id> --format ndjson | jq

Write to file:

disc signals passive subscribe <passive-signal-id> \
  --format ndjson \
  --destination ./output.ndjson

With backfill:

disc signals passive subscribe <passive-signal-id> \
  --backfill \
  --backfill-count 5 \
  --format ndjson

Tail (human-friendly)

Pretty console output:

disc signals active tail <active-signal-id> --format pretty

Interactive mode

disc signals subscribe
  • toggle passive signals
  • explore active signals
  • manage live subscriptions
  • stream to file

Runtime options

Streaming

  • --window-semantics elapsed|ordinal
  • --backfill
  • --backfill-count <n>
  • --backfill-from <epoch-ms>
  • --backfill-to <epoch-ms>
  • --include-status
  • --once
  • --timeout <duration>
  • --no-reconnect

Output formats

  • pretty
  • json
  • ndjson (recommended for pipelines)

Output filters

  • data
  • status
  • events
  • all

Configuration

Stored in platform-standard locations:

  • macOS: ~/Library/Application Support/disc/
  • Linux: ${XDG_CONFIG_HOME:-~/.config}/disc/
  • Windows: %APPDATA%/disc/

Files:

  • config.json
  • auth.json

🔐 API keys are stored locally and never committed to the repo.


Development

Build locally:

cargo build

Run:

cargo run --bin disc -- --help

Local wrapper

./disc.sh auth whoami

Defaults:

  • HTTP: http://localhost:3001
  • WS: ws://localhost:8097
  • Client ID: disc-cli-local

Env precedence:

  1. DISC_LOCAL_API_KEY
  2. DISC_API_KEY
  3. stored CLI auth

Release & distribution (maintainers)

disc-cli is distributed as prebuilt binaries via GitHub Releases and installed via Homebrew.

Create a release:

git tag v0.1.0
git push origin v0.1.0

Artifacts:

  • disc-<target>.tar.gz
  • SHA256SUMS.txt
  • disc.rb (Homebrew formula)

Design principles

  • 🧩 Native Rust binary (no runtime dependencies)
  • 🔌 Unix-first (stdout streaming, pipe-friendly)
  • ⚡ Low-latency real-time consumption
  • 🧱 Stable CLI interface over evolving backend

License

See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors