slumber

Releases

2.2.0 - 2024-10-22

v2.2.0 Oct 22 2024 at 00:52 UTC

Added

  • Add shell completions, accessed by enabling the COMPLETE environment variable
    • For example, adding COMPLETE=fish slumber | source to your fish.config will enable completions for fish
    • See docs for more info and a list of supported shells
  • Add slumber gen alias to --help documentation

Fixed

  • Fix error loading requests with empty header values from history #400
  • Fix input bindings involving shift and a character (e.g. shift g) #401

2.1.0 - 2024-09-27

v2.1.0 Sep 27 2024 at 19:41 UTC

Added

  • Use SLUMBER_CONFIG_PATH to customize configuration (not collection) file path #370
  • Add a dynamic variant to !select chain type, allowing your collection to present a list of values driven from the output of another chain. (thanks @anussel5559)
  • Cancel in-flight requests with the cancel action (bound to escape by default)
  • Add slumber new subcommand to generate new collection files #376
  • Add default field to profiles
    • When using the CLI, the --profile argument can be omitted to use the default profile
  • Reset edited recipe values to their default using z
  • Add selector_mode field to chains, to control how single vs multiple results from a JSONPath selector are handled
    • Previously, if a selector returned multiple results, an error was returned. Now, the result list will be rendered as a JSON array. To return to the previous behavior, set selector_mode: single in your chain.
    • See docs for more

Changed

  • Update file locations to adhere to XDG spec on Linux #371
    • Move config file to config dir, which remains the same on MacOS/Windows but changes on Linux. For backward compatibility, the previous path (data dir) will be checked and used if present
    • Move log files to state dir on Linux and cache dir on MacOS/Windows
    • Database file remains in data dir on all platforms
  • Create config file on startup if it doesn't exist
  • If config file fails to load during TUI startup, display an error and fall back to the default, rather than crashing
  • De-deprecate {{env.VARIABLE}} template sources
    • They'll remain as a simpler alternative to !env chains

Fixed

  • Updated the Configuration docs to remove the non-existent slumber show dir command (thanks @SVendittelli)
  • Retain all request history when collection file is reloaded
    • Previously, pending and failed requests were lost on reload within a single session. These will still be lost when a session is exited.
  • Fix serialization of query parameter lists
  • Don't update UI for useless events (e.g. cursor moves)

2.0.0 - 2024-09-06

v2.0.0 Sep 8 2024 at 02:21 UTC

2.0 is headlined by a highly requested feature: one-off edits to recipes! If you need to tweak a query parameter or edit a body, but don't want to modify your collection file, you can now highlight the value in question and hit e to modify it. The override will be retained until you modify the collection file or exit Slumber, at which point it will revert to its original value.

Aside from the major new feature, there is one breaking change to the escape syntax of templates. The old backslash-based syntax was fraught with edge cases and unpredictable behavior. This new syntax is simpler to use, simpler to implement, and much more bulletproof. This syntax was rare to use to begin with, so most people will be unimpacted by this change.

Here's the full list of changes:

Breaking

  • Replace backslash escape sequence with a simpler scheme based on _
    • For example, previously a key would be escaped as \{{. This introduced complexities around how to handle additional backslashes, and also required doubling up backslashes in YAML
    • The new equivalent would be {_{, which parses as {{
    • The goal of this change is to make escaping behavior simpler and more consistent
    • For more info on the new behavior, see the docs
  • Remove --log CLI argument
    • See note on log files in Changed section for why this is no longer necessary

Added

  • Edit recipe values (query params, headers, etc.) in the TUI to provide one-off values
  • Add editor field to the config, allowing you to customize what editor Slumber opens for in-app editing
  • Add !select chain type, allowing your collection to prompt the user to select a value from a static list (thanks @anussel5559)

Changed

  • !json bodies are now prettified when sent to the server
  • Use vim as default editor if none is configured
  • Move logs back to a shared file
    • They had been split into one file per session, which made them hard to find
    • The file is now eventually deleted once it exceeds a certain size

Fixed

  • Fix basic auth being label as bearer auth in Recipe Authentication pane
  • Use correct binding for search action in the placeholder of the response filter textbox
    • Previously it was hardcoded to display the default of /
  • Fix response body filter not applying on new responses
  • Support quoted arguments in editor commands
  • Fix certain UI values not persisting correctly
  • Propagate unconsumed key events from text boxes
    • E.g. F5 will now refresh the collection while a text box is in focus
  • Redraw TUI when terminal is resized
  • Clamp text window scroll state when window is resized or text changes
  • Fix extraneous input events when exiting Vim #351
  • Improve performance and fix crashes when handling large request/response bodies #356
    • Further improvements for large bodies will be coming in the future

1.8.0 - 2024-08-09

v1.8.0 Aug 9 2024 at 13:25 UTC

The highlight (no pun intended) of this release is syntax highlighting. Beyond that, the release contains a variety of small fixes and improvements.

Added

  • Add syntax highlighting to recipe, request, and response display #264

Changed

  • Change layout of internal database for request and UI state storage
    • This shouldn't have any user impact, it's just a technical improvement. If you notice any issues such as missing or incorrect request history, please let me know
  • Upgrade to Rust 1.80
  • Disable unavailable menu actions #222
  • Support template for header names in the section field of !request chains
  • Expand ~ to the home directory in !file chain sources and when saving response body as a file
  • Ignore key events with additional key modifiers
    • For example, an action bound to w will no longer match ctrl w
  • Actions can now be unbound by specifying an empty binding
    • For example, binding submit: [] will make the submit action inaccessible

Fixed

  • Fix cargo install slumber when not using --locked
  • Don't type in text boxes when modifiers keys (other than shift) are enabled
    • Should mitigate some potential confusing behavior when using terminal key sequences
  • Query parameter and header toggle rows no longer lose their state when switching profiles

1.7.0 - 2024-07-22

v1.7.0 Jul 22 2024 at 21:22 UTC

This release focuses on minor fixes and improvements. There are no new major features or added functionality.

Added

  • Add global --log argument to CLI, to print the log file being used for that invocation

Changes

  • Checkbox row state and folder expand/collapse state are now toggled via the spacebar instead of enter
    • Enter now sends a request from anywhere. While this change may be annoying, it will hopefully be more intuitive in the long run.
    • This can be rebound (see docs)
  • Show folder tree in recipe pane when a folder is selected
  • Don't exit body filter text box on Enter #270
  • Show elapsed time for failed requests (e.g. in case of network error)

Fixes

  • Fix latest request not being pre-selected correctly if it's not a successful response
  • Detect infinite loops in chain configuration templates
  • Duplicated chains in a recipe will only be rendered once #118
  • Never trigger chained requests when rendering template previews in the TUI
  • Use a different log file for each session #61

1.6.0 - 2024-07-07

v1.6.0 Jul 7 2024 at 14:39 UTC

Added

  • Initial support for importing collections from an OpenAPIv3 specification #106
    • Currently only OpenAPI 3.0 (not 3.1) is supported. Please try this out and give feedback if anything doesn't work.

Changed

  • Allow escaping keys in templates #149
    • While this is technically a breaking change, this is not a major version bump because it's extremely unlikely that this will break anything in practice for a user
    • See docs

Fixed

  • Support TLS certificates in native certificate store #275

1.5.0 - 2024-06-17

v1.5.0 Jun 17 2024 at 22:20 UTC

Added

  • Add !env chain source, for loading environment variables
    • This is intended to replace the existing {{env.VARIABLE}} syntax, which is now deprecated and will be removed in the future

Changed

  • "Edit Collection" action now uses the editor set in $VISUAL/$EDITOR instead of whatever editor you have set as default for .yaml/.yml files #262
    • In most cases this means you'll now get vim instead of VSCode or another GUI editor
    • Closing the editor will return you to Slumber, meaning you can stay in the terminal the entire time

Fixed

  • Environment variables in {{env.VARIABLE}} templates are now loaded as strings according to the OS encoding, as opposed to always being decoded as UTF-8

1.4.0 - 2024-06-11

v1.4.0 Jun 11 2024 at 22:14 UTC

Added

  • Structured bodies can now be defined with tags on the body field of a recipe, making it more convenient to construct bodies of common types. Supported types are:
  • Support multiple instances of the same query param #245 (@maksimowiczm)
    • Query params can now be defined as a list of <param>=<value> entries
    • See docs
  • Templates can now render binary values in certain contexts

Changed

  • When a modal/dialog is open q now exits the dialog instead of the entire app
  • Upgrade to Rust 1.76

Fixed

  • Fix "Unknown request ID" error showing on startup #238

1.3.2 - 2024-05-27

v1.3.2 May 27 2024 at 12:18 UTC

Changed

  • Show "Copy URL", "Copy Body" and "Copy as cURL" actions from the Recipe list #224
    • Previously this was only available in the Recipe detail pane
  • Fix Edit Collection action in menu
  • Persist response body query text box contents
    • Previously it would reset whenever you made a new request or changed recipes

1.3.1 - 2024-05-21

v1.3.1 May 21 2024 at 01:51 UTC

Fixed

  • Fix double key events on Windows #226

1.3.0 - 2024-05-17

v1.3.0 May 17 2024 at 22:10 UTC

The biggest feature in this release is the ability to browse request history. Slumber has already had the ability to track history, meaning all your history since you started using it will already be there! In addition, this release contains some UI improvements, as well as some pretty major internal refactors to enable these UI changes. These will also make future UI improvements easier and faster to implement.

Added

  • Request history is now browsable! #55
  • Add scrollbars to lists and text windows #220

Changed

  • Merge request & response panes
    • The request pane often isn't needed, so it doesn't deserve top-level space
  • Mouse events (e.g. scrolling) are now sent to unfocused elements

1.2.1 - 2024-05-11

v1.2.1 May 11 2024 at 11:37 UTC

Fixed

  • Fix profile not being selected on initial startup

1.2.0 - 2024-05-10

v1.2.0 May 10 2024 at 15:35 UTC

Added

  • Add trim option to chains, to trim leading/trailing whitespace #153

Changed

  • Use colored background for status codes
    • This includes a new theme field, success_color
  • Improve hierarchy presentation of errors
  • Convert profile list into a popup modal

Fixed

  • Exit fullscreen mode when changing panes
  • Support scrolling on more lists/tables

1.1.0 - 2024-05-05

v1.1.0 May 5 2024 at 14:23 UTC

Added

  • Add section field to !request chain values, to allow chaining response headers rather than body (#184)
  • Add action to save response body to file (#183)
  • Add theme field to the config, to configure colors (#193)
  • Add stdin option to command chains (#190)

Changed

  • Reduce UI latency under certain scenarios
    • Previously some actions would feel laggy because of an inherent 250ms delay in processing some events
  • Search parent directories for collection file (#194)
  • Use thicker borders for selected pane and modals
  • Change default TUI colors to blue and yellow

Fixed

  • Fix Slumber going into zombie mode and CPU spiking to 100% under certain closure scenarios (#136)
  • Fix historical request/response no loading on first render (#199)

1.0.1 - 2024-04-27

v1.0.1 Apr 27 2024 at 23:52 UTC

Added

  • Add two new build targets to releases: x86_64-pc-windows-msvc and x86_64-unknown-linux-musl

Fixed

  • Fix build on Windows (#180)
    • I can't guarantee it works on Windows since I don't have a machine to test on, but it at least compiles now

1.0.0 - 2024-04-25

v1.0.0 Apr 25 2024 at 01:35 UTC

Breaking

  • Rename collection file parameter on all CLI commands from --collection/-c to --file/-f
    • The goal here is to be more intuitive/predictable, since -f is much more common in similar programs (e.g. docker-compose)

Added

  • Support booleans and numbers for query values (#141)
  • Add default field to !prompt chains, which allows setting a pre-populated value for the prompt textbox

Changed

  • Folders can now be collapsed in the recipe list (#155)
  • Improvements to Insomnia import (#12)
  • Rename import-experimental command to import
    • It's official now! It's still going to get continued improvement though
  • Show WARN/ERROR log output for CLI commands
  • Validate recipe method field during deserialization instead of on request init
    • This means you'll get an error on startup if your method is invalid, instead of when you go to run the request
    • This is not a breaking change because if you had an incorrect HTTP method, the request still didn't work before, it just broke later
  • Arguments to chains are now treated as templates (#151)
    • Support fields are path for !file chains, command for !command chains, and message for !prompt chains
    • This means you can now really chain chains together!

0.18.0 - 2024-04-18

v0.18.0 Apr 18 2024 at 21:27 UTC

Breaking

  • All existing recipes must be tagged with !request in the collection file
    • This is necessary to differentiate from the new !folder type
  • Profile values are always treated as templates now
    • Any profile values that were previously the "raw" variant (the default) that contain template syntax (e.g. {{user_id}}) will now be rendered as templates. In reality this is very unlikely, so this probably isn't going to break your setup
    • If you have an existing profile value tagged with !template it won't break, but it will no longer do anything
  • Unknown fields in config/collection files will now be rejected (#154)
    • In most cases this field is a mistake, so this is meant to make debugging easier
    • If you have an intentional unknown field, you can now nest it under .ignore to ignore it
  • Replace slumber show dir with slumber show paths

Added

  • Request recipes can now be organized into folders (#60)
  • Add slumber show config and slumber show collection subcommands

Changed

  • Prevent infinite recursion in templates
    • It now triggers a helpful error instead of a panic
  • Support additional key codes for input mapping, including media keys

Fixed

  • Multiple spaces between modifiers/key codes in a key combination are now ignored

0.17.0 - 2024-04-08

v0.17.0 Apr 8 2024 at 18:38 UTC

Breaking

  • All variants of the Chain.source field are now maps
    • This is to support the next request auto-execution feature, as well as future proofing for additional chain configuration
  • Remove send_request keybinding
    • The submit keybinding is now used to send requests from all panes (except the profile pane)
    • This is only a breaking change if you have send_request remapped in your config file

Follow this mapping to update:

# Before
chains:
  auth_token:
    source: !request login
  username:
    source: !command ["echo", "-n", "hello"]
  username:
    source: !file ./username.txt
  password:
    source: !prompt Enter Password
---
# After
chains:
  auth_token:
    source: !request
      recipe: login
  username:
    source: !command
      command: ["echo", "-n", "hello"]
  username:
    source: !file
      path: ./username.txt
  password:
    source: !prompt
      message: Enter Password

Added

  • Chained requests can now be auto-executed according to various criteria (#140)
  • Add Authentication tab to recipe pane (#144)

Changed

  • Don't print full stack trace for failed CLI commands
  • Disable formatting and highlighting for response bodies over 1MB (size threshold customizable in the config)

Fixes

  • Improve performance of handling large response bodies

0.16.0 - 2024-04-01

v0.16.0 Apr 1 2024 at 12:55 UTC

Added

  • Add support for custom keybindings (#137)

Fixed

  • Fix request body not updating in UI when changing recipe

0.15.0 - 2024-03-24

v0.15.0 Mar 24 2024 at 22:08 UTC

Added

  • Add horizontal scrolling to response body (#111)
    • Use shift+left and shift+right
  • Add app version to help modal
  • Add "Copy as cURL" action to recipe menu (#123)
  • Add hotkeys to select different panes
  • Add pane for rendered request
  • Show response size in Response pane (#129)

Changed

  • Run prompts while rendering request URL/body to be copied
  • Improve UI design of profile pane
  • Show raw bytes for binary responses

Fixed

  • Reset response body query when changing recipes (#133)

0.14.0 - 2024-03-18

v0.14.0 Mar 18 2024 at 20:43 UTC

Added

  • Add config option ignore_certificate_hosts (#109)
  • Add menu action to open collection file in editor (#105)
  • Add authentication field to request recipe (#110)

Fixed

  • Fix prompt in TUI always rendering as sensitive (#108)
  • Fix content type identification for extended JSON MIME types (#103)
  • Use named records in binary blobs in the local DB
    • This required wiping out existing binary blobs, meaning all request history and UI state will be lost on upgrade
  • Fix basic auth in Insomnia import

0.13.1 - 2024-03-07

v0.13.1 Mar 7 2024 at 22:10 UTC

Changed

  • Move checkbox to left side of toggle tables

Fixed

  • Fix scrolling on response body pane

0.13.0 - 2024-02-21

v0.13.0 Feb 21 2024 at 22:16 UTC

Added

  • New informational flags to slumber request
    • --exit-status to set exit code based on response status (#97)
    • --status, --headers, and --no-body to control printed output
  • Filter response via JSONPath (#78)

0.12.1 - 2024-01-22

v0.12.1 Jan 22 2024 at 13:07 UTC

Changed

  • Improved styling of toggled table rows

0.12.0 - 2024-01-07

v0.12.0 Jan 7 2024 at 21:43 UTC

Added

  • Move app-level configuration into a file (#89)
    • Right now the only supported field is preview_templates
  • Toggle query parameters and headers in recipe pane (#30)
    • You can easily enable/disable parameters and headers without having to modify the collection file now
  • Add Copy URL action, to get the full URL that a request will generate (#93)

Changed

  • Show profile contents while in the profile list (#26)
  • Remove settings modal in favor of the settings file
    • Supporting changing configuration values during a session adds a lot of complexity

0.11.0 - 2023-12-20

v0.11.0 Dec 20 2023 at 22:28 UTC

Added

  • Add action to copy entire request/response body (#74)
  • Persist UI state between sessions (#39)
  • Text window can be controlled with PgUp/PgDown/Home/End (#77)
  • Add back manual reload keybinding (R)
    • Mostly for development purposes
  • Add collection ID/path to help modal (#59)
    • Also add collection ID to terminal title
  • Add new docs for templates and collection reuse (#67)

Changed

  • [BREAKING] Key profiles/chains/requests by ID in collection file
  • [BREAKING] Merge request history into a single DB file
    • Request history (and UI state) will be lost
  • [BREAKING] show subcommand now takes a target argument
    • Right now the only option is slumber show dir, which has the same behavior as the old slumber show (except now it prints the bare directory)
  • [BREAKING] Remove option to toggle cursor capture
    • Turns out it's not that useful, since most terminals provide override behavior
  • Filter request history by profile (#74)
  • Hide sensitive chain values in preview
  • Change fullscreen keybinding from F11 to F
    • F11 in some cases is eaten by the IDE or OS, which is annoying

Fixed

  • Don't require collection file to be present for show subcommand (#62)
  • Fix state file being created in root Slumber directory if collection file is invalid (#71)
  • Fix pane cycling while in fullscreen (#76)