packages/twenty-docs/developers/extend/apps/operations/cli.mdx
Beyond dev, dev:build, dev:add, and dev:typecheck, the yarn twenty CLI provides commands for executing functions, viewing logs, and managing app installations.
yarn twenty dev:function:exec)Run a logic function manually without triggering it via HTTP, cron, or database event:
# Execute by function name
yarn twenty dev:function:exec -n create-new-post-card
# Execute by universalIdentifier
yarn twenty dev:function:exec -u e56d363b-0bdc-4d8a-a393-6f0d1c75bdcf
# Pass a JSON payload
yarn twenty dev:function:exec -n create-new-post-card -p '{"name": "Hello"}'
# Execute the post-install function
yarn twenty dev:function:exec --postInstall
yarn twenty dev:function:logs)Stream execution logs for your app's logic functions:
# Stream all function logs
yarn twenty dev:function:logs
# Filter by function name
yarn twenty dev:function:logs -n create-new-post-card
# Filter by universalIdentifier
yarn twenty dev:function:logs -u e56d363b-0bdc-4d8a-a393-6f0d1c75bdcf
yarn twenty app:uninstall)Remove your app from the active workspace:
yarn twenty app:uninstall
# Skip the confirmation prompt
yarn twenty app:uninstall --yes
A remote is a Twenty server that your app connects to. During setup, the scaffolder creates one for you automatically. You can add more remotes or switch between them at any time.
# Add a new remote (opens a browser for OAuth login)
yarn twenty remote:add
# Connect to a local Twenty server (auto-detects port 2020 or 3000)
yarn twenty remote:add --local
# Add a remote non-interactively (useful for CI)
yarn twenty remote:add --url https://your-twenty-server.com --api-key $TWENTY_API_KEY --as my-remote
# List all configured remotes
yarn twenty remote:list
# Set the active remote
yarn twenty remote:use <name>
Your credentials are stored in ~/.twenty/config.json.