Skip to main content

cpvmatch-cli

PyPI version Python

Semantic annotation CLI tool for CPV entity recognition. Supports brand, category, metric, and attribute entity identification in natural language queries.

Install

# From PyPI (recommended)
pip install cpvmatch-cli

# Or via uv
uv tool install cpvmatch-cli

# Or run without installing
uvx cpvmatch-cli

Quick Start

1. Configure API Key

Option 1: Environment variable (recommended)

export CPVMATCH_APIKEY="your-api-key-here"

Option 2: Login to save locally

cpvmatch-cli login
# Or pipe the key directly
echo "your-api-key-here" | cpvmatch-cli login

Option 3: Pass as argument

cpvmatch-cli annotation -q 'question' -k "your-api-key-here"

2. Annotate

cpvmatch-cli annotation -q '元气森林今年的销售额'
cpvmatch-cli annotation -q '查询元气森林无糖茶在即饮茶的市占率'

# Specify category scope
cpvmatch-cli annotation -q '元气森林销售额' --attribute-categories '饮料,食品'

# Disable full mode
cpvmatch-cli annotation -q '元气森林销售额' --no-full-mode

CLI Commands

login

Save API Key to ~/.cpvmatch/config.json.

cpvmatch-cli login

annotation

Annotate a natural language question.

Flag Description
-q, --question Natural language question to annotate (required)
-k, --apikey API Key (optional if set via env or login)
--full-mode / --no-full-mode Enable/disable full mode (default: enabled)
--attribute-categories Category scope, comma-separated, e.g., 饮料,食品

API Key Priority

CLI argument > CPVMATCH_APIKEY env var > saved config via cpvmatch-cli login

Development

# Install dependencies
uv sync

# Run tests
uv run pytest tests/ -v

# Lint
uv run ruff check .

# Format
uv run ruff format .

# Install locally
uv tool install .

Project Structure

cpvmatch-cli/
├── cpvmatch_cli/
│   ├── __init__.py    # Package init, version
│   ├── api.py         # HTTP API client
│   ├── cli.py         # Typer CLI commands
│   └── config.py      # Local config management
├── tests/
│   ├── test_api.py
│   ├── test_cli.py
│   └── test_config.py
├── pyproject.toml
├── Justfile

Metadata

Release files for cpvmatch-cli 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cpvmatch-cli 0.1.3
File Size Uploaded Provenance Actions
cpvmatch_cli-0.1.3.tar.gz 5.1 kB Without provenance Details for cpvmatch_cli-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cpvmatch-cli 0.1.3
File Interpreter ABI Platform Actions
cpvmatch_cli-0.1.3-py3-none-any.whl Python 3 none any Details for cpvmatch_cli-0.1.3-py3-none-any.whl

Total release size: 11.4 kB

Release files / cpvmatch_cli-0.1.3.tar.gz

Download URL cpvmatch_cli-0.1.3.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7eec05a807885512df841c67023a206af45b73264e93cf2db5f14d034c753043
BLAKE2b-256 checksum
How to use checksums
c39e0509618714512db478b9cc2379649c84a35435ad6675be68703191c2eac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cpvmatch_cli-0.1.3-py3-none-any.whl

Download URL cpvmatch_cli-0.1.3-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0105b9549751b6ebe795c8fde3a52cbdb6ed38a27ebd5c42e2a550b9e771f30
BLAKE2b-256 checksum
How to use checksums
7f01ea26bf4094009ece3210732b516803283150a469dfb3b009767aef08540c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for cpvmatch-cli 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page