{"id":50795290,"url":"https://github.com/zerogpu/cli","last_synced_at":"2026-06-12T14:01:31.863Z","repository":{"id":359091306,"uuid":"1244446134","full_name":"zerogpu/cli","owner":"zerogpu","description":"Terminal CLI for the ZeroGPU Orchestration API — classify, summarize, redact PII, extract entities, and chat from your shell","archived":false,"fork":false,"pushed_at":"2026-05-29T10:14:46.000Z","size":385,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T12:17:18.261Z","etag":null,"topics":["ai-cli","ai-inference","distributed-inference","edge-inference","gliner","iab-classification","inference-cli","llm-cli","named-entity-recognition","nano-language-models","openai-compatible","pii-detection","pii-redaction","slm","small-language-models","structured-extraction","text-summarization","typescript","zero-shot-classification","zerogpu"],"latest_commit_sha":null,"homepage":"https://zerogpu.ai/","language":"TypeScript","has_issues":true,"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/zerogpu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2026-05-20T09:16:56.000Z","updated_at":"2026-05-29T10:14:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zerogpu/cli","commit_stats":null,"previous_names":["zerogpu/cli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zerogpu/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerogpu","download_url":"https://codeload.github.com/zerogpu/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34247461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai-cli","ai-inference","distributed-inference","edge-inference","gliner","iab-classification","inference-cli","llm-cli","named-entity-recognition","nano-language-models","openai-compatible","pii-detection","pii-redaction","slm","small-language-models","structured-extraction","text-summarization","typescript","zero-shot-classification","zerogpu"],"created_at":"2026-06-12T14:01:11.357Z","updated_at":"2026-06-12T14:01:31.854Z","avatar_url":"https://github.com/zerogpu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zerogpu-cli\n\n[![npm version](https://img.shields.io/npm/v/zerogpu-cli.svg)](https://www.npmjs.com/package/zerogpu-cli)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nThe official command-line interface for [ZeroGPU](https://zerogpu.ai) — run fast, edge-optimized inference models (classification, extraction, redaction, chat, summarization) right from your terminal.\n\n---\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Authentication](#authentication)\n- [Commands](#commands)\n  - [Account](#account)\n    - [`login`](#login)\n    - [`status`](#status)\n  - [Chat \u0026 Generation](#chat--generation)\n    - [`chat`](#chat)\n    - [`chat_thinking`](#chat_thinking)\n    - [`summarize`](#summarize)\n    - [`generate_followups`](#generate_followups)\n  - [Classification](#classification)\n    - [`classify_iab`](#classify_iab)\n    - [`classify_iab_enriched`](#classify_iab_enriched)\n    - [`classify_structured`](#classify_structured)\n    - [`classify_zero_shot`](#classify_zero_shot)\n  - [Extraction](#extraction)\n    - [`extract_entities`](#extract_entities)\n    - [`extract_json`](#extract_json)\n    - [`extract_pii`](#extract_pii)\n    - [`redact_pii`](#redact_pii)\n- [Environment Variables](#environment-variables)\n- [Output](#output)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Installation\n\n```bash\nnpm install -g zerogpu-cli@latest\n```\n\nRequires **Node.js 20+**.\n\nVerify the install:\n\n```bash\nzerogpu --version\nzerogpu --help\n```\n\n---\n\n## Quick Start\n\n```bash\n# 1. Sign in (you'll be prompted for your API key and project ID)\nzerogpu login\n\n# 2. Check your session\nzerogpu status\n\n# 3. Run your first command\nzerogpu summarize \"ZeroGPU runs small, fast models at the edge so you can ship AI features without managing GPUs.\"\n```\n\n---\n\n## Authentication\n\nEvery inference command requires a valid API key **and** a project ID. You can provide them in two ways:\n\n1. **`zerogpu login`** — stores credentials in a local config file and exports `ZEROGPU_API_KEY` to your shell profile.\n2. **Environment variable** — set `ZEROGPU_API_KEY` directly (useful for CI). The project ID still needs to be saved via `login` or supplied through the config file.\n\nGet your API key (`zgpu-api-…`) and project ID (UUID) from the [ZeroGPU dashboard](https://zerogpu.ai).\n\n---\n\n## Commands\n\nAll commands follow the pattern:\n\n```bash\nzerogpu \u003ccommand\u003e [arguments] [options]\n```\n\nRun `zerogpu \u003ccommand\u003e --help` for command-level help.\n\n### Account\n\n#### `login`\n\nSign in to ZeroGPU. Prompts for your API key (masked input) and project ID, validates them, and persists the credentials.\n\n```bash\nzerogpu login\nzerogpu login --api-key zgpu-api-xxxxxxxx --project-id 4ed3e5bb-c2ed-4d4a-8a66-2b161a27fd1a\n```\n\n| Option | Description |\n|---|---|\n| `--api-key \u003ckey\u003e` | Provide the API key directly (skips the prompt). |\n| `--project-id \u003cid\u003e` | Provide the project ID directly (skips the prompt). |\n\n#### `status`\n\nCheck whether you're signed in and where the API key was loaded from.\n\n```bash\nzerogpu status\n```\n\n---\n\n### Chat \u0026 Generation\n\n#### `chat`\n\nChat with the **LFM2.5-1.2B-Instruct** model.\n\n```bash\nzerogpu chat \"Explain edge inference in one sentence.\"\nzerogpu chat \"Translate to French: Good morning.\" -i \"You are a precise translator.\"\n```\n\n| Option | Description |\n|---|---|\n| `-i, --instructions \u003ctext\u003e` | System instructions that steer the assistant's behavior. |\n\n#### `chat_thinking`\n\nChat with the **LFM2.5-1.2B-Thinking** model, which returns reasoning alongside its answer.\n\n```bash\nzerogpu chat_thinking \"If a train leaves at 3pm at 60mph, when does it arrive 180 miles later?\"\n```\n\n#### `summarize`\n\nSummarize text with the **llama-3.1-8b-instruct-fast** model.\n\n```bash\nzerogpu summarize \"Long article text goes here...\"\n```\n\n#### `generate_followups`\n\nGenerate contextual follow-up questions using the ZeroGPU follow-up edge model.\n\n```bash\nzerogpu generate_followups \"We just shipped a new pricing page focused on enterprise plans.\"\n```\n\n---\n\n### Classification\n\n#### `classify_iab`\n\nClassify text against the **IAB** audience and content taxonomy using the ZeroGPU IAB edge model.\n\n```bash\nzerogpu classify_iab \"Tips for first-time homebuyers in 2026.\"\n```\n\n#### `classify_iab_enriched`\n\nSame as `classify_iab` but returns enriched output: audience, topics, keywords, and intent.\n\n```bash\nzerogpu classify_iab_enriched \"Best running shoes for marathon training.\"\n```\n\n#### `classify_structured`\n\nClassify text against a **structured schema** of categories and allowed labels using GLiNER2.\n\n```bash\nzerogpu classify_structured \"The product arrived broken and I want a refund.\" \\\n  --schema '{\"sentiment\":[\"positive\",\"negative\",\"neutral\"],\"intent\":[\"complaint\",\"praise\",\"question\"]}'\n```\n\n| Option | Description |\n|---|---|\n| `-s, --schema \u003cjson\u003e` | **Required.** JSON object mapping category name → allowed labels. |\n\n#### `classify_zero_shot`\n\nZero-shot classification against arbitrary candidate labels using **DeBERTa v3**.\n\n```bash\n# Repeat --label for each candidate\nzerogpu classify_zero_shot \"The stock market dropped 3% today.\" \\\n  --label finance --label sports --label politics\n\n# Or pass them as a comma-separated list\nzerogpu classify_zero_shot \"The stock market dropped 3% today.\" \\\n  --labels finance,sports,politics\n```\n\n| Option | Description |\n|---|---|\n| `-l, --label \u003clabel\u003e` | Candidate label (repeatable). |\n| `--labels \u003ca,b,c\u003e` | Comma-separated list of candidate labels. |\n\n---\n\n### Extraction\n\n#### `extract_entities`\n\nExtract named entities from text using **GLiNER2** with custom labels.\n\n```bash\nzerogpu extract_entities \"Tim Cook visited the Cupertino campus on Tuesday.\" \\\n  --label person --label organization --label location --threshold 0.4\n```\n\n| Option | Default | Description |\n|---|---|---|\n| `-l, --label \u003clabel\u003e` | — | Entity label to extract (repeatable). |\n| `--labels \u003ca,b,c\u003e` | — | Comma-separated entity labels. |\n| `-t, --threshold \u003cnumber\u003e` | `0.3` | Confidence threshold between 0 and 1. |\n\n#### `extract_json`\n\nExtract **structured JSON** from text against a provided schema using GLiNER2.\n\n```bash\nzerogpu extract_json \"Email Jane Doe at jane@example.com or call 555-0100.\" \\\n  --schema '{\"contact\":[\"name::str::Full name\",\"email::str::Email address\",\"phone::str::Phone number\"]}'\n```\n\n| Option | Description |\n|---|---|\n| `-s, --schema \u003cjson\u003e` | **Required.** Schema as a JSON string. Field format: `name::type::description`. |\n\n#### `extract_pii`\n\nExtract PII entities (persons, emails, phone numbers, etc.) using `gliner-multi-pii-v1`.\n\n```bash\nzerogpu extract_pii \"Contact John Smith at john@acme.com or +1-415-555-0100.\" \\\n  --threshold 0.5 --categories identity,contact\n```\n\n| Option | Default | Description |\n|---|---|---|\n| `-t, --threshold \u003cnumber\u003e` | `0.5` | Confidence threshold. |\n| `-c, --categories \u003clist\u003e` | `identity,contact` | Comma-separated PII categories. |\n\n#### `redact_pii`\n\nDetect and **redact** PII in text — returns the input with sensitive spans masked by label.\n\n```bash\nzerogpu redact_pii \"Call Sarah at 415-555-0100 or email sarah@acme.com.\"\n```\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|---|---|\n| `ZEROGPU_API_KEY` | Overrides the API key from the config file. Set automatically by `zerogpu login` for your default shell. |\n\nThe project ID is read from the saved config file written during `zerogpu login`.\n\n---\n\n## Output\n\n- Inference commands print the model's response to **stdout**. When the response is valid JSON, it is pretty-printed.\n- Errors and diagnostic messages are written to **stderr**.\n- All commands exit with code **`0`** on success and **`1`** on failure — safe to use in pipelines and scripts.\n\nExample:\n\n```bash\nzerogpu classify_iab \"Tips for first-time homebuyers.\" \u003e result.json\n```\n\n---\n\n## Troubleshooting\n\n- **`You're not fully signed in yet.`** Run `zerogpu login` again, or check `zerogpu status`.\n- **`That doesn't look like a valid API key`** Keys must start with `zgpu-api-`.\n- **`That doesn't look like a valid project ID`** Project IDs must be a UUID (e.g. `4ed3e5bb-c2ed-4d4a-8a66-2b161a27fd1a`).\n- **`ZEROGPU_API_KEY` not picked up in a new shell:** open a new terminal, or `source` your shell config file (the `login` command prints the path).\n- **HTTP errors** are surfaced with the response status and body — inspect them to debug request issues.\n\n---\n\n## Contributing\n\nIssues and pull requests are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) and our [Code of Conduct](./CODE_OF_CONDUCT.md).\n\nSecurity concerns? See [SECURITY.md](./SECURITY.md).\n\n```bash\ngit clone https://github.com/zerogpu/cli.git\ncd cli\nnpm install\nnpm run build\nnpm test\n```\n\n---\n\n## License\n\nReleased under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerogpu%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerogpu%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerogpu%2Fcli/lists"}