Skip to content

Latest commit

 

History

History
121 lines (84 loc) · 2.06 KB

CONTRIBUTING.md

File metadata and controls

121 lines (84 loc) · 2.06 KB

Contribute

A guide for contributing to the Paperspace CLI

Getting Started

  1. Install Deno: A secure runtime for JavaScript and TypeScript
curl -fsSL https://deno.land/x/install/install.sh | sh
  1. Install zCLI: A CLI for creating and managing zCLI applications
curl -fsSL https://raw.githubusercontent.com/jaredLunde/zcli-cli/main/install.sh | sh
  1. Clone the repo and open in VSCode
git clone https://github.com/Paperspace/cli
code cli
  1. Install the VSCode Deno extension
  2. Load the Deno cache
deno task cache

Development

Run the CLI in development mode:

deno task dev --help

Run the CLI against production environment:

deno task run --help

Add a command to the CLI:

zcli add [name]

Generate the API client types for the CLI against the development environment:

deno task generate-api

Generate the API client types for the CLI against the production environment:

deno task generate-api:prod

Compile the CLI:

deno task compile

Test a binary:

deno task compile
bin/macos-arm/pspace --help

Test the CLI:

deno task test

Generate documentation for the CLI:

deno task docs

Format the code:

deno fmt

Lint the code:

deno lint

Type-check the code:

deno check mod.ts

Tools we use

  1. zCLI - A framework for building type-safe command-line tools using Zod validators in Deno
  2. zCLI CLI - A command-line tool for easily creating zCLI applications and commands with Deno.
  3. openapi-typescript - Convert static OpenAPI schemas to TypeScript types quickly using pure Node.js. Fast, lightweight, (almost) dependency-free, and no Java/node-gyp/running OpenAPI servers necessary.
  4. Zod - TypeScript-first schema validation with static type inference.