SNiX CLI (Official Command Line Tool)
SNiX CLI (
@snippkit/cli) is the official command-line interface for SnippKit, engineered to fetch, inspect, execute, upload, and manage your cloud snippets and CLI command playbooks directly inside your terminal session.Whether you are automating multi-step deployment pipelines, executing sandboxed scripts across 10 programming languages, or pushing local code directly to folders, SNiX CLI connects your SnippKit workspace to your command line.
Overview
Context switching to a browser to copy shell scripts or configuration templates slows down developer velocity.
With SNiX CLI v2 installed globally, you have instant access to your cloud library:
- Canonical Command Grammar: Predictable
snix <resource> <action>syntax. - Isolated Execution Engine: Run Python, Node.js, Bash, Go, Rust, Java, and PowerShell scripts in isolated temp environments with direct binary invocation (
shell: false). - AES-256 Vault Encryption: API Keys are encrypted locally at rest on your filesystem.
- Source Code Uploads (
push): Upload single files, batches, or full directory trees with interactive folder selection and inline metadata modifiers. - Ambiguity Guard: Safe deletion engine prevents accidental data loss if a slug exists in both snippets and commands.
Direct App Shortcut
View the interactive landing page at /services/cli or generate your secret API key at Developer Settings (
/settings/developer).Interactive Terminal Simulation
Below is a live interactive simulation of SNiX CLI v2 authenticating, listing snippets, and executing a script:
bash — snix v2.0.3
CLI v2
Installation & Setup
1. Requirements
- Node.js:
18.0.0or higher - Operating Systems: macOS, Linux, Windows (PowerShell / Command Prompt / WSL)
2. Install globally via NPM
BASH
npm install -g @snippkit/cli
Verify installation and check installed version:
BASH
snix --version
3. Authenticate your CLI
Log in using your secret SnippKit API Key (
sk_live_... generated from Developer Settings):BASH
snix auth login
The CLI securely prompts for your API key and encrypts it locally in an AES-256 credential vault. It does not require manual username entry.
4. Verify active identity
Check your authenticated identity, user handle, email, API URL, and key status:
BASH
snix auth status
# or fast shortcut:
snix whoami
Complete Command Reference (v2)
1. Authentication (snix auth)
| Command | Flags / Aliases | Description |
|---|---|---|
| snix auth login | --key <token> | Prompts for API Key (sk_live_...) and stores it in local AES-256 vault. |
| snix auth status | snix whoami | Displays active username, email, API URL, and masked credential status. |
| snix auth logout | - | Purges local encrypted vault and clears stored session. |
2. Code Snippet Management (snix snippets)
| Command | Flags / Options | Description |
|---|---|---|
| snix snippets list | --page <n>, --limit <n> | List all code snippets with full UUIDs/slugs, visibility badges, sizes, and timestamps. |
| snix snippets show <id> | - | Render snippet source code with colorized syntax highlighting in terminal. |
| snix snippets pull <id> | -f, --file <path> | Download snippet to a local file (defaults to title_slug.ext). |
| snix snippets delete <ids...> | -y, --yes | Permanently delete one or more snippets from database in batch. |
3. Command Playbook Management (snix commands)
| Command | Flags / Options | Description |
|---|---|---|
| snix commands list | --page <n>, --limit <n> | List all command playbooks with step counts, visibility, size, and timestamps. |
| snix commands show <id> | - | Render ordered playbook steps, comments, and shell directives. |
| snix commands pull <id> | -f, --file <path> | Download command playbook definition as JSON. |
| snix commands delete <ids...> | -y, --yes | Permanently delete one or more command playbooks in batch. |
4. Execution Engine (snix run, snix script, snix cmd)
| Command | Shortcuts | Description |
|---|---|---|
| snix run script <id> | snix script <id> | Execute a code script inside an isolated temporary directory with direct runner invocation. |
| snix run scripts <id1> <id2...> | snix script <id1> <id2...> | Execute multiple code scripts sequentially. |
| snix run command <id> | snix cmd <id> | Execute a multi-step shell command playbook with interactive parameter prompt. |
| snix run commands <id1> <id2...> | snix cmd <id1> <id2...> | Execute multiple command playbooks in sequential order. |
| snix run <id> | - | Smart runner: auto-detects whether the target ID/slug is a code snippet or command playbook. |
5. Source Code Upload (snix push)
Upload local files and directories directly into your SnippKit cloud account:
BASH
# 1. Upload a single file (default private)
snix push app.py
# 2. Upload with public visibility
snix push app.py --public
# 3. Bulk upload multiple files
snix push main.py utils.js config.json
# 4. Upload directory recursively into a destination folder
snix push ./scripts -r --folder "DevOps"
# 5. Granular inline per-file modifiers
snix push file1.py:private:title="Core App":slug=core-app:language=python
Inline File Modifier Reference:
:public/:private— Explicit visibility override.:title="<name>"— Custom display title.:slug=<slug>— Custom URL slug identifier.:language=<lang>— Explicit language override (e.g.:language=typescript).
6. Diagnostics, Search & Safe Deletion
| Command | Options / Flags | Description |
|---|---|---|
| snix doctor | - | Checks Node.js, OS platform, API connection, and 10 language runners. |
| snix search <query> | - | Searches library across both code snippets and command playbooks. |
| snix delete <ids...> | -y, --yes / snix rm | Unified deletion with Ambiguity Guard if an identifier exists in both collections. |
| snix config | - | Inspect CLI configuration parameters and local vault metadata securely. |
Language Runner Support (snix doctor)
SNiX CLI's execution engine automatically binds script extensions and language headers to installed host binaries:
| Language | Recognized Extensions / Identifiers | Default Host Binary |
|---|---|---|
| Python | .py, python, python3 | python3 / python |
| Node.js / JavaScript | .js, .mjs, .cjs, javascript | node |
| TypeScript / Deno | .ts, typescript, deno | deno run / ts-node |
| Bash / Shell | .sh, .bash, bash, shell | bash |
| PowerShell | .ps1, powershell, pwsh | pwsh / powershell |
| Go | .go, go, golang | go run |
| Rust | .rs, rust | rustc |
| Java | .java, java | java |
| Ruby | .rb, ruby | ruby |
| PHP | .php, php | php |
Run
snix doctor in your terminal to see a green checkmark next to each available language runner on your system.Security & Vault Details
- API Keys: Keys use format
sk_live_...generated from Developer Settings. - AES-256 Vault: Credentials stored locally in
~/.snippkit/credentials.jsonare encrypted using AES-256-GCM. - Local Decryption: All private snippets and command playbooks are decrypted on your local machine before execution or rendering.
Related Documentation
- Shell Scripts — Store and execute multi-line Bash, Zsh, and PowerShell scripts.
- CLI Commands — Build multi-step terminal command playbooks with parameter placeholders.
- Developer API Keys — Create and manage personal API access tokens.
- VSCode Extension — Browse and insert snippets inside Visual Studio Code.
Copyright © 2026 SnippKitUp to date