LogoLogo
SlackLogin
  • Overview
    • Welcome
  • Setup & Configuration
    • Connecting to Trunk
    • Managing Your Organization
      • GitHub App Permissions
  • Integration with Slack
  • Flaky Tests (Beta)
    • Overview
    • Get Started
      • Test Frameworks
        • Android
        • Bazel
        • Behave
        • cargo-nextest
        • Cypress
        • Dart Test
        • Go
        • GoogleTest
        • Gradle
        • Jasmine
        • Jest
        • Karma
        • Maven
        • minitest
        • Mocha
        • Nightwatch
        • NUnit
        • Pest
        • PHPUnit
        • Playwright
        • Pytest
        • Robot Framework
        • RSpec
        • Swift Testing
        • Vitest
        • XCTest
        • Other Test Frameworks
      • CI Providers
        • Azure DevOps Pipelines
        • BitBucket Pipelines
        • Buildkite
        • CircleCI
        • Drone CI
        • GitHub Actions
        • GitLab
        • Jenkins
        • Semaphore CI
        • TeamCity
        • Travis CI
        • Other CI Providers
    • Dashboard
    • Flaky Test Detection
    • Quarantining
    • PR Comments
    • Ticketing Integrations
      • Jira Integration
      • Linear Integration
      • Other Ticketing Platforms
    • Webhooks
      • Slack Integration
      • Microsoft Teams Integration
      • GitHub Issues Integration
      • Linear Integration
    • Uploader CLI Reference
  • Merge Queue
    • Overview
    • How does it work?
    • Setup
      • Quick Start
      • Settings
      • Integration for Slack
    • Concepts and Optimizations
      • Predictive Testing
      • Optimistic Merging
      • Pending Failure Depth
      • Anti-Flake Protection
      • Batching
      • Parallel Queues
        • Bazel
        • Nx
        • API
      • FAQ
    • Priority
    • Managing Merge Queue
      • Using the Merge UI
      • Metrics
      • Command Line
    • Webhooks
    • Reference
  • Code Quality
    • Overview
    • Why Metalinters?
      • How does it work?
      • Why Code Quality?
    • Setup & Installation
      • Initialize Trunk
      • Local Linting
      • Linting in CI
      • Nightly Report (Deprecated)
    • IDE Integration
      • VSCode
      • Neovim
      • GitHub Codespaces
    • Linters
      • Supported Linters
        • Actionlint
        • Ansible-lint
        • Autopep8
        • Bandit
        • Biome
        • Black
        • Brakeman
        • buf
        • Buildifier
        • cfnlint
        • Checkov
        • circleci
        • ClangFormat
        • clang-tidy
        • Clippy
        • cmake-format
        • codespell
        • cspell
        • cue-fmt
        • dart
        • deno
        • Detekt
        • djlint
        • dotenv-linter
        • dotnet-format
        • dustilock
        • ESLint
        • Flake8
        • git-diff-check
        • Gitleaks
        • Gofmt
        • gofumpt
        • goimports
        • gokart
        • golangci-lint
        • golines
        • google-java-format
        • graphql-schema-linter
        • hadolint
        • haml-lint
        • isort
        • iwyu
        • ktlint
        • kube-linter
        • markdown-link-check
        • markdown-table-prettify
        • Markdownlint
        • markdownlint-cli2
        • mypy
        • nancy
        • nixpkgs-fmt
        • opa
        • OSV-Scanner
        • Oxipng
        • perlcritic
        • perltidy
        • php-cs-fixer
        • phpstan
        • pmd
        • pragma-once
        • pre-commit-hooks
        • Prettier
        • prisma
        • psscriptanalyzer
        • Pylint
        • pyright
        • regal
        • remark-lint
        • renovate
        • rome
        • rubocop
        • Ruff
        • rufo
        • rustfmt
        • scalafmt
        • semgrep
        • ShellCheck
        • shfmt
        • sort-package-json
        • sourcery
        • sql-formatter
        • SQLFluff
        • sqlfmt
        • squawk
        • standardrb
        • stringslint
        • stylelint
        • stylua
        • SVGO
        • swiftformat
        • swiftlint
        • taplo
        • Terraform
        • terragrunt
        • terrascan
        • TFLint
        • tfsec
        • tofu
        • Trivy
        • Trufflehog
        • txtpbfmt
        • vale
        • Yamllint
        • yapf
      • Run Linters
      • Manage Linters
      • Configure Linters
      • Ignoring Issues and Files
      • Custom Linters
      • Shared Configs
      • Upgrades
    • Debugging
    • Licensing
  • CLI & API References
    • CLI Reference
      • Install
      • Getting Started
        • Code Quality
        • Merge Queue
        • Flaky Tests
        • Tools
        • Actions
          • Git Hooks
        • Announce
      • Compatibility
      • Caching
      • Commands Reference
        • Code Quality
        • Actions
        • Merge
      • Configuration
        • Plugins
          • Share Config Between Codebases
          • Exporting Linter Configs
        • Runtimes
        • Tools
        • Lint
          • Definitions
          • Commands
          • Output
          • Output Parsing
          • Files and Caching
          • Dependencies
          • Auto-Enable
        • Actions
          • Notifications
          • Logging and Troubleshooting
        • Merge
        • Telemetry
        • Per User Overrides
    • API Reference
      • Flaky Tests
      • Merge Queue
      • Webhooks Reference
  • Pricing & Security
    • Security
  • Billing
  • Community & Support
  • Links
    • Open App
    • Slack Community
    • Changelog
    • Feature Requests
On this page
  • trunk init
  • trunk version
  • trunk upgrade
  • trunk login
  • trunk logout
  • trunk plugins add
  • trunk tools
  • trunk daemon status
  • trunk daemon start
  • trunk daemon shutdown
  • trunk daemon launch
  • trunk whoami
  • trunk deinit
  • trunk config share
  • trunk config hide
  • trunk config print
  • trunk cache clean
  • trunk cache prune
  • trunk install
Edit on GitHub
  1. CLI & API References
  2. CLI Reference

Commands Reference

trunk init

trunk init: Set up trunk in this repo.

Usage Example

trunk init

trunk version

trunk version: Output the version.

Usage Example

trunk version

trunk upgrade

trunk upgrade: Upgrade Trunk and its linters to the latest releases.

Usage example

trunk upgrade [options]

Options

  • -y, --yes-to-all: Answer yes to all upgrade prompts

  • -n, --no-to-all: Answer no to all upgrade prompts

  • --apply-to: Apply upgrades to a specified file

  • --filter: Filter the upgraded linters

  • --dry-run: Detect available upgrades, but do not apply changes

trunk login

trunk login: Login to trunk.io.

Usage Example

trunk login

trunk logout

trunk logout: Logout from trunk.io.

Usage Example

trunk logout

trunk plugins add

trunk plugins add: Add a plugin by URI.

Usage Example

trunk plugins [uri] [ref] [options]

trunk tools

trunk tools: Universal tool manager.

Usage Example

trunk tools [options]

trunk daemon status

Report the status of the daemon.

Usage Example

trunk daemon status

trunk daemon start

Start the trunk daemon in the background if it’s not already running.

Usage Example

trunk daemon start

trunk daemon shutdown

trunk daemon shutdown: Shutdown the trunk daemon if it is running.

Usage Example

trunk daemon shutdown

trunk daemon launch

trunk daemon launch: Start the trunk daemon in the foreground if it’s not already running.

Usage Example

trunk daemon launch

trunk whoami

trunk whoami: print who you're logged in as

Usage Example

trunk whoami

trunk deinit

trunk deinit: Deinitialize Trunk in your repo

Usage Example

trunk deinit [options]

Options

  • -y, --yes: Proceed unconditionally

  • -v, --verbose: Output details about what's happening under the hood

  • --color: Enable/disable color output

trunk config share

trunk config share: Remove Trunk config files from your local git ignores.

Usage Example

trunk config share 

trunk config hide

trunk config hide: Add Trunk config files to your local git ignores.

Usage Example

trunk config hide

trunk config print

trunk config print: Print the resolved trunk config.

Usage Example

trunk config print

trunk cache clean

trunk cache clean: Clean cached files used by Trunk.

Usage Example

trunk cache clean

trunk cache prune

trunk cache prune: Prune unused cached files.

Usage Example

trunk cache clean

trunk install

trunk install: Download & install enabled runtimes/linters.

Usage Example

trunk install [options]

Options

  • --version: The version

  • --monitor: Enable the trunk daemon to monitor file changes in your repo

  • --ci: Run in continuous integration mode

  • --no-progress: Don't show progress updates

  • --ci-progress: Rate limit progress updates to every 30s (implied by --ci)

  • --action_timeout: Timeout for downloads, lint runs, etc.

  • -v, --verbose: Output details about what's happening under the hood

  • --color: Enable/disable color output

Last updated 5 months ago