A small utility to import/manage Obelisk data files and maintain its _manifest.json.
- Can import files into a manifest-manager folder.
- Updates
_manifest.jsonto catalogue files and their metadata within the folder. - Can also work with a live Git repository; handles pulling, committing and pushing.
- Generates compact and deterministic manifests for clean repository commits.
- Understands JSON and common image extensions; skips hidden/underscored names and directories.
Requirements:
- uv (recommended to run or develop) — https://docs.astral.sh/uv/
- Git CLI on PATH (only required for the live-import command)
One-off execution - no need to download or install:
uvx git+https://github.com/arkutils/obelisk-manager --helpNote
The Git URL for uvx will be replaced by a simple package name in future, but the Git URL will always work.
If you have already downloaded/clone this repo you can run it locally:
uv run obelisk-manager --helpWe offer multiple commands that perform different levels of functionality.
Simply update or create a folder's manifest (non-recursive):
uvx git+https://github.com/arkutils/obelisk-manager update-manifest path/to/folder
# or give the manifest file directly
uvx git+https://github.com/arkutils/obelisk-manager update-manifest path/to/folder/_manifest.jsonCopy files into a destination folder then update the manifest:
uvx git+https://github.com/arkutils/obelisk-manager add-files inputs/*.json path/to/folder
# allow filtered files (hidden/underscored or unrecognised types)
uvx git+https://github.com/arkutils/obelisk-manager add-files --all inputs/ path/to/folderImport files into a live Git repository, updating its manifest:
uvx git+https://github.com/arkutils/obelisk-manager live-import -r /path/to/repo inputs/*.json data/asb/
# customise the commit message
uvx git+https://github.com/arkutils/obelisk-manager live-import -r /path/to/repo \
-t "Imported $total changes to $path" \
-b "Automated import via CI" \
inputs/ data/All commands support common flags: -v/--verbose (repeatable), -q/--quiet (repeatable), --dry-run, and --version. See --help for more information about them.
Create, update or delete _manifest.json for an existing directory based on files present there.
uvx git+https://github.com/arkutils/obelisk-manager update-manifest <FOLDER|_manifest.json> [--dry-run] [-v|-q]Behavior:
- Scans the folder (non-recursive) and creates a manifest for allowed file types.
- If there are no valid entries, the existing manifest is deleted; otherwise it is updated.
- A new manifest will be created from scratch if there was none before.
- With
--dry-run, no files are modified; exit code 2 indicates changes would be made.
Copy files into a destination folder and update its manifest.
uvx git+https://github.com/arkutils/obelisk-manager add-files <INPUTS...> <DEST_PATH> [--allow-all|-a] [--dry-run] [-v|-q]Behavior:
- Expands directory inputs one level deep to their immediate files.
- Filters files using the rules above unless
--allow-allis passed. - Copies files, then updates
<DEST_PATH>/_manifest.json.
Import into a live Git repository, updating manifest and performing Git actions.
uvx git+https://github.com/arkutils/obelisk-manager live-import -r <REPO> <INPUTS...> <DEST_PATH> \
[--git-reset] [--skip-pull] [--skip-push] \
[--allow-all|-a] [--title <T>] [--body <B>] [--exclude-file-list] \
[--dry-run] [-v|-q]Workflow:
- Validate the repo and Git availability.
- Ensure the repo is clean; fetch and fast-forward (or
--git-resetfor a hard reset) unless--skip-pull. - Copy supplied inputs into
<REPO>/<DEST_PATH>and update its manifest. - If the manifest changed, commit and push (skip with
--skip-pushor implied by--skip-pull).
Commit messages:
- Use
--title/-tand--body/-bto customise.$added,$updated,$removed,$totalare available. - Additionally,
$pathis provided as the destination path value. - Include a formatted file change list by default; suppress with
--exclude-file-list.
- "git CLI not found": ensure Git is installed and available on PATH.
- "Repository has uncommitted changes": commit/stash, pass
--skip-pullto proceed without syncing, or pass--git-resetto perform a hard reset to origin/main before processing. - "Destination path must be an existing directory" (live-import): create the folder in the repo (e.g.
data/asb/). - "Some unhandled files are excluded": pass
--allow-allif you intend to include them.
Run checks and tests with uv:
uv run ruff check --fix
uv run pyright
uv run pytest tests/unit
uv run pytest tests/integrationRun locally:
uv run obelisk --help- Run above checks
- Ensure everything is committed
uv version --bump [major|minor|patch]- Update CHANGELOG.md with a section for the new version
- Commit using title
Release <version>(nov) - Create a new annotated tag:
git tag -a v<version> - Push changes and new tag:
git push --follow-tags - Create release in GitHub from the tag
This software is offered under the MIT license. All contributions will be placed under this license.