Metadata-Version: 2.4
Name: salesnexus-cli
Version: 0.2.3
Summary: SalesNexus CLI - manage your CRM from the command line
Author-email: SalesNexus <support@salesnexus.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,contacts,crm,sales,salesnexus
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: rich<14,>=13
Requires-Dist: tomli-w<2,>=1
Requires-Dist: tomli>=2; python_version < '3.11'
Requires-Dist: typer<1,>=0.12
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest-mock>=3; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Description-Content-Type: text/markdown

# SalesNexus CLI (`snx`)

Command-line interface for the SalesNexus Public API v1. It is designed for both humans and AI agents: pass `--json` for structured output, or pipe output and the CLI will auto-select JSON.

## Install locally

```bash
cd salesnexus-cli
pip install -e .
```

## Authenticate

```bash
snx auth login --api-key sn_live_...
snx ping
```

## Pipeline automation

Version `0.2.0` adds public pipeline-building commands:

```bash
snx goals create --name "New User Activation" --type marketing
snx pipelines create --goal-id 123 --name "New User Engagement" --type marketing --default
snx stages create --pipeline-id 456 --name "Signed Up" --order 0
snx triggers create --stage-id 789 --event AddedToStage --action SendEmail --action-params-json '{"campaignId":101}'
```

Agents can create a complete marketing pipeline from a JSON spec:

```bash
snx --json marketing-pipelines create --spec examples/new-user-engagement.json
```

## Email and SMS templates

Version `0.2.3` adds content-ready email and SMS template creation for triggered automations, plus template export and domain discovery:

```bash
snx domains list --purpose email

snx templates create \
	--name "Welcome email" \
	--media-type email \
	--mode triggered \
	--tracking-domain-id 123 \
	--subject "Welcome to SalesNexus" \
	--from-name "SalesNexus" \
	--from-email hello@example.com \
	--raw-html-file examples/welcome-email.html

snx templates create \
	--name "Trial follow-up SMS" \
	--media-type sms \
	--mode triggered \
	--sms-text-file examples/trial-follow-up-sms.txt

snx templates export 101 --dir exported-template
```

Campaigns used by stage triggers must be created with `--mode triggered`. Bulk campaigns are still useful for segment sends, but the automation sender will reject them for stage-trigger actions.
For email templates that will be sent, use a validated email-ready domain from `snx domains list --purpose email` and pass its ID with `--tracking-domain-id`.

## Publish

```bash
python -m pip install -e ".[dev]"
python -m build
python -m twine upload dist/*
```