Metadata-Version: 2.4
Name: artifact-locker
Version: 0.1.0
Summary: OCI-only artifact catalog CLI
Author: OpenAI Codex
License: GPL-3.0-only
License-File: LICENSE
Keywords: artifacts,catalog,locker,oci,oras
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: build>=1.2.2; extra == 'dev'
Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.11.0; extra == 'dev'
Description-Content-Type: text/markdown

# artifact-locker

`artifact-locker` is a Python CLI for maintaining a local catalog of curated
artifacts and publishing or pulling that catalog through OCI with `oras`.

The CLI is designed to be operator-friendly:
- `add` prompts for missing fields instead of forcing you to remember flags
- most metadata fields are optional
- artifacts can be staged from a local file or tracked as a URL-only reference
- `find`, `show`, and `remove` work from filename or free-text query, not just an opaque ID

## Commands

- `artifact-locker init`
- `artifact-locker add [source-or-url]`
- `artifact-locker list [query]`
- `artifact-locker find <query>`
- `artifact-locker show <query>`
- `artifact-locker remove <query>`
- `artifact-locker verify --catalog|--local|--all`
- `artifact-locker push [tag]`
- `artifact-locker pull`
- `artifact-locker doctor`

## Repo Layout

```text
.
├── catalog/
│   ├── artifacts.json
│   └── checksums.txt
├── config.json
├── staging/
│   └── release-assets/
└── .artifact-locker/
    └── state.json
```

`config.json` stores non-secret defaults such as the OCI repository name and
the managed local artifact directory. The default managed path is:

```text
~/.local/share/artifact-locker/artifacts
```

Registry authentication is intentionally external to the application; use
`oras login` when pushes require credentials.

For ECR Public repositories, a typical login flow is:

```bash
aws ecr-public get-login-password --region us-east-1 | \
  oras login -u AWS --password-stdin public.ecr.aws
```

By default, commands use the managed catalog under
`~/.local/share/artifact-locker/`. Use `--catalog /path/to/dir` only when you
want an alternate catalog location.

## Usage

Interactive add:

```bash
artifact-locker add
artifact-locker add ./Seatbelt.exe
artifact-locker add https://example.test/tool.zip
```

Non-interactive add:

```bash
artifact-locker add ./Seatbelt.exe \
  --platform windows \
  --category bin \
  --version v1.0.0 \
  --no-input
```

Find and manage artifacts without remembering the generated ID:

```bash
artifact-locker find seatbelt
artifact-locker show Seatbelt.exe
artifact-locker remove seatbelt
```

Push with an automatic date tag:

```bash
artifact-locker push
```

When omitted, the push tag defaults to the current date in `vYYYY-MM-DD`
format.

## Development

```bash
python -m pytest
python -m build
```

For local commit-time linting, install the pre-commit hook once:

```bash
pip install -e .[dev]
pre-commit install
```

Then before each commit, the hook will run Ruff automatically. You can also run
it manually:

```bash
pre-commit run --all-files
```

For local push-time test gating, install the repo pre-push hook:

```bash
ln -sf ../../scripts/pre-push .git/hooks/pre-push
```

That hook runs `pytest` from `venv/bin/pytest` when available.
