trycase
v0.1.24
Published
CLI for TryCase disposable test environments.
Maintainers
Readme
TryCase CLI
TryCase gives coding agents disposable Linux environments where they can upload code, run apps, control a browser or visible desktop, capture screenshots and recordings, collect logs and artifacts, and clean up billable resources.
Recommended Start
Install the universal TryCase Agent Skills:
npx skills add bencsn/trycase-skills --skill trycase-cli --skill trycase-run-linux-app -gThen ask your agent:
Use $trycase-run-linux-app to run this repo in TryCase and return screenshots, recordings, logs, and cleanup status.The agent should install or invoke the CLI itself if trycase is missing.
Run The CLI
Run without installing:
npx trycase@latest login
bunx trycase@latest login
pnpm dlx trycase@latest loginUse npx trycase@latest ... or bunx trycase@latest ... when you want to force the newest published CLI.
Or install globally:
npm install -g trycase
trycase loginAlternative package managers:
bun add -g trycase
pnpm add -g trycase
yarn global add trycaseFirst Verified Preview
This is the lowest-friction route for local code. It creates a private No Source project, starts a headless environment, uploads the current directory, runs the app, captures proof, and destroys the environment when done.
trycase login
trycase workspace list
trycase project create --source none --name local-preview --mode headless
# Optional: only after user approval when a local dotenv file exists
trycase project secret import --project <project> --file .env.local
trycase project secret file add --project <project> --path .env.local --include DATABASE_URL,APP_SECRET
trycase env create --project <project>
trycase env wait <env>
trycase fs upload <env> . . --respect-gitignore
trycase terminal open <env>
trycase terminal write <session> "npm install && npm run dev" --env <env> --enter
trycase computer browser goto <env> http://localhost:3000
trycase computer browser screenshot <env>
trycase computer browser recording <env>
trycase artifact bundle <env>
trycase env destroy <env>Ask before importing local dotenv files. Keep source transfer on the upload-first route.
Mental Model
TryCase has three main objects:
- Workspace: billing, credits, users, and projects.
- Project: reusable setup such as source route, default size, default environment mode, runtime settings, and secrets.
- Environment: one disposable running Linux machine. Create it, wait for it, use it, collect proof, then destroy it.
Environment modes:
--mode headless: default for CLI and LLM verification. Supports terminal, filesystem, browser automation, screenshots, recordings, logs, metrics, and artifacts.--mode desktop: adds a visible Linux desktop, live view, desktop apps, mouse, keyboard, windows, and clipboard. Use it when the user needs to watch/control the environment, when desktop APIs are required, or when the app needs a manual step such as login, OAuth consent, CAPTCHA, passkey, 2FA/OTP, payment confirmation, account creation, or browser extension approval. Costs 1.5x the credits of headless mode for the same runner size.- There is no
--mode computer.trycase computer ...is a command namespace for cross-mode status and browser automation.
Runner sizes should match the workload. Inspect the repo, runtime, install/build/test commands, expected disk output, and whether desktop mode is needed, then pass --size nano, --size small, --size standard, or --size large. Use nano only for clearly tiny work, standard for general unknown apps, and large for Docker-heavy, JVM/Android, native build, monorepo, or disk-heavy tasks. large is the largest public-beta size currently available.
Size guide:
| Size | Resources | Upload cap | Good fit |
| --- | --- | --- | --- |
| nano | 1 vCPU, 1 GiB RAM, 10 GiB disk | 2 GiB | Tiny scripts, static pages, small docs/tools, and quick smoke checks. |
| small | 1 vCPU, 2 GiB RAM, 20 GiB disk | 4 GiB | Lightweight Node/Python/Go apps and simple APIs. |
| standard | 2 vCPU, 4 GiB RAM, 40 GiB disk | 8 GiB | General web apps, Docker Compose, databases, moderate builds, and most desktop checks. |
| large | 4 vCPU, 8 GiB RAM, 80 GiB disk | 16 GiB | Monorepos, heavier Compose stacks, JVM/Rails/native builds, and larger tests. |
Command namespaces:
trycase env ...: create, wait, inspect, execute, and destroy environments.trycase terminal ...: persistent CLI terminal sessions. They do not open visible windows in the live desktop.trycase computer browser ...: browser navigation, snapshots, clicks, screenshots, recordings, console, and network output.trycase desktop ...: visible desktop app, mouse, keyboard, window, screenshot, and recording commands. Requires desktop mode.trycase fs ...: read, write, upload directories, and export files as artifacts.
Useful discovery and cleanup commands:
trycase project list --json
trycase project show <project> --json
trycase env list --active --json
trycase env list --project <project> --limit 10
trycase env destroy --all-active --json
trycase project delete <project> --yes
trycase project delete <project> --yes --forceproject delete --force first stops active environments for that project, then removes the project from future lists. Historical environment records stay available by environment ID.
Common Routes
Upload-first project:
trycase login
trycase workspace list
trycase project create --source none --name local-preview --mode headless
printf "%s" "$APP_SECRET" | trycase project secret set --project <project> --name APP_SECRET --value-stdin
trycase project secret required add --project <project> APP_SECRET
trycase project secret file add --project <project> --path .env.local --include APP_SECRET
trycase env create --project <project>
trycase env wait <env>
trycase fs upload <env> . . --respect-gitignore
trycase computer browser goto <env> http://localhost:3000
trycase computer browser screenshot <env>
trycase artifact bundle <env>
trycase env destroy <env>Visible desktop route for live viewing, desktop APIs, or manual user action:
trycase env create --project <project> --mode desktop
trycase env wait <env>
trycase env view <env> --no-open
trycase desktop app launch <env> terminal
trycase desktop app launch <env> browser http://localhost:3000
trycase desktop screenshot <env>
trycase desktop recording start <env>
trycase desktop recording stop <env>
trycase env destroy <env>For manual login, OAuth consent, CAPTCHA, passkey, 2FA/OTP, payment confirmation, account creation, or browser extension approval, share the URL printed by trycase env view <env> --no-open, ask the user to use the live desktop "take control" interaction, and resume after they confirm the step is complete. Do not ask users to paste passwords, OTPs, or CAPTCHA answers into chat.
Blank environment without source checkout:
trycase project create --source none --name scratch --mode headless
trycase env create --project <project>
trycase env wait <env>
trycase fs upload <env> . . --respect-gitignore
trycase terminal open <env>
trycase terminal write <session> "printf 'console.log(2 + 2)\n' > scratch.js && node scratch.js" --env <env> --enter --wait-for 4
trycase env destroy <env>Files And Secrets
For one file, use trycase fs write <env> <target> --file <local-file>. For directories, use trycase fs upload <env> <local-path> <target-path>; . works for either path, so trycase fs upload <env> . . uploads the current directory into the environment repo root.
Pass --respect-gitignore when local gitignore rules should exclude ignored files. Directory uploads are capped by environment size: nano 2 GiB, small 4 GiB, standard 8 GiB, and large 16 GiB uncompressed per upload. The runner checks free disk before extraction and returns a readable error if the environment does not have enough space.
Secrets are project-scoped, encrypted at rest, and write-only to users. After explicit user approval, use trycase project secret import --project <project> --file .env for dotenv imports. Use trycase project secret file add for generated files such as .env.local, and trycase project secret hook add --run-at before_install for custom setup scripts. Never pass secret values as command arguments; use --value-stdin, --env, --file, or import --file.
Run trycase doctor to check sign-in and selected workspace state.
Full command docs: https://www.trycase.dev/docs
