Skip to content

jkroll-deepgram/deepgram-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepgram CLI

Deepgram CLI

oclif Version CircleCI Downloads/week License

This project is currently ALPHA and is in active development. Commands are likely to change without warning or deprecation.

This is the Deepgram CLI. It is used to interact with the Deepgram API from the command line. It is built using oclif.

Issues

Installation & Usage

  1. Clone this repository.
$ git clone [email protected]:deepgram-devs/deepgram-cli.git
  1. Switch to the CLI directory.
$ cd deepgram-cli
  1. Run Yarn install to install all dependencies.
$ yarn install
  1. Access the /bin directory.
$ cd bin

Run the CLI.

$ ./dev {command}
$ deepgram COMMAND
running command...
$ deepgram (--version)
@deepgram/cli/0.0.0 darwin-x64 node-v16.11.1
$ deepgram --help [COMMAND]
USAGE
  $ deepgram COMMAND
...

Commands

deepgram generate [TEMPLATE]

Generate a new project from our Deepgram templates directory. See https://github.com/deepgram-templates

USAGE
  $ deepgram generate [TEMPLATE]

ARGUMENTS
  TEMPLATE  Template name or repo URL

DESCRIPTION
  Generate a new project from our Deepgram templates directory. See https://github.com/deepgram-templates

See code: dist/commands/generate/index.ts

deepgram help [COMMAND]

Display help for deepgram.

USAGE
  $ deepgram help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for deepgram.

See code: @oclif/plugin-help

deepgram keys [PROJECT]

Retrieve all API keys for a given Deepgram Project.

USAGE
  $ deepgram keys [PROJECT]

ARGUMENTS
  PROJECT  Project ID

DESCRIPTION
  Retrieve all API keys for a given Deepgram Project.

See code: dist/commands/keys/index.ts

deepgram keys create [PROJECT]

Create an API key for a Deepgram Project.

USAGE
  $ deepgram keys create [PROJECT]

ARGUMENTS
  PROJECT  Project ID

DESCRIPTION
  Create an API key for a Deepgram Project.

deepgram keys delete [API_KEY_ID] [PROJECT]

Delete an API key from a Deepgram Project.

USAGE
  $ deepgram keys delete [API_KEY_ID] [PROJECT]

ARGUMENTS
  API_KEY_ID  API key ID
  PROJECT     Project ID

DESCRIPTION
  Delete an API key from a Deepgram Project.

deepgram projects

Retrieve all Deepgram Projects your API key has access to.

USAGE
  $ deepgram projects

DESCRIPTION
  Retrieve all Deepgram Projects your API key has access to.

See code: dist/commands/projects/index.ts

deepgram projects get [PROJECT]

Retrieve a Deepgram Project.

USAGE
  $ deepgram projects get [PROJECT]

ARGUMENTS
  PROJECT  Project ID

DESCRIPTION
  Retrieve a Deepgram Project.

deepgram setup [API_KEY] [PROJECT]

Writes the API key and Deepgram Project to a config file (can be overridden).

USAGE
  $ deepgram setup [API_KEY] [PROJECT]

ARGUMENTS
  API_KEY  Deepgram API Key.
  PROJECT  Deepgram Project

DESCRIPTION
  Writes the API key and Deepgram Project to a config file (can be overridden).

See code: dist/commands/setup/index.ts

deepgram switch [PROJECT]

Switch Deepgram Project and update the config file.

USAGE
  $ deepgram switch [PROJECT]

ARGUMENTS
  PROJECT  Deepgram Project

DESCRIPTION
  Switch Deepgram Project and update the config file.

See code: dist/commands/switch/index.ts

deepgram transcribe-file [FILE]

Transcribe a file.

USAGE
  $ deepgram transcribe-file [FILE] [-o <value>] [--webvtt | --srt] [--raw]

ARGUMENTS
  FILE  File name or path

FLAGS
  -o, --output=<value>
  --raw
  --srt
  --webvtt

DESCRIPTION
  Transcribe a file.

See code: dist/commands/transcribe-file/index.ts

deepgram usage [PROJECT]

Retrieves aggregated usage data for a Deepgram Project.

USAGE
  $ deepgram usage [PROJECT]

ARGUMENTS
  PROJECT  Project ID

DESCRIPTION
  Retrieves aggregated usage data for a Deepgram Project.

See code: dist/commands/usage/index.ts

deepgram usage fields [PROJECT]

List features used by a Deepgram Project.

USAGE
  $ deepgram usage fields [PROJECT]

ARGUMENTS
  PROJECT  Project ID

DESCRIPTION
  List features used by a Deepgram Project.

deepgram usage requests [PROJECT]

Retrieves transcription requests for a Deepgram Project.

USAGE
  $ deepgram usage requests [PROJECT] [--page <value>] [--raw | --json] [-l <value>]

ARGUMENTS
  PROJECT  Project ID

FLAGS
  -l, --limit=<value>  [default: 10]
  --json
  --page=<value>
  --raw

DESCRIPTION
  Retrieves transcription requests for a Deepgram Project.

deepgram usage requests get [REQUEST] [PROJECT]

Retrieves a specific transcription request for a Deepgram Project.

USAGE
  $ deepgram usage requests get [REQUEST] [PROJECT]

ARGUMENTS
  REQUEST  Request ID
  PROJECT  Project ID

DESCRIPTION
  Retrieves a specific transcription request for a Deepgram Project.

Writing Templates

The Deepgram CLI can generate from any public repository, with a small amount of configuration in a deepgram.toml.

# command properties
[build]
  command = "your build command" # required
  args = ["--arg=one", "--arg=two"]

# config properties
[config]
  sample = "sample-config-file" # required
  output = "config-file" # required

# post-build properties
[post-build]
  message = "final message to output to instruct users to start your app"

Check out this deepgram.toml from our video-chat template.

[build]
  command = "npm install"

[config]
  sample = ".env-sample"
  output = ".env"

[post-build]
  message = "Run `npm start` to get up and running."

Config is generated by replacing template-strings in the sample config, whether it's an API Key or a Project ID

In this sample, we'll replace %api_key% with the API configured when you set up the CLI.

port=3000
deepgram_api_key=%api_key%

Developing

This project can be cloned and ran locally.

$ yarn
$ bin/dev
$ bin/dev COMMAND
running command...
$ bin/dev (--version)
@deepgram/cli/0.0.0 darwin-x64 node-v16.11.1
$ bin/dev --help [COMMAND]
USAGE
  $ bin/dev COMMAND

Contributors

Would you like to contribute to this project? Check out our contributing guide.

Made with contrib.rocks.

About

CLI for Deepgram's automated speech recognition APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.3%
  • JavaScript 2.5%
  • Batchfile 0.2%