0.2.5 • Published 3 years ago

@oleoneto/microkit v0.2.5

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
3 years ago

microkit

Microservices toolkit

oclif Version Downloads/week License

Usage

$ npm install -g @oleoneto/microkit
$ microkit COMMAND
running command...
$ microkit (-v|--version|version)
@oleoneto/microkit/0.2.5 darwin-x64 node-v12.19.0
$ microkit --help [COMMAND]
USAGE
  $ microkit COMMAND
...

Commands

microkit help [COMMAND]

display help for microkit

USAGE
  $ microkit help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

microkit utils

developer utilities

USAGE
  $ microkit utils

See code: src/commands/utils/index.ts

microkit utils:audio:info PATH

check the information of an audio file

USAGE
  $ microkit utils:audio:info PATH

OPTIONS
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

See code: src/commands/utils/audio/info.ts

microkit utils:call DIALSTRING

place a call using an asterisk server

USAGE
  $ microkit utils:call DIALSTRING

OPTIONS
  -a, --address=address                      (required) [default: http://127.0.0.1:8088] asterisk server address
  -e, --externalMediaHost=externalMediaHost  [default: localhost:5554] RTP listening server address (external host)
  -f, --format=format                        [default: ulaw] audio format
  -m, --mode=mode                            [default: SIP] mode
  -p, --password=password                    (required) [default: asterisk] asterisk password
  -t, --transcribe                           transcribe call in real-time
  -u, --username=username                    (required) [default: asterisk] asterisk user
  --docker                                   set this if asterisk server is running inside a docker container
  --engine=(deepgram|transcribe)             (required) [default: deepgram] transcription engine
  --timeout=timeout                          [default: 180] set limit for transcriber connection in seconds
  --watch                                    watch RTP packet information

EXAMPLES
  $ microkit utils:call 6001
  $ microkit utils:call 6001 --mode SIP
  $ microkit utils:call 6001 --transcribe
  $ microkit utils:call 6001 --transcribe -e localhost:5554
  $ microkit utils:call 6001 --transcribe --docker --engine=deepgram
  $ microkit utils:call 6001 --transcribe -a http://127.0.0.1:8088 -u asterisk --docker

See code: src/commands/utils/call/index.ts

microkit utils:db

interact with SQL databases (only Postgres supported)

USAGE
  $ microkit utils:db

See code: src/commands/utils/db/index.ts

microkit utils:db:read

read from a database table

USAGE
  $ microkit utils:db:read

OPTIONS
  -x, --extended               show extra columns
  --columns=columns            only show provided columns (comma-separated)
  --csv                        output is csv format [alias: --output=csv]
  --database=database          database name
  --database-url=database-url  database url
  --filter=filter              filter property by partial string matching, ex: name=foo
  --limit=limit                [default: 100] sql select limit
  --no-header                  hide table header from output
  --no-truncate                do not truncate output to fit screen
  --offset=offset              sql select offset
  --output=csv|json|yaml       output in a more machine friendly format
  --sort=sort                  property to sort by (prepend '-' for descending)
  --table=table                (required) database table

EXAMPLES
  $ microkit db:read --table friends
  $ microkit db:read --table friends --database people
  $ microkit db:read --table friends --limit 2
  $ microkit db:read --table friends --limit 10 --offset 2

See code: src/commands/utils/db/read.ts

microkit utils:kafka

produce and/or consume kafka messages

USAGE
  $ microkit utils:kafka

See code: src/commands/utils/kafka/index.ts

microkit utils:kafka:listen

listen for or consume Kafka events

USAGE
  $ microkit utils:kafka:listen

OPTIONS
  -g, --groupId=groupId  [default: microkit] kafka consumer group identifier
  -t, --topics=topics    (required) kafka topic
  --actions=actions      kafka actions to watch
  --host=host            address of kafka host [i.e. https://example.com:9094]
  --listen-once          stop listening once a message is received
  --mode=(watch|ignore)  determine whether to care about or ignore the actions
  --total=total          maximum number of messages to consume

EXAMPLES
  $ microkit utils:kafka:listen --topics feed
  $ microkit utils:kafka:listen --topics feed registrations
  $ microkit utils:kafka:listen --topics feed --listen-once
  $ microkit utils:kafka:listen --topics feed --actions like comment --mode watch
  $ microkit utils:kafka:listen --topics feed --actions repost --mode --ignore

See code: src/commands/utils/kafka/listen.ts

microkit utils:kafka:produce

produce kafka messages

USAGE
  $ microkit utils:kafka:produce

OPTIONS
  -a, --action=action  kafka topic action
  -o, --object=object  (required) [default: {"origin": "microkit"}] payload in JSON format
  -t, --topic=topic    (required) kafka topic
  --host=host          address of kafka host [i.e. https://example.com:9094]
  --total=total        [default: 1] number of messages to send

EXAMPLES
  $ microkit utils:kafka:produce --topic feed
  $ microkit utils:kafka:produce --topic feed --total 10
  $ microkit utils:kafka:produce --topic feed --object '{"userId": 8897, "action": "like", "objectId": 42}'

See code: src/commands/utils/kafka/produce.ts

microkit utils:rtp

starts an RTP server

USAGE
  $ microkit utils:rtp

OPTIONS
  --log           log RTP server messages
  --port=port     [default: 5554] RTP client port
  --show-info     show RTP packet info
  --show-packets  show RTP packets

EXAMPLES
  $ microkit utils:rtp
  $ microkit utils:rtp --port 5554
  $ microkit utils:rtp --show-packets=true

See code: src/commands/utils/rtp/index.ts

microkit utils:s3

interact with S3 buckets

USAGE
  $ microkit utils:s3

See code: src/commands/utils/s3/index.ts

microkit utils:s3:download KEY

download file from S3 bucket

USAGE
  $ microkit utils:s3:download KEY

OPTIONS
  -b, --bucket=bucket                      (required) name of S3 bucket
  -l, --downloadLocation=downloadLocation  path where the downloads should be saved

EXAMPLES
  $ microkit utils:s3:download audio.mp3 --bucket my-photos
  $ microkit utils:s3:download audio.mp3 --bucket my-photos -l ~/Downloads

See code: src/commands/utils/s3/download.ts

microkit utils:transcribe

transcribe an audio stream

USAGE
  $ microkit utils:transcribe

OPTIONS
  -p, --port=port                 [default: 5554] RTP client port
  --engine=(deepgram|transcribe)  (required) [default: deepgram] transcription engine
  --timeout=timeout               [default: 180] set limit for transcriber connection in seconds

EXAMPLES
  $ microkit utils:transcribe
  $ microkit utils:transcribe --port 5554
  $ microkit utils:transcribe --engine=deepgram
  $ microkit utils:transcribe --engine=deepgram --port 5554

See code: src/commands/utils/transcribe/index.ts

microkit help [COMMAND]

display help for microkit

USAGE
  $ microkit help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help