Skip to content

Commands

Tarsail commands use this shape:

Terminal window
tarsail [global options] <command> [command options]
OptionValueDescription
--configpathPath to the Tarsail config file. Default: tarsail.yml.
--identity-filepathSSH private key file used for remote access.
--ssh-keypathAlias for --identity-file.
--ask-passwordbooleanPrompt once for the remote user’s SSH password.
--verbosebooleanShow verbose command output where available.
--yesbooleanAnswer yes to confirmation prompts that support it.
-v, --versionbooleanShow Tarsail version and exit.

--identity-file and --ask-password cannot be used together.

--identity-file supports ~/ expansion and is resolved to an absolute path before use.

Create a minimal config file.

Terminal window
tarsail init

With a custom path:

Terminal window
tarsail --config tarsail.production.yml init

init refuses to overwrite an existing config file.

It detects a Compose file in this order:

  1. compose.yaml
  2. compose.yml
  3. docker-compose.yaml
  4. docker-compose.yml

If none is found, it writes compose.yaml.

Generated config:

project: my-app
target:
name: prod
host: example.com
user: deploy
port: 22
path: /opt/my-app
compose:
file: compose.yaml
deploy:
keep_releases: 3

Check local and remote deployment readiness.

Terminal window
tarsail doctor

Common forms:

Terminal window
tarsail --config tarsail.production.yml doctor
tarsail --identity-file ~/.ssh/my-app-deploy-key doctor
tarsail --ask-password doctor

Local checks:

  • config loads;
  • Compose file exists;
  • Docker command is available;
  • Docker Compose is available;
  • Docker daemon is reachable;
  • Compose images are discoverable.

Remote checks:

  • SSH connects;
  • target path is writable;
  • required shared files exist;
  • Docker is available;
  • Docker Compose is available.

doctor may create the basic remote target layout when checking path writability:

releases/
incoming/
shared/

Build, bundle, upload, load, activate, and start the app.

Terminal window
tarsail deploy

Common forms:

Terminal window
tarsail --identity-file ~/.ssh/my-app-deploy-key deploy
tarsail --ask-password deploy
tarsail --config tarsail.production.yml --ask-password deploy

Steps:

  1. check local environment;
  2. check remote server;
  3. upload configured env and secret files;
  4. build images;
  5. create bundle;
  6. upload bundle;
  7. load images;
  8. start Compose app;
  9. read status.

The generated release ID is available to local and remote Compose as TARSAIL_RELEASE_ID.

Show remote Docker Compose status for the active release.

Terminal window
tarsail status

Equivalent remote operation:

Terminal window
cd <target.path>
docker compose -p <project> --env-file current/.tarsail.env --env-file shared/.env -f current/compose.yaml ps

The shared env file is included only when compose.env_file is configured.

Show remote Compose logs.

Terminal window
tarsail logs

Service-specific logs:

Terminal window
tarsail logs web

Options:

OptionValueDescription
--tailnumberNumber of log lines to show. Default: 200. Allowed range: 1 to 10000.
-fbooleanFollow logs.

Examples:

Terminal window
tarsail logs --tail 100
tarsail logs --tail 500 web
tarsail logs -f web

Service name validation allows letters, numbers, dot, underscore, and hyphen.

Reactivate the previous release.

Terminal window
tarsail rollback

Rollback:

  • reads the current release from the current symlink;
  • chooses the previous valid release by release metadata;
  • loads images from that release;
  • updates current;
  • runs Compose;
  • prints status.

Rollback does not restore data stores, Docker volumes, shared/ files, or external services.

Delete old non-current release directories.

Terminal window
tarsail prune

Skip confirmation:

Terminal window
tarsail prune --yes

or:

Terminal window
tarsail --yes prune

The number of kept releases comes from:

deploy:
keep_releases: 3

Allowed range for keep_releases is 1 to 20.

Show the installed Tarsail version.

Terminal window
tarsail version

Release binaries use a date-plus-hash version string such as 20260622-194500-a1b2c3d4e5f6.

Equivalent:

Terminal window
tarsail -v
tarsail --version

Verbose version output includes commit and build time when the binary was built by the GitHub Release workflow:

Terminal window
tarsail --verbose version

Show command usage:

Terminal window
tarsail help
tarsail --help
tarsail -h