{"_id":"@assetflux.io/cli","name":"@assetflux.io/cli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@assetflux.io/cli","version":"1.0.0","description":"CLI for AssetFlux — upload assets, manage versions, control rollouts","license":"BSD-3-Clause","homepage":"https://assetflux.io","repository":{"type":"git","url":"git+https://github.com/Patryczon/AssetFlux.git","directory":"cli"},"keywords":["cli","assets","asset-management","cdn","deployment","rollout","images"],"engines":{"node":">=18.0.0"},"bin":{"assetflux":"bin/assetflux.js"},"main":"dist/index.js","scripts":{"build":"tsc","dev":"ts-node src/index.ts"},"dependencies":{"chalk":"^4.1.2","commander":"^12.1.0","form-data":"^4.0.1","ora":"^5.4.1"},"devDependencies":{"@types/node":"^20.0.0","ts-node":"^10.9.2","typescript":"^5.5.0"},"_id":"@assetflux.io/cli@1.0.0","gitHead":"9c56242a3db33faa3f5c27c5673308fc93cb4d17","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/Patryczon/AssetFlux/issues"},"_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-oFBDUM7fbozu1uJ6jacHl925XuBY9IHL5Gco7NyIkVpyj4fVi43vri+tlorRveie6L+WkUsbGsGGt4/ryX7jJw==","shasum":"9fd470849bdcd5f854b603a95b637693908eab70","tarball":"https://registry.npmjs.org/@assetflux.io/cli/-/cli-1.0.0.tgz","fileCount":45,"unpackedSize":105778,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICWHg1ZHRjPVfJMkH66SGtyuPCGMXVtwbg33xrauB3cGAiBwwG/fiCBbDherYGSkw8RB16pNCyewPhEgtaenEss7DA=="}]},"_npmUser":{"name":"assetflux","email":"support@assetflux.io"},"directories":{},"maintainers":[{"name":"assetflux","email":"support@assetflux.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.0_1770804728316_0.19148559745851212"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-11T10:12:08.232Z","1.0.0":"2026-02-11T10:12:08.459Z","modified":"2026-02-11T10:12:08.658Z"},"maintainers":[{"name":"assetflux","email":"support@assetflux.io"}],"description":"CLI for AssetFlux — upload assets, manage versions, control rollouts","homepage":"https://assetflux.io","keywords":["cli","assets","asset-management","cdn","deployment","rollout","images"],"repository":{"type":"git","url":"git+https://github.com/Patryczon/AssetFlux.git","directory":"cli"},"bugs":{"url":"https://github.com/Patryczon/AssetFlux/issues"},"license":"BSD-3-Clause","readme":"# AssetFlux CLI\n\n[![npm version](https://img.shields.io/npm/v/assetflux.svg)](https://www.npmjs.com/package/assetflux)\n[![License: BSD-3-Clause](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nCommand-line tool for managing assets on the [AssetFlux](https://assetflux.io) platform. Upload images, manage versions, control rollouts, and fetch SDK manifests — all from your terminal or CI/CD pipeline.\n\n## Install\n\n```bash\nnpm install -g assetflux\n```\n\nRequires Node.js 18 or later.\n\n## Quick Start\n\n```bash\n# Authenticate (opens browser)\nassetflux login\n\n# Configure your project\nassetflux config set projectId af_your_project_id\n\n# Upload an asset\nassetflux assets upload hero.png --key home.hero.banner\n\n# Upload a new version\nassetflux assets upload-version hero-v2.png --key home.hero.banner\n\n# Roll out the new version to 25% of users\nassetflux deploy rollout home.hero.banner --percentage 25\n\n# Promote to 100%\nassetflux deploy promote home.hero.banner --version <version-id>\n```\n\n## Authentication\n\n```bash\n# Browser-based OAuth (default)\nassetflux login\n\n# Email and password\nassetflux login --no-browser\n\n# API key (for CI/CD)\nassetflux login --api-key afk_your_key_here\n\n# Clear credentials\nassetflux logout\n```\n\n## Commands\n\n### `assetflux config`\n\nManage CLI configuration. Settings are stored in `~/.assetflux/`.\n\n```bash\nassetflux config set apiUrl https://api.assetflux.io/api/v1\nassetflux config set projectId af_your_project_id\nassetflux config set apiKey afk_your_api_key\n\nassetflux config get projectId\nassetflux config list\n```\n\n| Key | Description |\n|-----|-------------|\n| `apiUrl` | API base URL (default: `https://api.assetflux.io/api/v1`) |\n| `projectId` | Default project ID for all commands |\n| `apiKey` | API key for authentication |\n\n### `assetflux assets`\n\nManage assets within a project.\n\n```bash\n# List all assets\nassetflux assets list\n\n# Get asset details and versions\nassetflux assets get home.hero.banner\n\n# Upload a new asset\nassetflux assets upload hero.png --key home.hero.banner\n\n# Upload a new version of an existing asset\nassetflux assets upload-version hero-v2.png --key home.hero.banner\n\n# Delete an asset (with confirmation)\nassetflux assets delete home.hero.banner\n\n# Delete without confirmation prompt\nassetflux assets delete home.hero.banner --yes\n```\n\nUse `-p <id>` to override the default project ID on any subcommand.\n\n### `assetflux deploy`\n\nControl deployments and rollouts.\n\n```bash\n# Promote a version to production\nassetflux deploy promote home.hero.banner --version <version-id>\n\n# Set rollout percentage (0–100)\nassetflux deploy rollout home.hero.banner --percentage 50\n\n# Rollback to a previous version\nassetflux deploy rollback home.hero.banner --version <version-id> --reason \"Regression\"\n\n# Bulk promote from a JSON file\nassetflux deploy bulk-promote --file promotions.json --percentage 10\n```\n\nThe bulk promote JSON file format:\n\n```json\n[\n  { \"assetKey\": \"home.hero.banner\", \"versionId\": \"ver_abc123\" },\n  { \"assetKey\": \"home.logo\", \"versionId\": \"ver_def456\" }\n]\n```\n\n### `assetflux manifest`\n\nFetch the SDK manifest for a project (useful for debugging).\n\n```bash\nassetflux manifest\nassetflux manifest --api-key afk_your_sdk_key --project af_your_project_id\n```\n\n## CI/CD Usage\n\nAll commands support `--json` for machine-readable output:\n\n```bash\nassetflux assets list --json | jq '.data[].key'\n```\n\nAuthenticate in CI with an API key:\n\n```bash\nassetflux login --api-key $ASSETFLUX_API_KEY\nassetflux config set projectId $ASSETFLUX_PROJECT_ID\nassetflux assets upload build/hero.png --key home.hero.banner\n```\n\n## Configuration\n\nThe CLI stores configuration and credentials in `~/.assetflux/`:\n\n| File | Contents |\n|------|----------|\n| `config.json` | API URL, project ID, API key |\n| `credentials.json` | Access token (mode 0600) |\n\n## License\n\nBSD 3-Clause. See [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md","_rev":"1-e7d3144b9c3c93445d03af687d063c9c"}