CLI client for SBM 12.0 JSON API
Project description
sbm-cli
A generic command-line client for the SBM (Serena Business Manager) 12.0 JSON API.
Designed for day-to-day L3 support work and for use as a tool by AI assistants (Claude Code).
Install
# Recommended — isolated environment
uv tool install sbm-cli
# Also works
pip install sbm-cli
Quick start
sbm configure # interactive setup wizard
sbm schema # verify config and see available transitions
sbm list # list open tickets
sbm get 02440942 # get ticket details
Configuration
Config is stored at ~/.sbm-cli/config.toml. Run sbm configure to create it interactively.
Manual editing is needed for transitions and teams (transition IDs are instance-specific):
[connection]
host = "https://sbm.example.com"
username = "myuser"
password = "mypass"
verify_ssl = false # set true for trusted certs
[defaults]
table_id = 1000
report_id = 2208
[transitions]
assign = { id = 155, fields = ["OWNER", "3RD_LEVEL_SPECIALIST"] }
close = { id = 19, fields = ["RESOLUTION", "ROOT_CAUSE"], pre_transition_id = 148, pre_transition_optional = true }
return-l2 = { id = 88, fields = ["RETURN_REASON", "RETURN_NOTE"] }
transfer = { id = 140, fields = ["L3_SPECIALIST_GROUP"] }
[transitions.transfer.field_types]
L3_SPECIALIST_GROUP = "list"
[teams]
my-team = { id = 155, name = "L3 My Team" }
Transition IDs are instance-specific. Find them by inspecting browser developer tools while performing actions in the SBM web UI, or ask your SBM admin.
Commands
| Command | Description |
|---|---|
sbm configure |
Interactive setup wizard |
sbm schema |
Machine-readable capabilities JSON |
sbm list [--report N] [--filter N] |
List tickets |
sbm get <ticket-id> |
Get ticket by display ID |
sbm transition <name> <ticket-id> --field K=V |
Run named transition |
sbm transition run <ticket-id> --id N --field K=V |
Run raw transition by ID |
sbm field-values <field> --table <table-id> |
Discover valid relational field values |
sbm teams |
List configured teams |
Global flags
--pretty / -H Human-readable output (rich tables)
--config PATH Override config file location
--quiet Suppress stderr status messages
Output format
All commands output a JSON envelope:
{"ok": true, "command": "get", "data": {...}}
{"ok": false, "command": "transition", "error": {"type": "api_error", "message": "..."}}
Exit codes: 0 success · 1 API error · 2 config/auth error · 3 validation error
Development
git clone https://github.com/<your-username>/sbm-cli
cd sbm-cli
uv sync
uv run sbm configure
uv run pytest
uv run pytest -m integration # requires live SBM connection
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sbm_cli-0.1.0.tar.gz.
File metadata
- Download URL: sbm_cli-0.1.0.tar.gz
- Upload date:
- Size: 49.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b6fe2490f68efc6c050921bba69feb8cba193c05b12dc4199d8722c8285693
|
|
| MD5 |
615d8b0cfefa63c39fa66589d806b847
|
|
| BLAKE2b-256 |
3817417e05902e23b34ca39a4e9f77e57142ff6c83d517b36afc36368d58c963
|
File details
Details for the file sbm_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sbm_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f55c06a24e912bddf6b7c4bbbd66b3583be84f65f6495915de7f3c12a25cb5cc
|
|
| MD5 |
117ca77ebb1b3723bedaab7ec638b836
|
|
| BLAKE2b-256 |
e8a8b34cc293e3ba2064c319971b366ca6235dee11d000b415de84e55e0aba81
|