{"id":25023057,"url":"https://github.com/crystallizeapi/cli","last_synced_at":"2026-02-11T01:11:40.921Z","repository":{"id":272374121,"uuid":"916373271","full_name":"CrystallizeAPI/cli","owner":"CrystallizeAPI","description":"The ultimate Crystallize CLI","archived":false,"fork":false,"pushed_at":"2026-02-06T20:39:23.000Z","size":395,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T07:29:14.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crystallizeapi.github.io/cli/","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrystallizeAPI.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-14T00:56:49.000Z","updated_at":"2026-02-06T20:39:04.000Z","dependencies_parsed_at":"2025-03-07T18:23:31.207Z","dependency_job_id":"b84c4572-c96f-494f-9b4d-add7919bb965","html_url":"https://github.com/CrystallizeAPI/cli","commit_stats":null,"previous_names":["crystallizeapi/cli"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/CrystallizeAPI/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystallizeAPI%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystallizeAPI%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystallizeAPI%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystallizeAPI%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrystallizeAPI","download_url":"https://codeload.github.com/CrystallizeAPI/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrystallizeAPI%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29323983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T00:34:26.354Z","status":"ssl_error","status_checked_at":"2026-02-11T00:34:09.494Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-05T14:35:53.061Z","updated_at":"2026-02-11T01:11:40.914Z","avatar_url":"https://github.com/CrystallizeAPI.png","language":"TypeScript","readme":"# Crystallize CLI\n\nThe ultimate CLI for managing your Crystallize project.\n\n## Context\n\nThis new version is fully written in Bun and can be installed in a much more standard way. The CLI is built for the future of Crystallize, whether you're using it locally to enhance your Developer Experience or within your CI/CD pipelines to automate tasks.\n\n\u003e **Fun fact:** You don't even need Node or Bun to run it—it's pre-compiled with everything included.\n\n### Replacing Legacy CLIs\n\nTwo older CLIs—`@crystallize/cli` and `@crystallize/cli-next`—are now deprecated. These were available on NPM and installable via `npx` (or similar), and while they still function, they are now primarily used for installing legacy templates.\n\n## Installation\n\n```bash\ncurl -LSs https://crystallizeapi.github.io/cli/install.bash | bash\n```\n\n\u003e Concerned about what [this script](https://github.com/CrystallizeAPI/cli/blob/main/docs/install.bash) does? It's fully open-source, so you can review it yourself. It primarily detects your OS and platform to download the [latest version](https://github.com/CrystallizeAPI/cli/releases) of the CLI from GitHub.\n\n## Features\n\nThe CLI enhances Developer Experience while also being CI/CD-friendly for automation.\n\n- **Boilerplate Installation:** Automates tedious setup steps:\n    1. Cloning the repository\n    2. Creating the tenant\n    3. Populating data in the tenant\n    4. Setting up the `.env` file\n    5. Installing dependencies\n\n- **Tenant Management:** Currently supports `create` for empty tenants and generating `invitations` for existing ones. Future contributions are welcome!\n\n- **Token Management:** Fetch and generate access tokens easily.\n\n- **Image Uploads:** Quickly upload and register images, whether a single file or an entire folder.\n\n- **Mass Operations:** Experimental but functional. You can `dump` your content model as JSON, `run` mass operations, and `execute` sets of mutations.\n\n## Interactivity\n\nMost commands are interactive. If credentials are missing, or input is required, the CLI will prompt you. To disable interactivity (e.g., in a CI environment), use `--no-interactive` where applicable.\n\n## Credentials\n\nThe CLI stores credentials in `~/.crystallize/credentials.json` when saved interactively. It checks for credentials in the following order:\n\n1. **Environment variables:** `CRYSTALLIZE_ACCESS_TOKEN_ID` and `CRYSTALLIZE_ACCESS_TOKEN_SECRET`\n2. **Command options:** `--token_id` and `--token_secret`\n3. **Stored file:** `~/.crystallize/credentials.json`\n\n## Boilerplate Installation\n\nAn interactive command designed to simplify setting up boilerplates.\n\n```bash\n~/crystallize boilerplate install \u003cfolder\u003e [tenant-identifier] [boilerplate-identifier]\n```\n\n- `folder` (required): The installation directory.\n- `tenant-identifier` and `boilerplate-identifier` (optional): If omitted, a wizard will guide you.\n\n## Tenant Management\n\n### Creating a Tenant\n\nCreates a new tenant and removes default shapes for a clean setup.\n\n```bash\n~/crystallize tenant create \u003ctenant-identifier\u003e\n```\n\n- Runs non-interactively with `--no-interactive` if [credentials](#credentials) are available.\n- If the identifier is taken, the CLI will inform you and suggest an alternative.\n\n### Inviting Users to a Tenant\n\nGenerates invitation links for new users.\n\n```bash\n~/crystallize tenant invite \u003ctenant-identifier\u003e\n```\n\nOptions:\n\n- `--role`: Default is `tenantAdmin`, but other roles are available.\n- `--expiry`: Default is 6 hours; you can customize it.\n- `--number`: Default is 1; you can generate multiple invites.\n\n## Image Upload\n\nUploads and registers images in the Asset Organizer.\n\n```bash\n~/crystallize image upload \u003ctenant-identifier\u003e \u003cfile\u003e [output-file]\n```\n\n- `file` can be a single file or a folder (uploading all contained images).\n- `output-file` (optional) stores mappings for automation.\n\nExample output:\n\n```json\n{\n    \"clean-name-png\": \"crystallize-key\",\n    \"images-crystallize-png\": \"my-tenant/25/1/12/3435d2d0/images/crystallize.png\"\n}\n```\n\nUse `--force` to overwrite an existing `output-file`.\n\n## Mass Operations\n\n### Dumping the Content Model\n\nCreates a Mass Operation file containing the content model (_Shapes_ and _Pieces_).\n\n```bash\n~/crystallize mass-operation dump-content-model \u003ctenant-identifier\u003e \u003cfile\u003e\n```\n\nUse `--force` to overwrite an existing file.\n\n### Running a Mass Operation\n\nExecutes a Mass Operation file by uploading it, registering the operation, and waiting for completion.\n\n```bash\n~/crystallize mass-operation run \u003ctenant-identifier\u003e \u003cfile\u003e\n```\n\n- Use `--legacy-spec` to convert an old Spec File to a Mass Operation file.\n\n### Executing Mutations\n\nA client-side utility to automate mutations.\n\n```bash\n~/crystallize mass-operation execute-mutations \u003ctenant-identifier\u003e \u003cfile\u003e [image-mapping-file]\n```\n\n- `file`: Contains the mutations (format below).\n- `image-mapping-file` (optional): Injects image paths into variables.\n\n#### Mutation Format\n\n```json\n{\n    \"create-products\": {\n        \"target\": \"pim\",\n        \"mutation\": \"mutation CreateProduct($input: CreateProductInput!) { product { create(language: \\\"en\\\", input: $input) { id } } }\",\n        \"sets\": []\n    },\n    \"publish-items\": {\n        \"mutation\": \"mutation PublishItems($ids: [ID!]!) { publishItems(language: \\\"en\\\", ids: $ids) { success { itemId } } }\",\n        \"target\": \"core\",\n        \"sets\": [{ \"ids\": [\"$create-products[0].product.create.id\"] }]\n    }\n}\n```\n\n#### Dependency Management\n\nUse references like `$create-products[0].product.create.id` to pass IDs from one operation to another.\n\n#### Injected Variables\n\n- `$root.TENANT_ID`\n- `$root.TENANT_DEFAULT_VATTYPE_ID`\n- `$root.TENANT_ROOT_ID`\n\n#### Image Mapping File\n\n```json\n{\n    \"images\": [\n        { \"key\": \"$images.crystallize-key\" },\n        { \"key\": \"$images.my-tenant/25/1/12/3435d2d0/images/crystallize.png\" }\n    ]\n}\n```\n\n## Contributing\n\nThe CLI resides in [CrystallizeAPI/tools](https://github.com/CrystallizeAPI/tools), a read-only split from the main repo.\n\nFor issues or contributions, submit them to the main repository: [CrystallizeAPI/tools](https://github.com/CrystallizeAPI/tools).\n\n[crystallizeobject]: crystallize_marketing|folder|67ae7f698dcd1f699563c8d5\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystallizeapi%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrystallizeapi%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystallizeapi%2Fcli/lists"}