Skip to main content

Tarnished CLI

Command-line interface for Tarnished, version 0.3.6. Use a matching Tarnished backend.

Documentation: https://markoonakic.github.io/tarnished/

For the user-facing CLI guide, see:

Install

Install version 0.3.6 from PyPI once that release is available:

uv tool install tarnished-cli==0.3.6

To install this checkout, including before a release is published, run from the repository root:

uv tool install ./cli

Homebrew convenience path (the tap can lag the PyPI release):

brew tap markoonakic/tap
brew install tarnished-cli

To install a downloaded wheel:

uv tool install ./dist/tarnished_cli-<version>-py3-none-any.whl

Authentication

Tarnished CLI is API-key-first.

  1. Create or rotate the API key in the Tarnished web app.
  2. Prefer the CLI preset so the key includes the scopes the CLI expects.
  3. Validate and store the key locally:
tarnished auth init --api-key '...'
  1. Run the auth doctor to confirm the stored key, live auth check, and required CLI scopes all pass:
tarnished auth doctor
tarnished auth whoami
  1. Clear the locally stored key when needed:
tarnished auth api-key clear

The web app remains the source of truth for API keys. The CLI does not create, rotate, revoke, or otherwise manage remote API keys.

The CLI uses the system keyring when available. Otherwise, it stores the key in a private file in the CLI config directory. TARNISHED_API_KEY overrides stored credentials. Clearing a stored key does not unset this environment variable.

Usage

Global options go before the command:

tarnished --base-url https://tarnished.example.com auth status
tarnished --profile work --json applications list
tarnished applications --help

Create config.json in ~/.config/tarnished (or $XDG_CONFIG_HOME/tarnished) to set profiles:

{
  "default_profile": "default",
  "profiles": {
    "default": { "base_url": "http://127.0.0.1:5577", "output": "json" },
    "work": { "base_url": "https://tarnished.example.com", "output": "json" }
  }
}

--config-dir and TARNISHED_CONFIG_DIR override this directory. Server URL precedence is --base-url, then TARNISHED_BASE_URL, then the selected profile. Use a trusted server: URL overrides send the selected profile's key to that server. The CLI follows same-origin redirects but rejects cross-origin or credential-bearing URLs. Use the final server URL where possible.

JSON is the default output. Set the profile's output to text or use TARNISHED_OUTPUT=text for text output; --json overrides both. API and local configuration errors exit with code 1. JSON errors go to stdout; text errors go to stderr. Invalid command arguments use Typer's standard error output.

Imports, reports, and transcriptions support --wait, --poll-interval, and --timeout-seconds. A local wait timeout does not cancel server work. Report waits stop if another job replaces the submitted job. Review the saved state before retrying an AI or speech request, which can incur provider charges.

Development

cd cli
uv sync
uv run tarnished --help
uv run pytest -q
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv build

Release

The repository release workflow builds CLI distributions, uploads them to the GitHub release, and publishes the CLI to PyPI by default. Homebrew tap updates run in the separate homebrew-tap.yml workflow after Homebrew's 24-hour PyPI resource-resolution cooldown window has elapsed.

One-Time PyPI Trusted Publishing Setup

  1. Create the tarnished-cli project on PyPI.
  2. In the PyPI project settings, add a Trusted Publisher for this GitHub repository.
  3. Use these values:
    • Owner: markoonakic
    • Repository: tarnished
    • Workflow name: release.yml
    • Environment name: pypi

One-Time Homebrew Tap Automation Setup

  1. Create a write-enabled deploy key for markoonakic/homebrew-tap.
  2. Add the private key to this repository as the HOMEBREW_TAP_DEPLOY_KEY secret.
  3. The dedicated homebrew-tap.yml workflow will:
    • wait until the target PyPI release is older than Homebrew's 24-hour Python resource cooldown window
    • update Formula/tarnished-cli.rb from PyPI metadata
    • refresh Python resource blocks with brew update-python-resources
    • build the formula from source and run brew test tarnished-cli
    • push the tap update to markoonakic/homebrew-tap

Why separate from the main release workflow?

  • Homebrew's Python dependency resolver intentionally excludes PyPI uploads from the last 24 hours when refreshing resource blocks.
  • Keeping tap sync separate avoids false-negative release failures while still following Homebrew's documented Python-formula workflow.

Release Outputs

release.yml publishes:

  • cli/dist/*.whl
  • cli/dist/*.tar.gz

to the GitHub release and publishes the package to PyPI.

homebrew-tap.yml then updates the Homebrew tap separately once the published sdist is old enough for brew update-python-resources to resolve safely.

License

MIT. The wheel and source distribution include the LICENSE file.

Metadata

Release files for tarnished-cli 0.3.6

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

Source distribution (sdist)

Source distribution for tarnished-cli 0.3.6
File Size Uploaded
tarnished_cli-0.3.6.tar.gz 79.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tarnished-cli 0.3.6
File Interpreter ABI Platform
tarnished_cli-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 120.1 kB

Release files / tarnished_cli-0.3.6.tar.gz

Download URL tarnished_cli-0.3.6.tar.gz
Size 79.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8d548ae7470f76e05a9aeb7e0d0bdd24f0f73ebd2ec46eb0716590594fefb7ed
BLAKE2b-256 checksum
How to use checksums
cdb13aa09a749aedff8d519f55106f316d62adbe91985ed477e9b11172598bb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release files / tarnished_cli-0.3.6-py3-none-any.whl

Download URL tarnished_cli-0.3.6-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6b7ed1a0b07bc648511b37808eea74969b0ecc09748ccead8d10a3b1333127
BLAKE2b-256 checksum
How to use checksums
87bc7d637370b5557599fb0d56d7464c08debc71b534892af3a1ef479d1c96a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

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