npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@narakeet/api-client

v1.2.0

Published

Command line API client for the Narakeet vidoe build API

Downloads

19

Readme

Narakeet API client

Command line client that allows building videos using the Narakeet API. See https://www.narakeet.com/docs/automating/ for more information.

Installation:

Install from NPM using "npm i -g @narakeet/api-client" Upgrade from a previous version using "npm i -g @narakeet/api-client@latest"

Usage:

narakeet-api-client --api-key
--source
--repository
--repository-type
[optional arguments]

Mandatory arguments:

  • --api-key: Your Narakeet API key

Additional arguments for video projects:

  • --source: (Required) Narakeet script path inside the repository

  • --repository: (Required) Narakeet project location See "Repository types" below for more information

  • --repository-type: (Required) Project location type (eg github or local-dir) See "Repository types" below for more information Additional arguments for GitHub repositories:

  • --github-token: (Required) repository access token

  • --github-sha: (Optional) source commit SHA useful for building from a specific tag or version if not specified, the current head commit will be used

Additional arguments for audio (text-to-speech) projects:

  • --script: input text for speech synthesis, required if script-file is not specified
  • --script-file: (Optional) file containing the input script, relative to current directory
  • --output-type: (Optional) output file type. "wav", "m4a" or "mp3". Defaults to m4a
  • --voice: (Optional) default voice for text-to-speech synthesis. See https://www.narakeet.com/languages/ for available options

Optional arguments:

  • --output: File name for the resulting file. Default: result.mp4 for videos, or result. for audio
  • --project-type: "video" or "audio". selects slower video build or faster text-to-speech build. Default: video
  • --verbose: Print troubleshooting information when working
  • --api-url: override the API url, useful for testing

Repository types:

local-dir:

Use the files inside a directory on your local disk. 
To use this option, provide the following:

--repository: Directory path for the project
--source: path inside the directory for your main script file

NOTE: This requires your OS TEMP directory to be writable, 
as the client will create a temporary ZIP file there 
and upload it to Narakeet. If the TEMP dir is not writable,
use the local-zip repository type.

local-zip:

Package your project as a ZIP file on your local disk. 
To use this option, provide the following:

--repository: path to the ZIP archive on your local disk 
--source: path inside the archive four main script file

zip-url:

Package your project as a ZIP file, and upload it somewhere for Narakeet to
download.  (for example, upload to S3 and generate a pre-signed URL for
private downlads).
To use this option, provide the following:

--repository: URL of your ZIP file
--source: path inside the archive to your main script file

github:

Commit your project to GitHub, and build directly from the repository.
To use this option, provide the following:

--repository-type: github
--repository: GitHub repository name (user/project)
--github-token: access token with rights to download the repository
--github-sha: optional, SHA commit to download

Examples:

Build a video from a local directory:

narakeet-api-client --api-key $API_KEY \
 --source source.md \
 --repository my-video-project \
 --repository-type local-dir

Build a video from a local zip:

narakeet-api-client --api-key $API_KEY \
 --source source.md \
 --repository my-video-project.zip \
 --repository-type local-zip

Build a video from a git repo:

narakeet-api-client --api-key $API_KEY \
 --source hello-world/script/source.md \
 --repository narakeet/examples \
 --repository-type github \
 --github-token $GITHUB_TOKEN

Build a video from a ZIP published to a URL:

narakeet-api-client --api-key $API_KEY \
 --repository $URL \
 --source source.md \
 --repository-type zip-url

Build an audio WAV from text, saving to result.wav:

narakeet-api-client --api-key $API_KEY \
 --project-type audio \
 --script "Hi there" \
 --output-type wav

Build an audio WAV from text, using voice Brian, saving to result.wav:

narakeet-api-client --api-key $API_KEY \
 --project-type audio \
 --script "Hi there" \
 --output-type wav \
 --voice brian

Build an audio WAV from text, using voice Brian, saving to brian.wav:

narakeet-api-client --api-key $API_KEY \
 --project-type audio \
 --script "Hi there" \
 --output-type wav \
 --voice brian \
 --output brian.wav

Build an audio MP3 from a local text file, saving to result.mp3:

narakeet-api-client --api-key $API_KEY \
 --project-type audio \
 --script-file script.txt \
 --output-type mp3

Build an audio WAV from a local text file, using the Rodney voice, saving to my-script.wav

narakeet-api-client --api-key $API_KEY \
 --project-type audio \
 --script-file script.txt \
 --output-type wav \
 --voice rodney \
 --output my-script.wav