CLI Commands Reference
Reference guide for all commands and options available in the acodez CLI.
Global Options
These options apply to all commands or control CLI output behavior:
| Option / Variable | Description |
|---|---|
-q, --quiet | Suppress all decorative banners, spinners, and info logs; emit only critical errors |
-V, --version | Output the current version of the CLI |
-h, --help | Display usage instructions and available command flags |
NO_COLOR=1 | Disable ANSI color sequences (also honored automatically when stdout is non-TTY) |
acodez init [dir]
Initializes a new Acode plugin directory.
bash
acodez init my-plugin [options]Options
| Option | Description | Default |
|---|---|---|
-y, --yes | Skip interactive prompts and use defaults | false |
-n, --name <name> | Plugin display name | "My Acode Plugin" |
-i, --id <id> | Plugin ID (must match ^[a-z][a-z0-9._]{3,49}$) | "com.example.plugin" |
-v, --ver <version> | Initial plugin version | "1.0.0" |
--author-name <name> | Author display name | "Acode Developer" |
--author-email <email> | Author contact email | "" |
--author-github <user> | Author GitHub handle | "" |
-r, --repository <url> | GitHub Repository URL | "" |
-l, --license <license> | License type | "MIT" |
-p, --price <price> | Price in INR | 0 |
-o, --obfuscate | Enable production obfuscation flag | false |
--lang <language> | Template language (TypeScript or JavaScript) | "TypeScript" |
--skip-install | Skip automatic dependency installation | false |
--pm <manager> | Package manager to use (bun, pnpm, npm, or yarn) | "bun" |
--no-git | Skip initializing a Git repository | false |
acodez dev
Starts the local development server with direct-to-device zero-restart hot reloading.
bash
acodez dev [options]Options
| Option | Description | Default |
|---|---|---|
-p, --port <port> | Port to run development server on | 3000 |
-H, --host <host> | Host address to bind development server to | "0.0.0.0" |
Endpoints & Shortcuts
- Endpoints:
http://<host>:<port>/plugin.zip— Compiled plugin package for initial installation.http://<host>:<port>/plugin.json— Live manifest metadata.http://<host>:<port>/main.js— Live compiled plugin script with cache-busting headers.ws://<host>:<port>— WebSocket bridge for console streaming and HMR signals.
- Shortcuts:
r— Manually trigger reload broadcast to all connected Acode instances.q— Cleanly exit and dispose of watchers.
acodez build
Compiles and packages the plugin for production release.
bash
acodez build [options]Options
| Option | Description |
|---|---|
--clean | Wipe dist/ and plugin.zip before compilation |
-o, --obfuscate | Force enable code obfuscation |
--no-obfuscate | Force disable code obfuscation |
--json | Output production build metrics and asset sizes as structured JSON |
-q, --quiet | Suppress spinners and decorative output (exits with code 0 on success) |
- Minifies JavaScript and compiled CSS for Chrome 90+ WebViews.
- Optimizes images inside
assets/and compressesicon.pngunder store limits. - Outputs production statistics report with file sizes.
acodez lint
Runs the multi-engine code health and type-safety analyzer.
bash
acodez lint [options]Options
| Option | Description |
|---|---|
--fix | Automatically resolve fixable linting and formatting issues |
--types | Run deep TypeScript compiler diagnostics (tsc) |
--no-cache | Disable persistent caching and re-analyze all files |
--json | Output linting issues and compiler diagnostics in structured JSON format |
-q, --quiet | Suppress banners and spinners; exits non-zero on failure |
acodez scan
Runs local security and compliance analysis using the native Rust plugin_scanner binary.
bash
acodez scan [options]Options
| Option | Description |
|---|---|
--json | Output raw scanner diagnostic results as JSON |
-q, --quiet | Suppress non-essential logs and scanner progress messages |
- Inspects AST and manifest metadata.
- Reports security violations, risky APIs, or oversize icon assets before store submission.
acodez publish
Builds, scans, and uploads your plugin directly to the official Acode Store registry via Bearer API Key.
bash
acodez publish [options]Options
| Option | Description |
|---|---|
-k, --key <apiKey> | Bearer API Key (acode_...) from acode.app/api-keys |
--dry-run | Compile and run pre-flight scans without uploading to the store |
Workflow
- Resolves API key from
--key,ACODE_API_KEYenvironment variable, or~/.acodez/apiKey. - Compiles production bundle and crushes assets.
- Runs pre-flight security scan with
plugin_scanner. - Checks if the plugin exists on
https://acode.app/api/plugin/<id>. - Submits new plugins (
POST /api/plugin) or publishes updates (PUT /api/plugin) with changelog attachment.