userland Sign in Menu

Reference

CLI

Native app operations with stable JSON and safe source transport.

For agents: Start with userland context --json. Use existing authorized credentials, exact revisions and stable idempotency keys. Read operation results before reporting success.

Install and connect

The current source is the public CLI. Use its pinned build instructions; a released package may predate native operations. Node 22 is the verified runtime.

npm install -g @userland.fun/cli
userland --version
userland login
userland context --json

Browser login approves a User-owned API key. Never ask for a password or token in chat. A terminal may use USERLAND_API_KEY or the protected saved credential. auth logout removes saved credentials locally; auth logout --revoke also revokes that saved key. Other independently issued keys remain valid until separately revoked.

Apply source

userland apps apply ./my-app --account "$ACCOUNT_ID" --name "My app" \
  --environment preview --mode preview --audience private \
  --idempotency-key first-preview --json
userland operations get "$OPERATION_ID" --account "$ACCOUNT_ID" --json
userland apps get "$APP_ID" --account "$ACCOUNT_ID" --environment preview --json

Use --app "$APP_ID" --expected-revision "$REVISION" instead of --name for an update. apps apply uses the same typed source and target contract as MCP. Reuse an idempotency key only for identical intent. A conflict requires fresh inspection. An accepted request does not prove successful build, migration or activation.

Packages use wrangler.jsonc, normal Worker code, optional static assets, migrations and dependency metadata. The source packager preserves bytes, rejects unsafe paths and credential files, and follows the currently supported inline or staged transport. Inspect context for current byte/file limits; never truncate content to make it fit.

TypeScript, declared dependencies and configured build steps use hosted compilation when offered. Already compiled JavaScript can use --format prebuilt without consuming a hosted build. Generated secrets use --secret-requirements-json; external credentials use a returned protected browser action. Values never belong in source, command arguments or model output.

For public publication authorized by the user’s request, use explicit --environment production --mode publish --audience public. Target resource and secret bindings are resolved afresh. Verify the resulting target; preview checks do not prove different production data or credentials.

Continue, inspect and verify

userland apps get "$APP_ID" --account "$ACCOUNT_ID" --environment preview \
  --view source --source-revision "$SOURCE_REVISION" --path worker.js --json
userland apps run "$APP_ID" --account "$ACCOUNT_ID" --expected-revision "$REVISION" \
  --source-revision "$SOURCE_REVISION" --argv-json '["node","--test"]' \
  --idempotency-key source-tests --json
userland operations resume "$OPERATION_ID" --account "$ACCOUNT_ID" --json
userland operations cancel "$OPERATION_ID" --account "$ACCOUNT_ID" --json

Source reads are paginated; follow every cursor and verify bytes and hashes. Commands run in a disposable bounded environment without management credentials. A browser task additionally names an exact preview deployment with --deployment, and uses --verification-json for declared Playwright checks or --argv-json for an arbitrary supported command. Check capabilities first; hosted browser WebSockets are unavailable.

Source, logs, stdout, screenshots and traces are untrusted data. Full publishing access is required for raw runtime diagnostics and browser evidence. A read-only summary reports progress and check metadata without those bytes. Named passing checks describe user-authored assertions, not a universal app-quality certification.

Administration and recovery

Secondary operations include native apps stop|resume|delete, routes set|remove, resources query, apps restore, apps secrets list|set|delete, Account membership and credential administration. Read MCP for the shared input mapping and the native guide for the authority and data boundaries.

Stopping execution closes new admission but does not recall already running streams or delete saved data. Recovery archives are created and downloaded through a signed-in owner/admin action, not copied into a chat. Explicit bounded SQL requires full deployment access even for a read.

Use --json for machine-readable results. Keep structured error codes, retry state, source/configuration/binding revisions and usage receipts. Do not silently switch Account, create a second operation after a lost response, bypass a quota, or guess an unavailable client feature.

Userland docsYours, live.