Skip to main content

CLI client for cal-docs-server documentation API

Project description

cal-docs-client

CLI client for cal-docs-server documentation API.

Requirements

  • Python 3.12+
  • No external dependencies (stdlib only)

Installation

pip install cal-docs-client

Or install from source:

git clone https://gitlab.com/cyberassessmentlabs/public/tools/cal-docs-client.git
cd cal-docs-client
pip install .

Configuration

Configuration is optional. You can provide settings via command-line options, environment variables, or a config file.

Config File (Optional)

For convenience, create a config file at ~/.config/cal-docs-client/config.json:

{
    "server": "https://docs.example.com",
    "token": "your-api-token",
    "no_colour": false
}

You can also specify a different config file with -c/--config.

Configuration Priority

Settings are resolved in this order (first wins):

  1. Command-line arguments (-s, --no-colour)
  2. Environment variables (CAL_DOCS_SERVER, CAL_DOCS_TOKEN)
  3. Config file

Usage

# Show help
cal-docs-client --help

# Show server and client version
cal-docs-client version

# List all projects
cal-docs-client projects

# Search for projects
cal-docs-client projects --search myproject

# Download documentation
cal-docs-client download myproject latest
cal-docs-client download myproject 1.0.0 -o docs.zip

# Upload documentation (requires token in config or -t)
cal-docs-client upload myproject-1.0.0-docs.zip

# Show server API help
cal-docs-client help

# Get OpenAPI specification
cal-docs-client spec -o openapi.json

Command-Line Options

You can pass all settings directly on the command line:

cal-docs-client -s https://docs.example.com projects
cal-docs-client -s https://docs.example.com upload -t YOUR_TOKEN docs.zip

Environment Variables

You can also use environment variables:

  • CAL_DOCS_SERVER - Server URL
  • CAL_DOCS_TOKEN - Authentication token

API Version Compatibility

This client requires cal-docs-server API version 1.x. It will refuse to connect to servers with incompatible API versions.

License

MIT License - (c) 2026 Cyber Assessment Labs

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

cal_docs_client-1.0.0b4-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file cal_docs_client-1.0.0b4-py3-none-any.whl.

File metadata

File hashes

Hashes for cal_docs_client-1.0.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 4607569dd2a44594d3311643a9fa09b3decb16aad01e57a5b61574a639457f8f
MD5 1a7fb64c515aac2fa080109168cdfb0a
BLAKE2b-256 427ac2e3e0b2988d9b8183c95bb4ef4c9ff96cd609b73e38a0e1392577a9be36

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