Skip to main content

A CLI tool for various local Telepact operations.

Project description

Telepact CLI

The CLI is a tool for various development jobs, such as fetching API schemas, starting schema-backed mock servers for testing purposes, and optionally generating code.

Installation

uv tool install --prerelease=allow telepact-cli

Published PyPI releases are currently prereleases. To pin a specific CLI release, use the exact version from doc/04-operate/03-versions.md.

Usage

telepact --help

Usage: telepact [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  codegen      Generate code bindings for a Telepact API schema.
  compare      Compare two Telepact API schemas for backwards compatibility.
  demo-server  Start a demo Telepact server.
  fetch        Fetch a Telepact API schema to store locally.
  mock         Start a mock server for a Telepact API schema.

telepact codegen --help

Usage: telepact codegen [OPTIONS]

  Generate code bindings for a Telepact API schema.

Options:
  --schema-http-url TEXT  telepact schema directory
  --schema-dir TEXT       telepact schema directory
  --lang TEXT             Language target (one of "java", "py", "ts", or "go")
                          [required]
  --out TEXT              Output directory  [required]
  --package TEXT          Package name (required when --lang is "java" or "go")
  --help                  Show this message and exit.

telepact compare --help

Usage: telepact compare [OPTIONS]

  Compare two Telepact API schemas for backwards compatibility.

Options:
  --new-schema-dir TEXT  New telepact schema directory  [required]
  --old-schema-dir TEXT  Old telepact schema directory  [required]
  --help                 Show this message and exit.

telepact fetch --help

Usage: telepact fetch [OPTIONS]

  Fetch a Telepact API schema to store locally.

Options:
  --http-url TEXT    HTTP URL of a Telepact API  [required]
  --output-dir TEXT  Directory of Telepact schemas  [required]
  --help             Show this message and exit.

telepact mock --help

Usage: telepact mock [OPTIONS]

  Start a mock server for a Telepact API schema.

Options:
  --http-url TEXT                 HTTP URL of a Telepact API
  --dir TEXT                      Directory of Telepact schemas
  --port INTEGER                  Port to run the mock server on
  --path TEXT                     Path to expose the mock API (default: /api)
  --generated-collection-length-min INTEGER
                                  Minimum length of generated collections
  --generated-collection-length-max INTEGER
                                  Maximum length of generated collections
  --disable-optional-field-generation
                                  Disable generation of optional fields
                                  (enabled by default)
  --disable-message-response-generation
                                  Disable generation of message responses
                                  (enabled by default)
  --disable-random-optional-field-generation
                                  Disable randomization of optional field
                                  generation (enabled by default)
  --help                          Show this message and exit.

NOTE: The mock command is an empowering development tool for clients. You do not need to develop against a live server; you can use the mock command to set up a "middle-man" server that will validate requests for schema compliance and return schema-compliant auto-generated responses (which can be overridden with manual stubs if desired.)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telepact_cli-1.0.0a327.tar.gz (87.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

telepact_cli-1.0.0a327-py3-none-any.whl (206.9 kB view details)

Uploaded Python 3

File details

Details for the file telepact_cli-1.0.0a327.tar.gz.

File metadata

  • Download URL: telepact_cli-1.0.0a327.tar.gz
  • Upload date:
  • Size: 87.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for telepact_cli-1.0.0a327.tar.gz
Algorithm Hash digest
SHA256 1d97500e8b8b90999be26c1653640073c0067b89aa03b1a72f0f7f569059abd0
MD5 57ce6c8101ed213bde43156af7e5920f
BLAKE2b-256 9708cb1393e806db505f547e77f5d7a06f5f641a3943f63297ef11e29aefc32f

See more details on using hashes here.

File details

Details for the file telepact_cli-1.0.0a327-py3-none-any.whl.

File metadata

  • Download URL: telepact_cli-1.0.0a327-py3-none-any.whl
  • Upload date:
  • Size: 206.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for telepact_cli-1.0.0a327-py3-none-any.whl
Algorithm Hash digest
SHA256 bfced83ec7f35e8cf1aefdf2d9ecbd148db8c1de9524fe4e4a14d955f5916c52
MD5 2e2a68e49a73c7bb1944fea0ac8e4c29
BLAKE2b-256 fb4688dcc26585808f85a8cec758f7af7162280f37510cde4f9cefeef3bb5d29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page