{"slug": "cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus", "title": "Cbash – Rust POSIX Hub, 2FA Vault, and Scoped SDK for AI CLIs and GPUs", "summary": "A new MIT-licensed Rust command-line tool called cbash has been released, offering a single POSIX interface across 11 AI backends including Claude, Codex, Gemini, Grok and free open models, plus 9 GPU compute targets such as Slurm, Modal, Ray, Kubernetes and Hugging Face Jobs. cbash keeps personal, .edu, business and free accounts signed in side by side through isolated config directories with exit-12 failover, and stores keys locally in an encrypted vault using Argon2id and XChaCha20-Poly1305 with optional 2FA via OS Keychain or keyfile. The tool also adds scoped per-app SDK capability tokens and fail-closed SHA-256 plus SLSA provenance releases, targeting developers who juggle differing vendor flags and authentication states across AI CLIs.", "body_md": "100% OPEN SOURCE (MIT) / SUPER FAST / WRITTEN IN RUST\n\nOne CLI for every AI model, account, and GPU.\n\ncbash puts one super fast, 100% open source Rust command in front of Claude, Codex, Gemini, Grok, free open models, and 9 GPU clusters. Tired of memorizing different flags and logging out to switch between personal, .edu, and work accounts? You are not alone.\n\nUse the exact same -P, -m, -f ndjson, and --permission readonly flags across 11 AI backends.\n\n02 / ZERO LOGOUTS\n\nKeep personal, .edu, business, and free accounts signed in side by side with isolated config dirs and exit-12 failover.\n\n03 / FREE MODELS + 9 GPUS\n\nBuilt-in cbash free open models (Open Research, Hugging Face, OpenRouter, Ollama) plus cbash compute for Slurm, Modal, Ray, K8s, and HF Jobs.\n\n04 / ENCRYPTED VAULT\n\nStore keys locally in cbash vault with Argon2id + XChaCha20-Poly1305 and 0 ms overhead on normal runs. 100% open source (MIT).\n\n01 / LIVE\n\nLive Command Collapser\n\nPick any provider, isolated account tier, and task, or spin Flag Roulette to roll random terminal chaos. Watch vendor flags and environment variables collapse into one POSIX command backed by src/providers.rs and src/compute.rs.\n\nWithout cbash (vendor syntax + manual auth state)0 chars\n\nWith cbash (uniform POSIX contract)Copy command\n\nInspect --dry-run output\n\n02 / DIAGNOSE\n\nMulti-CLI Fatigue Symptom Checker\n\nCheck every workaround living in your dotfiles or shell history, dial in your account and cluster counts, and share your diagnosis on X.\n\nYou typed --output-format stream-json into codex exec and wondered why nothing streamed.+15You logged out of your personal Claude account to use your .edu credits, then forgot to switch back before work.+15Running grep on your ~/.zshrc reveals four OPENAI_API_KEY_* exports with numbers at the end.+15Your automation script scraped vendor stderr text for \"rate limit\" and broke when a CLI reworded one error line.+15You wanted a safe read-only audit, passed --sandbox read-only to gemini, and hit an unknown flag error.+10You stored a Hugging Face or OpenRouter key in plaintext inside a config file and had to rotate tokens on a Friday.+10You burned twenty minutes checking whether Modal takes --env, Slurm takes --gres, or HF Jobs takes --flavor.+10Your wrapper CLI boots an interpreted Node or Python runtime just to print --help before making one network call.+10\n\ncbash compute run -C modal-dev --dry-run -- python train.py\n\ntinker\n\nTraining\n\ntinker run\n\nTINKER_API_KEY, TINKER_BASE_URL\n\ncbash compute run -C tinker-lab --dry-run -- python rl.py\n\nhf-jobs\n\nServerless\n\nhf jobs run\n\nHF_TOKEN via secret_ref / secret_env\n\ncbash compute run -C hf-a10g --dry-run -- python eval.py\n\nopen-research\n\nCluster\n\nOpen Research HTTP API\n\nOPEN_RESEARCH_API_KEY, OPEN_RESEARCH_COMPUTE_URL\n\ncbash compute run -C or-cluster --dry-run -- python run.py\n\nkubernetes\n\nCluster\n\nkubectl run\n\nKUBECONFIG, --context, --namespace\n\ncbash compute run -C k8s-gpu --dry-run -- python job.py\n\nvercel-sandbox\n\nSandbox\n\nvercel sandbox exec\n\nVERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID\n\ncbash compute run -C vercel-dev --dry-run -- npm test\n\nprime-intellect\n\nSandbox\n\nprime pods exec\n\nPRIME_API_KEY\n\ncbash compute run -C prime-rl --dry-run -- python train.py\n\nslurm\n\nCluster\n\nsrun / sbatch\n\n--partition, --account, --gres gpu:<spec>\n\ncbash compute run -C slurm-mit --dry-run -- python train.py\n\nray\n\nCluster\n\nray job submit\n\nRAY_ADDRESS\n\ncbash compute run -C ray-cluster --dry-run -- python worker.py\n\n04 / SECURITY\n\nZero-Trust Security, 2FA Vault, and Semantic Exit Codes\n\nHardened for security-conscious developers: Argon2id + XChaCha20-Poly1305 with optional 2FA OS Keychain/keyfile wrapping, scoped per-app SDK capability tokens, fail-closed SHA-256 + SLSA provenance releases, and zero daemon.\n\n2FA VAULT\n\nOptional --hardware-key (OS Keychain) or --keyfile mixes a random 256-bit machine secret with Argon2id, blocking offline password cracking even if vault.json is stolen.\n\nSCOPED SDK GRANTS\n\nIssue per-app cbash_app_... tokens (SHA-256 hashed at rest) capping allowed profiles, --max-permission readonly, and daily turn limits. Work and GPU accounts stay hidden.\n\nNever modifies ~/.claude*, ~/.codex, or ~/.gemini. Temporary credential reads wipe via Zeroizing. No background server and zero prompt logging.\n\nArgon2id + XChaCha20-Poly1305 + Opt-In 2FA Vault\n\ncbash vault encrypts API tokens inside vault.json beside config.toml. Normal commands never open the vault unless a profile sets vault:<KEY>.\n\nKDF + 2FAArgon2id (v0x13, 64 MiB, t=3, p=4, bounded against DoS) + optional 256-bit OS Keychain or keyfile second factor + --generate-passphrase\n\nAEAD cipherXChaCha20-Poly1305 with 256-bit key, fresh 128-bit OsRng salt, and fresh 192-bit random nonce rotated on every write\n\nTamper checkVersion, KDF params, cipher, 2FA mode, and salt are bound via AAD. Any 1-bit header, nonce, or ciphertext edit fails with exit 11.\n\nMemory & I/Ozeroize::Zeroizing wipes keys and decrypted maps on drop. Atomic temp rename with 0600 Unix mode. No raw vault get CLI dump.\n\nNormal-run tax0 ms KDF cost when executing subscription CLIs (~8 ms cold start).\n\ncbash vault init --hardware-key --generate-passphrasecbash vault set HF_TOKEN --from-env HF_TOKEN\ncbash sdk grant my-agent --profiles claude --max-permission readonly --daily-limit 50\ncbash sdk policy --strict-auth true\n\nSemantic POSIX Exit Codes (Failover on 12)\n\nOrchestrators and shell scripts branch deterministically on numeric exit status. When account quota runs out, exit 12 triggers clean failover to your next profile or free endpoint.\n\nCode\n\nConstant\n\nOrchestrator Action\n\n0\n\nOK\n\nConsume stdout\n\n2\n\nUSAGE_ERROR\n\nFix flags or config; do not retry\n\n10\n\nPROVIDER_NOT_FOUND\n\nRun cbash doctor or pick another provider\n\n11\n\nAUTH_ERROR\n\nRe-auth profile or check vault passphrase\n\n12\n\nRATE_LIMITED\n\nFail over immediately to next -P profile\n\n13\n\nUNSUPPORTED\n\nFlag rejected fail-closed by backend\n\n14\n\nCONTEXT_EXCEEDED\n\nCompact input prompt and retry\n\n15\n\nPERMISSION_DENIED\n\nAdjust --permission policy\n\n16\n\nTIMEOUT\n\nIncrease --timeout or retry\n\n17\n\nNETWORK_ERROR\n\nRetry with backoff\n\n130\n\nINTERRUPTED\n\nPropagate SIGINT cancellation\n\ngit diff | cbash run -P claude-work \"Review diff\"\nrc=$?\nif [ \"$rc\" -eq 12 ]; then\ngit diff | cbash run -P free-openrouter \"Review diff\"\nfi\n\n05 / SDK\n\nConnect Your Agentic App to User Subscriptions\n\nStop asking users to paste API keys into your IDE extension, agent harness, or desktop app. Shell out to cbash sdk discover --json to detect every Claude, Codex, Gemini, Grok, GPU, and free endpoint already authenticated on their machine — with zero secrets exposed.\n\nZERO-DEPENDENCY APP INTEGRATION\n\n5 Lines to Discover & Run Any Subscription\n\ncbash sdk discover --json returns a stable cbash-sdk/v1 manifest containing masked account hints, capabilities, and ready-to-spawn invoke.argv arrays. Your app never touches vendor credentials or logs the user out.\n\nTypeScriptPythonRustGoMCP / Agent\n\n``` js\nimport { execFileSync, spawn } from \"node:child_process\";\n\nconst { subscriptions } = JSON.parse(\n  execFileSync(\"cbash\", [\"sdk\", \"discover\", \"--json\"], { encoding: \"utf8\" })\n);\n\n// Spawn any user subscription with streaming NDJSON + read-only guard\nconst [bin, ...args] = subscriptions[0].invoke.argv;\nconst child = spawn(bin, [...args, \"--permission\", \"readonly\", \"Review diff\"]);\n```\n\nZero API keys stored in your appCLI: cbash sdk snippet ts|python|rust|go|mcp\n\nEmails are masked by default (r***@gmail.com), raw tokens and vendor credential files are never returned, and per-app grants (cbash sdk grant <app> --profiles claude --max-permission readonly) keep your work and GPU accounts invisible to untrusted apps.\n\n$ cbash sdk discover --jsonCopy\n\n```\n{\n  \"sdk_version\": \"cbash-sdk/v1\",\n  \"subscriptions\": [\n    {\n      \"id\": \"claude\",\n      \"provider\": \"claude\",\n      \"tier\": \"personal\",\n      \"plan\": \"max\",\n      \"signed_in\": true,\n      \"account_hint\": \"r***@gmail.com\",\n      \"invoke\": {\n        \"argv\": [\"cbash\", \"run\", \"-P\", \"claude\", \"-f\", \"ndjson\"],\n        \"chat_argv\": [\"cbash\", \"chat\", \"-P\", \"claude\"]\n      }\n    }\n  ],\n  \"compute_services\": [\n    { \"service\": \"modal\", \"category\": \"compute\", \"detail\": \"active\" },\n    { \"service\": \"prime-intellect\", \"category\": \"compute\" }\n  ]\n}\n```\n\n06 / OPEN SOURCE\n\n100% Open Source Under MIT\n\nBuilt in the open, compiled to a single stripped Rust binary, and verified by an executable POSIX conformance suite.\n\n100% open sourceMIT LicenseRust 1.78+\n\nBuilt in the open. Built for speed.\n\ncbash is 100% open source under the MIT License with zero proprietary components and zero runtime lock-in. Test your own AI CLI wrapper against the spec using cbash conformance <binary>, or add a provider driver in src/providers.rs and compute adapter in src/compute.rs.\n\nInstall the SHA-256 verified release binary, auto-detect every local Claude, Codex, Gemini, and Grok folder without moving your existing configs, sign in across services, and self-update anytime.", "url": "https://wpnews.pro/news/cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus", "canonical_source": "https://cbash.ai", "published_at": "2026-12-01 17:34:08+00:00", "updated_at": "2026-12-01 17:46:59.044553+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "ai-infrastructure", "ai-safety"], "entities": ["cbash", "Claude", "Codex", "Gemini", "Grok", "Hugging Face", "Modal", "Kubernetes"], "also_reported_by": [], "takeaway": "cbash replaces per-vendor flags and auth state with one POSIX contract (-P, -m, -f ndjson, --permission readonly) across 11 AI backends and 9 compute targets, with isolated config dirs for parallel accounts and an Argon2id + XChaCha20-Poly1305 vault adding 0 ms overhead on normal runs.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus", "markdown": "https://wpnews.pro/news/cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus.md", "text": "https://wpnews.pro/news/cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus.txt", "jsonld": "https://wpnews.pro/news/cbash-rust-posix-hub-2fa-vault-and-scoped-sdk-for-ai-clis-and-gpus.jsonld"}}