CBASH-1
100% OPEN SOURCE (MIT) / SUPER FAST / WRITTEN IN RUST

One CLI for every AI model, account, and GPU.

cbash 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.

Install from source (Rust 1.78+, thin LTO, stripped)
git clone https://github.com/ricfulop/cbash.git
cd cbash && cargo install --path . && cbash init
Try Live Collapser Take Sanity Test CBASH-1 Spec
01 / ONE GRAMMAR
Use the exact same -P, -m, -f ndjson, and --permission readonly flags across 11 AI backends.
02 / ZERO LOGOUTS
Keep personal, .edu, business, and free accounts signed in side by side with isolated config dirs and exit-12 failover.
03 / FREE MODELS + 9 GPUS
Built-in cbash free open models (Open Research, Hugging Face, OpenRouter, Ollama) plus cbash compute for Slurm, Modal, Ray, K8s, and HF Jobs.
04 / ENCRYPTED VAULT
Store keys locally in cbash vault with Argon2id + XChaCha20-Poly1305 and 0 ms overhead on normal runs. 100% open source (MIT).
01 / LIVE

Live Command Collapser

Pick 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.

Flag Roulette Engine FLAGS DODGED: 3
1. Provider AI CLI
2. Account tier isolated dir
3. Task stdin pipe
Without cbash (vendor syntax + manual auth state) 0 chars
With cbash (uniform POSIX contract)

          
02 / DIAGNOSE

Multi-CLI Fatigue Symptom Checker

Check every workaround living in your dotfiles or shell history, dial in your account and cluster counts, and share your diagnosis on X.

4
1 account+3 pts / extra10 accounts
3
0 clusters+3 pts / backend9 backends
Live diagnosis 2 / 8 symptoms
48 / 154 fatigue index

Chronic Profile Whiplash

Post to X
03 / ROSETTA

The Rosetta Stone Matrix

Every flag translation across 11 AI backends, 4 built-in free open-model endpoints, and 9 compute backends in one reference view.

11 AI Backends (claude, codex, gemini, opencode, grok, ollama, local, posix, open-research, huggingface, openrouter)

Concept cbash (CBASH-1) claude codex gemini opencode HTTP free routers (3)
One-shot prompt cbash run "<prompt>" claude -p "<prompt>" codex exec -- "<prompt>" gemini -p "<prompt>" opencode run "<prompt>" POST /v1/chat/completions
Model select -m <id> --model <id> -m <id> -m <id> -m <id> "model": "<id>"
Structured stream -f ndjson --output-format stream-json --verbose --json --output-format stream-json --format json Wrapped in cbash/v1
Read-only policy --permission readonly --permission-mode plan --sandbox read-only --approval-mode default Exit 13 (fail-closed) Exit 13 (fail-closed)
Account isolation -P <profile> CLAUDE_CONFIG_DIR CODEX_HOME GEMINI_CLI_HOME XDG_CONFIG_HOME + XDG_DATA_HOME api_key_env or vault:<KEY>

4 Built-in Free Open-Model Endpoints (cbash free)

Catalog Entry Provider Default Model Auth Env Var Ready Profile from cbash init
open-research-deepseek open-research deepseek-ai/DeepSeek-R1 OPEN_RESEARCH_API_KEY cbash run -P free-open-research "..."
hf-qwen-coder huggingface Qwen/Qwen2.5-Coder-32B-Instruct HF_TOKEN cbash run -P free-huggingface "..."
openrouter-free openrouter openrouter/free OPENROUTER_API_KEY cbash run -P free-openrouter "..."
ollama-local ollama llama3.2 / qwen2.5-coder:32b None (OLLAMA_HOST) Zero-cost local binary on 127.0.0.1:11434

9 Compute and Sandbox Backends (cbash compute)

Backend Category CLI or Transport Auth and Isolation Dry-Run Translation Example
modal Serverless modal run MODAL_PROFILE, MODAL_TOKEN_ID, MODAL_TOKEN_SECRET cbash compute run -C modal-dev --dry-run -- python train.py
tinker Training tinker run TINKER_API_KEY, TINKER_BASE_URL cbash compute run -C tinker-lab --dry-run -- python rl.py
hf-jobs Serverless hf jobs run HF_TOKEN via secret_ref / secret_env cbash compute run -C hf-a10g --dry-run -- python eval.py
open-research Cluster Open Research HTTP API OPEN_RESEARCH_API_KEY, OPEN_RESEARCH_COMPUTE_URL cbash compute run -C or-cluster --dry-run -- python run.py
kubernetes Cluster kubectl run KUBECONFIG, --context, --namespace cbash compute run -C k8s-gpu --dry-run -- python job.py
vercel-sandbox Sandbox vercel sandbox exec VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID cbash compute run -C vercel-dev --dry-run -- npm test
prime-intellect Sandbox prime pods exec PRIME_API_KEY cbash compute run -C prime-rl --dry-run -- python train.py
slurm Cluster srun / sbatch --partition, --account, --gres gpu:<spec> cbash compute run -C slurm-mit --dry-run -- python train.py
ray Cluster ray job submit RAY_ADDRESS cbash compute run -C ray-cluster --dry-run -- python worker.py
04 / CONTRACT

Encrypted Local Vault and Semantic Exit Codes

Keep keys out of dotfiles without paying a KDF tax on normal CLI invocations, and branch failover logic on exit codes instead of parsing stderr text.

Argon2id + XChaCha20-Poly1305 Vault

cbash vault encrypts API tokens inside vault.json beside config.toml. Normal commands never open the vault unless a profile sets vault:<KEY>.

  • KDF Argon2id (v0x13): 64 MiB memory, 3 iterations, 4 lanes, 16-byte OsRng salt
  • AEAD cipher XChaCha20-Poly1305 with 256-bit key and 192-bit random nonce per save
  • Tamper check Header metadata is bound via AAD; Poly1305 authenticates both ciphertext and header. Any 1-bit edit fails with exit 11.
  • Memory & I/O zeroize::Zeroizing wipes keys on drop. Atomic temp rename with 0600 Unix mode.
  • Normal-run tax 0 ms KDF cost when executing subscription CLIs or env-var profiles.
cbash vault init cbash vault set HF_TOKEN --from-env HF_TOKEN cbash profile add hf-vault --provider huggingface --secret-ref vault:HF_TOKEN cbash run -P hf-vault --dry-run "Verify redaction"

Semantic POSIX Exit Codes (Failover on 12)

Orchestrators 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.

Code Constant Orchestrator Action
0OKConsume stdout
2USAGE_ERRORFix flags or config; do not retry
10PROVIDER_NOT_FOUNDRun cbash doctor or pick another provider
11AUTH_ERRORRe-auth profile or check vault passphrase
12 RATE_LIMITED Fail over immediately to next -P profile
13UNSUPPORTEDFlag rejected fail-closed by backend
14CONTEXT_EXCEEDEDCompact input prompt and retry
15PERMISSION_DENIEDAdjust --permission policy
16TIMEOUTIncrease --timeout or retry
17NETWORK_ERRORRetry with backoff
130INTERRUPTEDPropagate SIGINT cancellation
git diff | cbash run -P claude-work "Review diff" rc=$? if [ "$rc" -eq 12 ]; then git diff | cbash run -P free-openrouter "Review diff" fi
05 / OPEN SOURCE

100% Open Source Under MIT

Built in the open, compiled to a single stripped Rust binary, and verified by an executable POSIX conformance suite.

100% open source MIT License Rust 1.78+

Built in the open. Built for speed.

cbash 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.

Quick setup and conformance (MIT)
cbash init
cbash doctor
cbash free
cbash conformance cbash