Sign inSign up

chowrex/kiro-credit-usage-web

By chowrex

•Updated 2 days ago

Local-first Kiro Credits dashboard with AWS Athena refresh and multi-architecture Docker images.

Image
0

91

chowrex/kiro-credit-usage-web repository overview

⁠Kiro Credit Usage Web

A local-first dashboard for viewing Kiro Credits usage across subscribed users. It collects usage data through AWS CLI and Athena, stores validated snapshots locally, and provides a browser dashboard plus UTF-8 BOM CSV export.

⁠Supported platforms

This image is published as a multi-architecture manifest:

  • linux/amd64 for common x86_64 Linux servers
  • linux/arm64 for Apple Silicon and ARM Linux servers

⁠Tags

  • 0.1.1 — stable release image
  • latest — latest published stable release

For reproducible deployment, use a versioned tag such as 0.1.1 rather than latest.

⁠Run with Docker Compose

The repository includes the required Compose deployment assets:

docker/
├── Dockerfile
├── compose.yaml
├── container.env.example
└── kiro-credit-usage.crontab.template

Create a private environment file outside the repository:

cp docker/container.env.example /etc/kiro-credit-usage/container.env
chmod 600 /etc/kiro-credit-usage/container.env

Set the image version and required host paths:

KIRO_IMAGE_TAG=0.1.1
KIRO_CONFIG_FILE=/srv/kiro-credit-usage/config.local.toml
KIRO_DATA_DIR=/srv/kiro-credit-usage/data
KIRO_AWS_DIR=/srv/kiro-credit-usage/aws-profile
KIRO_ADMIN_TOKEN_FILE=/srv/kiro-credit-usage/.admin-token
KIRO_UID=1000
KIRO_GID=1000
KIRO_HTTP_PORT=8080

Pull and start the long-running dashboard container:

docker compose \
  --env-file /etc/kiro-credit-usage/container.env \
  -f docker/compose.yaml pull web

docker compose \
  --env-file /etc/kiro-credit-usage/container.env \
  -f docker/compose.yaml up --no-build --detach web

The dashboard listens on 0.0.0.0:8080 by default.

⁠Refresh data

The refresh service is a one-shot container. It reads the mounted AWS profile and writes snapshots only to the mounted data directory.

docker compose \
  --env-file /etc/kiro-credit-usage/container.env \
  -f docker/compose.yaml run --rm --no-build refresh

The repository provides a host-crontab template for a daily refresh at Beijing time 10:00:

docker/kiro-credit-usage.crontab.template

Cron runs on the host. It starts an ephemeral refresh container and does not require a separate cron container.

⁠Security notes

  • Do not put AWS credentials, refresh tokens, local configuration, or snapshots into the image or repository.
  • Mount config.local.toml, the AWS profile directory, and the administrator token as read-only paths.
  • The container root filesystem is read-only. Only the mounted data/ directory and /tmp are writable.
  • The dashboard provides anonymous read access by design for controlled intranets. Do not expose it directly to the public internet.
  • Use TLS, network restrictions, and user authentication before any broader deployment.
  • AWS SSO profiles may fail for unattended scheduled refreshes after their cached session expires. Use an approved renewable server credential mechanism for long-running automation.

Tag summary

Content type

Image

Digest

sha256:1db2f2384…

Size

112.7 MB

Last updated

2 days ago

docker pull chowrex/kiro-credit-usage-web