{"id":13395026,"url":"https://github.com/mattbrictson/airbrussh","last_synced_at":"2026-03-05T06:04:31.265Z","repository":{"id":27571913,"uuid":"31054319","full_name":"mattbrictson/airbrussh","owner":"mattbrictson","description":"Airbrussh pretties up your SSHKit and Capistrano output","archived":false,"fork":false,"pushed_at":"2025-02-09T01:56:19.000Z","size":3298,"stargazers_count":512,"open_issues_count":11,"forks_count":33,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-03T09:06:49.894Z","etag":null,"topics":["capistrano","sshkit"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattbrictson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-20T06:57:33.000Z","updated_at":"2025-02-24T09:48:36.000Z","dependencies_parsed_at":"2024-04-12T16:37:38.052Z","dependency_job_id":"b7e93066-d415-4180-b127-fd98d27a5474","html_url":"https://github.com/mattbrictson/airbrussh","commit_stats":{"total_commits":265,"total_committers":12,"mean_commits":"22.083333333333332","dds":"0.18867924528301883","last_synced_commit":"7fee10556c4448fce8e7fb30238aa1c1f02be77d"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbrictson%2Fairbrussh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbrictson%2Fairbrussh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbrictson%2Fairbrussh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattbrictson%2Fairbrussh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattbrictson","download_url":"https://codeload.github.com/mattbrictson/airbrussh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253187143,"owners_count":21868070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capistrano","sshkit"],"created_at":"2024-07-30T17:01:39.618Z","updated_at":"2026-03-05T06:04:31.256Z","avatar_url":"https://github.com/mattbrictson.png","language":"Ruby","funding_links":[],"categories":["Plugins","插件","Ruby","Deployment"],"sub_categories":["Omniauth"],"readme":"# Airbrussh\n\n[![Gem Version](https://badge.fury.io/rb/airbrussh.svg)](http://badge.fury.io/rb/airbrussh)\n[![Build Status](https://github.com/mattbrictson/airbrussh/actions/workflows/ci.yml/badge.svg)](https://github.com/mattbrictson/airbrussh/actions/workflows/ci.yml)\n[![Build status](https://ci.appveyor.com/api/projects/status/h052rlq54sne3md6/branch/main?svg=true)](https://ci.appveyor.com/project/mattbrictson/airbrussh/branch/main)\n[![Coverage Status](https://coveralls.io/repos/mattbrictson/airbrussh/badge.svg?branch=main)](https://coveralls.io/r/mattbrictson/airbrussh?branch=main)\n\n\nAirbrussh is a concise log formatter for Capistrano and SSHKit. It displays well-formatted, useful log output that is easy to read. Airbrussh also saves Capistrano's verbose output to a separate log file just in case you need additional details for troubleshooting.\n\n**As of April 2016, Airbrussh is bundled with Capistrano 3.5, and is Capistrano's default formatter! There is nothing additional to install or enable.** Continue reading to learn more about Airbrussh's features and configuration options.\n\nIf you aren't yet using Capistrano 3.5 (or wish to use Airbrussh with SSHKit directly), refer to the [advanced/legacy usage](#advancedlegacy-usage) section for installation instructions.\n\n![Sample output](https://raw.github.com/mattbrictson/airbrussh/HEAD/demo.gif)\n\nFor more details on how exactly Airbrussh affects Capistrano's output and the reasoning behind it, check out the blog post: [Introducing Airbrussh](https://mattbrictson.com/airbrussh).\n\n-----\n\n* [Usage](#usage)\n* [Configuration](#configuration)\n* [FAQ](#faq)\n* [Advanced/legacy usage](#advancedlegacy-usage)\n\n## Usage\n\nAirbrussh is enabled by default in Capistrano 3.5 and newer. To manually enable Airbrussh (for example, when upgrading an existing project), set the Capistrano format like this:\n\n```ruby\n# In deploy.rb\nset :format, :airbrussh\n```\n\n### What's displayed\n\nWhen you run a Capistrano command, Airbrussh provides the following information in its output:\n\n![Sample output](https://raw.github.com/mattbrictson/airbrussh/HEAD/formatting.png)\n\n* Name of Capistrano task being executed\n* When each task started (minutes:seconds elapsed since the deploy began)\n* The SSH command-line strings that are executed; for Capistrano tasks that involve running multiple commands, the numeric prefix indicates the command in the sequence, starting from `01`\n* Stdout and stderr output from each command\n* The duration of each command execution, per server\n\n### What's *not* displayed\n\nFor brevity, Airbrussh does not show *everything* that Capistrano is doing. For example, it will omit Capistrano's `test` commands, which can be noisy and confusing. Airbrussh also hides things like environment variables, as well as `cd` and `env` invocations. To see a full audit of Capistrano's execution, including *exactly* what commands were run on each server, look at `log/capistrano.log`.\n\n## Configuration\n\nYou can customize many aspects of Airbrussh's output. In Capistrano 3.5 and newer, this is done via the `:format_options` variable, like this:\n\n```ruby\n# Pass options to Airbrussh\nset :format_options, color: false, truncate: 80\n```\n\nHere are the options you can use, and their effects (note that the defaults may be different depending on where Airbrussh is used; these are the defaults used by Capistrano 3.5):\n\n|Option|Default|Usage|\n|---|---|---|\n|`banner`|`nil`|Provide a string (e.g. \"Capistrano started!\") that will be printed when Capistrano starts up.|\n|`color`|`:auto`|Use `true` or `false` to enable or disable ansi color. If set to `:auto`, Airbrussh automatically uses color based on whether the output is a TTY, or if the SSHKIT_COLOR environment variable is set.|\n|`command_output`|`true`|Set to `:stdout`, `:stderr`, or `true` to display the SSH output received via stdout, stderr, or both, respectively. Set to `false` to not show any SSH output, for a minimal look.|\n|`context`|`Airbrussh::Rake::Context`|Defines the execution context. Targeted towards uses of Airbrussh outside of Rake/Capistrano. Alternate implementations should provide the definition for `current_task_name`, `register_new_command`, and `position`.|\n|`log_file`|`log/capistrano.log`|Capistrano's verbose output is saved to this file to facilitate debugging. Set to `nil` to disable completely.|\n|`truncate`|`:auto`|Set to a number (e.g. 80) to truncate the width of the output to that many characters, or `false` to disable truncation. If `:auto`, output is automatically truncated to the width of the terminal window, if it can be determined.|\n|`task_prefix`|`nil`|A string to prefix to task output. Handy for output collapsing like [buildkite](https://buildkite.com/docs/builds/managing-log-output)'s `---` prefix|\n\n## FAQ\n\n**Airbrussh is not displaying the output of my commands! For example, I run `tail` in one of my capistrano tasks and airbrussh doesn't show anything. How do I fix this?**\n\nMake sure Airbrussh is configured to show SSH output.\n\n```ruby\nset :format_options, command_output: true\n```\n\n**I haven't upgraded to Capistrano 3.5 yet. Can I still use Airbrussh?**\n\nYes! Capistrano 3.4.x is also supported. Refer to the [advanced/legacy usage](#advancedlegacy-usage) section for installation instructions.\n\n**Does Airbrussh work with Capistrano 2?**\n\nNo, Capistrano 3 is required. We recommend Capistrano 3.4.0 or higher. Capistrano 3.5.0 and higher have Airbrussh enabled by default, with no installation needed.\n\n**Does Airbrussh work with JRuby?**\n\nJRuby is not officially supported or tested, but may work. You must disable automatic truncation to work around a known bug in the JRuby 9.0 standard library. See [#62](https://github.com/mattbrictson/airbrussh/issues/62) for more details.\n\n```ruby\nset :format_options, truncate: false\n```\n\n**I have a question that’s not answered here or elsewhere in the README.**\n\nPlease [open a GitHub issue](https://github.com/mattbrictson/airbrussh/issues/new) and we’ll be happy to help!\n\n## Advanced/legacy usage\n\nAlthough Airbrussh is built into Capistrano 3.5.0 and higher, it is also available as a plug-in for older versions. Airbrussh has been tested with MRI 1.9+, Capistrano 3.4.0+, and SSHKit 1.6.1+.\n\n### Capistrano 3.4.x\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"airbrussh\", require: false\n```\n\nAnd then execute:\n\n    $ bundle\n\nFinally, add this line to your application's Capfile:\n\n```ruby\nrequire \"airbrussh/capistrano\"\n```\n\n**Important:** explicitly setting Capistrano's `:format` option in your deploy.rb will override airbrussh. Remove this line if you have it:\n\n```ruby\n# Remove this\nset :format, :pretty\n```\n\nCapistrano 3.4.x doesn't have the `:format_options` configuration system, so you will need to configure Airbrussh using this technique:\n\n```ruby\nAirbrussh.configure do |config|\n  config.color = false\n  config.command_output = true\n  # etc.\nend\n```\n\nRefer to the [configuration](#configuration) section above for the list of supported options.\n\n### SSHKit\n\nIf you are using SSHKit directly (i.e. without Capistrano), you can use Airbrussh like this:\n\n```ruby\nrequire \"airbrussh\"\nSSHKit.config.output = Airbrussh::Formatter.new($stdout)\n\n# You can also pass configuration options like this\nSSHKit.config.output = Airbrussh::Formatter.new($stdout, color: false)\n```\n\n## History\n\nAirbrussh started life as custom logging code within the [capistrano-mb][] collection of opinionated Capistrano recipes. In February 2015, the logging code was refactored into a standalone gem with its own configuration and documentation, and renamed `airbrussh`. In February 2016, Airbrussh was added as the default formatter in Capistrano 3.5.0.\n\n## Roadmap\n\nAirbrussh now has a stable feature set, excellent test coverage, is being used for production deployments, and has reached 1.0.0! If you have ideas for improvements to Airbrussh, please open a [GitHub issue](https://github.com/mattbrictson/airbrussh/issues/new).\n\n## Contributing\n\nContributions are welcome! Read [CONTRIBUTING.md](CONTRIBUTING.md) to get started.\n\n[capistrano-mb]: https://github.com/mattbrictson/capistrano-mb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattbrictson%2Fairbrussh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattbrictson%2Fairbrussh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattbrictson%2Fairbrussh/lists"}