CLI to securely CRUD objects over HTTP using a Bearer token.
This project is part of the Open Collective project Simply Hexagonal and is open to updates by its users, we ensure that PRs are relevant to the community. In other words, if you find a bug or want a new feature, please help us by becoming one of the contributors ✌️ ! See the contributing section.
Please consider:
- Buying me a coffee ☕
- Supporting me on Patreon 🏆
- Starring this repo on Github 🌟
- Node.js 22+
vaultcore reads configuration from flags or environment variables:
- Flags (take priority):
--base-url: Base URL (your CloudFront FQDN), e.g.https://vaultcore.example.com--token: Bearer token
- Environment variables:
VAULTCORE_BASE_URLVAULTCORE_TOKEN- Also supported (for compatibility with envrepo flows):
ENV_REPO_BASE_URL,ENV_REPO_TOKEN
- Env files (auto-loaded if present in current working directory):
vaultcore.envenvrepo.env
Example vaultcore.env:
VAULTCORE_BASE_URL=https://vaultcore.example.com
VAULTCORE_TOKEN=your-super-secret-tokenNotes:
- The base URL scheme is optional; if omitted,
https://is assumed. Trailing slashes are removed.
npx vaultcore --helpGeneral form:
npx vaultcore <command> [options]Upload a new object from a local file.
npx vaultcore create <s3Key> <filePath> [--content-type <mime>] [--base-url ...] [--token ...]Example:
npx vaultcore create folder/file.txt ./file.txt --content-type text/plainReplace an existing object with a local file.
npx vaultcore update <s3Key> <filePath> [--content-type <mime>] [--base-url ...] [--token ...]Example:
npx vaultcore update folder/file.txt ./file.txt --content-type text/plainDownload an object to a local path. If outPath is omitted, the basename of the key is used in the current working directory.
npx vaultcore read <s3Key> [outPath] [--base-url ...] [--token ...]Example:
npx vaultcore read folder/file.txt ./downloaded.txt
# or defaults to ./file.txt
npx vaultcore read folder/file.txtDelete an object by key.
npx vaultcore delete <s3Key> [--base-url ...] [--token ...]Example:
npx vaultcore delete folder/file.txt0: Success- Non-zero: An error occurred (details printed to stderr)
Apache-2.0