Skip to main content

mantis-cli

A small, friendly command line client for the Mantis Bug Tracker REST API.

Manage issues, projects, users and server config from your terminal, with pretty tables by default and raw JSON on demand.

Install

pip install mantishub-cli

This installs the mantis command.

From source

git clone git@github.com:shooding/mantishub-cli.git
cd mantishub-cli
pip install -e ".[dev]"

Configure

mantis needs the base URL of your Mantis instance and an API token. Create a token in Mantis under My Account → API Tokens → Create API Token.

Copy the example env file and fill it in:

cp .env.example .env
# edit .env
MANTIS_URL=https://your-instance.mantishub.io
MANTIS_API_KEY=your-api-token

mantis reads .env from the current directory automatically. Real environment variables and the --url / --token flags take precedence over .env, in that order.

Usage

mantis --help

Global options:

Option Env var Description
--url MANTIS_URL Base URL of the Mantis instance.
--token MANTIS_API_KEY API token.
--json — Output raw JSON instead of tables.

Issues

# List issues (optionally scoped / filtered / paginated)
mantis issue list
mantis issue list --project-id 1 --page-size 50
mantis issue list --filter assigned        # assigned | reported | monitored | unassigned

# Show one issue
mantis issue get 42
mantis issue get 42 --select id,summary,description

# Create an issue
mantis issue create --project-id 1 \
  --summary "Login button is misaligned" \
  --description "On mobile the button overlaps the footer." \
  --priority high --severity minor

# Update an issue
mantis issue update 42 --status resolved --handler vboctor

# Notes and tags
mantis issue note-add 42 --text "Reproduced on iOS 17." --private
mantis issue note-delete 42 7
mantis issue tag-add 42 --tag regression --tag mobile

# Monitor / delete
mantis issue monitor 42
mantis issue delete 42 --yes

Projects

mantis project list
mantis project get 1
mantis project create --name "New App" --description "Greenfield project"
mantis project delete 3 --yes

Users

mantis user me
mantis user get 5          # by id
mantis user get vboctor    # by username

Server config

mantis config csv_separator
mantis config status_colors priority_enum_string

JSON output

Add --json to any command to get the raw API response, handy for piping into jq:

mantis --json issue list --project-id 1 | jq '.[].summary'

Use as an AI agent skill

This repo ships an Agent Skill that teaches AI coding agents how to drive the mantis command. The same SKILL.md works with Claude Code, OpenAI Codex, and OpenCode — see skills/README.md for one-line install instructions for each.

Development

pip install -e ".[dev]"
pytest                 # run the test suite (tests/*_test.py)

Tests mock all HTTP traffic with responses, so no live Mantis instance is required.

Publishing

Build and upload to PyPI (requires a PyPI API token):

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-XXXX

./scripts/build.sh            # build sdist + wheel into dist/
./scripts/publish.sh          # build, validate, and upload to PyPI
./scripts/publish.sh --test   # upload to TestPyPI instead

License

MIT — see LICENSE.

Metadata

Release files for mantishub-cli 0.1.0

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

Source distribution (sdist)

Source distribution for mantishub-cli 0.1.0
File Size Uploaded Provenance Actions
mantishub_cli-0.1.0.tar.gz 11.4 kB With provenance Details for mantishub_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mantishub-cli 0.1.0
File Interpreter ABI Platform Actions
mantishub_cli-0.1.0-py3-none-any.whl Python 3 none any Details for mantishub_cli-0.1.0-py3-none-any.whl

Total release size: 22.5 kB

Release files / mantishub_cli-0.1.0.tar.gz

Download URL mantishub_cli-0.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
01dc8804038364e4f5dd710562b579474476d3e673f8fbbdcdff90be127d8777
BLAKE2b-256 checksum
How to use checksums
c96ff1c3cb6c7fc07505418b79151561949ea8d406a8b99ec9e838cfbdf3d9be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release files / mantishub_cli-0.1.0-py3-none-any.whl

Download URL mantishub_cli-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b59f2d7d4594bd45a133b2d5b2bf85ced0022e84f10d366236460d53f7f5e91f
BLAKE2b-256 checksum
How to use checksums
1900b5393b9418ec5afe6453cd66d92a02b72941a0b15975dd172d39574bc878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Security for mantishub-cli 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mantishub_cli-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

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.0 This release

2 release files Full 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