PackageTrack
Sign in Get early access

crossterm

A crossplatform terminal library for manipulating terminals.

0.29.0 177M downloads/mo #550 most downloaded on crates.io crossterm-rs/crossterm

What this package is like to depend on

Last release 1 years ago

05 Apr 2025

Release timing varies

gaps range from 3 weeks to 12 months

Most releases are documented

notes for 48 of 64 stable releases

6 versions withdrawn

withdrawn after publishing

9 years old

70 releases · first in 2018

0 releases in the last 12 months

see the full history below

Release timeline

70 releases · Jan 2018 to Apr 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 70
  1. 0.29.0 05 Apr 2025

    Nothing published for this version

  2. 0.28.1 01 Aug 2024
    Release notes

    Fixed 🐛

    • Fix broken build on linux when using use-dev-tty with (#906)

    Breaking ⚠️

    • Fix desync with mio and signalhook between repo and published crate. (upgrade to mio 1.0)
    Open source →
  3. 0.28.0 31 Jul 2024 withdrawn

    Nothing published for this version

  4. 0.27.0 06 Aug 2023
    Release notes

    Version 0.27

    Added ⭐

    • Add NO_COLOR support (https://no-color.org/)
    • Add option to force overwrite NO_COLOR (#802)
    • Add support for scroll left/right events on windows and unix systems (#788).
    • Add window_size function to fetch pixel width/height of screen for more sophisticated rendering in terminals.
    • Add support for deserializing hex color strings to `Color`` e.g #fffff.

    Changes

    • Make the events module an optional feature events (to make crossterm more lightweight) (#776)

    Breaking ⚠️

    • Set minimum rustc version to 1.58 (#798)
    • Change all error types to std::io::Result (#765)

    @Gronis, @kevin-vigor, @Wilfred, @benjajaja, @blt-r, @Piturnah, @kdheepak, @DeathVenom54, @senekor, @joseluis, @gibbz00, @lesleyrs, @jhartzell42

    Open source →
  5. 0.26.1 26 Feb 2023
    Release notes

    Version 0.26.1

    Added ⭐

    • Add synchronized output/update control (#756)
    • Add kitty report alternate keys functionality (#754)
    • Updated dev dependencies.

    Fixed 🐛

    • Fix incorrect return in kitty keyboard enhancement check (#751)
    • Fix panic when using use-dev-tty feature flag (#762)

    Contributors

    @yyogo @jcdickinson @the-mikedavis

    Open source →
    Release notes

    Added ⭐

    • Add synchronized output/update control (#756)
    • Add kitty report alternate keys functionality (#754)
    • Updates dev dependencies.

    Fixed 🐛

    • Fix icorrect return in kitty keyboard enhancement check (#751)
    • Fix panic when using use-dev-tty feature flag (#762)
    Open source →
  6. 0.26.0 28 Jan 2023
    Release notes

    Added ⭐

    • Add SetCursorStyle to set the cursor appearance and visibility. (#742)
    • Add key release event for windows. (#745)
    • Add a function to check if the kitty keyboard enhancement protocol is available. (#732)
    • Add filedescriptors poll in order to move away from mio in the future (can be used via use-dev-tty). (#735)

    Fixed 🐛

    • Improved F1-F4 handling for kitty keyboard protocol. (#736)
    • Improved parsing of event types/modifiers with certain keys for kitty protocol. (#716)

    Breaking ⚠️

    • Remove SetCursorShape in vavour of SetCursorStyle. (#742)
    • Make Windows resize event match terminal::size (#714)

    Contributors

    @pianohacker , @AhoyISki , @Cl00e9ment , @yyogo , @the-mikedavis , @djarb , @Piturnah , @MitMaro , @Yusuto , @generic-user1 , @baldoalessandro , @CenTdemeern1 , @Blatko1 , @aaarkid @basilkohler , @TimonPost

    Open source →
    Release notes

    Added ⭐

    • Add SetCursorStyle to set the cursor apearance and visibility. (#742)
    • Add a function to check if kitty keyboard enhancement protocol is available. (#732)
    • Add filedescriptors poll in order to move away from mio in the future (can be used via use-dev-tty). (#735)

    Fixed 🐛

    • Improved F1-F4 handling for kitty keyboard protocol. (#736)
    • Improved parsing of event types/modifiers with certain keys for kitty protocol. (#716)

    Breaking ⚠️

    • Remove SetCursorShape in favour of SetCursorStyle. (#742)
    • Make Windows resize event match terminal::size (#714)
    • Rust 1.58 or later is now required.
    • Add key release event for windows. (#745)
    Open source →
  7. 0.25.0 10 Aug 2022
    Release notes

    BREAKING: Copy trait is removed from Event, you can keep it by removing the "bracked-paste" feature flag. However this flag might be standardized in the future. We removed the Copy from Event because the new Paste event, which contains a pasted string into the terminal, which is a non-copy string.

    • Add ability to paste a string in into the terminal and fetch the pasted string via events (see Event::Paste and EnableBracketedPaste ).
    • Add support for functional key codes from kitty keyboard protocol. Try out by PushKeyboardEnhancementFlags. This protocol allows for:
      • See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#modifiers
      • Press, Repeat, Release event kinds.
      • SUPER, HYPER, META modifiers.
      • Media keycodes
      • Right/left SHIFT, Control, Alt, Super, Hyper, Meta
      • IsoLevel3Shift, IsoLevel5Shift
      • Capslock, scroll lock, numlock
      • Printscreen, pauze, menue, keyboard begin.
    • Create SetStyle command to allow setting various styling in one command.
    • Terminal Focus events (see Event::FocusGained and Event::FocusLost)
    Open source →
  8. 0.24.0 02 Jul 2022
    Release notes
    • Add DoubleUnderlined, Undercurled, Underdots the text, Underdotted, Underdashes, Underdashed attributes and allow coloring their foreground / background color.
    • Fix windows unicode character parsing, this fixed various key combinations and support typing unicode characters.
    • Consistency and better documentation on mouse cursor operations (BREAKING CHANGE).
      • MoveTo, MoveToColumn, MoveToRow are 0-based. (left top most cell is 0,0). Moving like this is absolute
      • MoveToNextLine, MoveToPreviousLine, MoveUp, MoveDown, MoveRight, MoveLeft are 1-based,. Moving like this is relative. Moving 1 left means moving 1 left. Moving 0 to the left is not possible, wikipedia states that most terminals will just default to 1.
    • terminal::size returns error when previously it returned (0,0).
    • Remove println from serialisation code.
    • Fix mouse up for middle and right buttons.
    • Fix escape codes on Git-Bash + Windows Terminal / Alacritty / WezTerm.
    • Add support for cursor keys in application mode.
    Open source →
  9. 0.23.2 04 Apr 2022
    Release notes
    • Update signal-hook and mio to version 0.8.
    Open source →
  10. 0.23.1 15 Mar 2022
    Release notes
    • Fix control key parsing problem.
    Open source →
  11. 0.23.0 06 Feb 2022

    Nothing published for this version

  12. 0.22.1 19 Oct 2021
    Release notes
    • Update yanked version crossterm-winapi and move to crossterm-winapi 0.9.0.
    • Changed panic to error when calling disable-mouse capture without setting it first.
    • Update bitflags dependency.
    Open source →
    Release notes
    • Update yanked version crossterm-winapi and move to crossterm-winapi 0.9.0.
    • Changed panic to error when calling disable-mouse capture without setting it first.
    • Update bitflags dependency.
    Open source →
  13. 0.21.0 23 Aug 2021

    Nothing published for this version

  14. 0.20.0 10 Jun 2021

    Nothing published for this version

  15. 0.19.0 28 Dec 2020

    Nothing published for this version

  16. 0.18.2 29 Oct 2020
    Release notes
    • Fix panic when only setting bold and redirecting stdout.
    • Use tty_fd for set/get terminal attributes
    Open source →
  17. 0.18.1 24 Oct 2020
    Release notes
    • Fix enabling ANSI support when stdout is redirected
    • Update crossterm-winapi to 0.6.2
    Open source →
  18. 0.18.0 29 Sep 2020
    Release notes
    • Fix get position bug
    • Fix windows 8 or lower write to user-given stdout instead of stdout.
    • Make MoveCursor(Left/Right/Up/Dow) command with input 0 not move.
    • Switch to futures-core to reduce dependencies.
    • Command API restricts to only accept std::io::Write
    • Make supports_ansi public
    • Implement ALT + numbers windows systems.
    Open source →
  19. 0.17.8 08 Sep 2020 withdrawn

    Nothing published for this version

  20. 0.17.7 13 Jul 2020
    Release notes
    • Fix cursor position retrieval bug linux.
    Open source →
  21. 0.17.6 06 Jul 2020 withdrawn
    Release notes
    • Add functionality to retrieve color based on passed ansi code.
    • Switch from 'futures' to 'futures-util' crate to reduce dependency count
    • Mio 0.7 update
    • signal-hook update
    • Make windows raw_mode act on CONIN$
    • Added From<(u8, u8, u8)> Trait to Color::Rgb Enum
    • Implement Color::try_from()
    • Implement styler traits for &'a str
    Open source →
  22. 0.17.5 23 May 2020
    Release notes
    • Improved support of keymodifier for linux, arrow keys, function keys, home keys etc.
    • Add SetTitle command to change the terminal title.
    • Mio 0.7 update
    Open source →
  23. 0.17.4 02 May 2020
    Release notes
    • Add macros for Colorize and Styler impls, add an impl for String
    • Add shift modifier to uppercase char events on unix
    Open source →
  24. 0.17.3 09 Apr 2020
    Release notes
    • Fix get terminal size mac os, this did not report the correct size.
    Open source →
  25. 0.17.2 08 Apr 2020
    Release notes
    • Windows unicode support
    Open source →
  26. 0.17.1 28 Mar 2020
    Release notes
    • Reverted bug in 0.17.0: "Make terminal size function fallback to STDOUT_FILENO if /dev/tty is missing.".
    • Support for querying whether the current instance is a TTY.
    Open source →
  27. 0.17.0 24 Mar 2020

    Nothing published for this version

  28. 0.16.0 08 Feb 2020
    Release notes
    • Change attribute vector in ContentStyle to bitmask.
    • Add SetAttributes command.
    • Add Attributes type, which is a bitfield of enabled attributes.
    • Remove exit(), was useless.
    Open source →
  29. 0.15.0 29 Jan 2020
    Release notes
    • Fix CTRL + J key combination. This used to return an ENTER event.
    • Add a generic implementation Command for &T: Command. This allows commands to be queued by reference, as well as by value.
    • Remove unnecessary Clone trait bounds from StyledContent.
    • Add StyledContent::style_mut.
    • Handle error correctly for execute! and queue!.
    • Fix minor syntax bug in execute! and queue!.
    • Change ContentStyle::apply to take self by value instead of reference, to prevent an unnecessary extra clone.
    • Added basic trait implementations (Debug, Clone, Copy, etc) to all of the command structs
    • ResetColor uses &'static str instead of String
    Open source →
  30. 0.14.2 11 Jan 2020
    Release notes
    • Fix TIOCGWINSZ for FreeBSD
    Open source →
  31. 0.14.1 17 Dec 2019
    Release notes
    • Made windows cursor position relative to the window instead absolute to the screen buffer windows.
    • Fix windows bug with queue macro were it consumed a type and required an type to be Copy.
    Open source →
  32. 0.14.0 13 Dec 2019

    Nothing published for this version

  33. 0.13.3 08 Nov 2019
    Release notes
    • Remove thread from AsyncReader on Windows.
    • Improve HANDLE management windows.
    Open source →
  34. 0.13.2 04 Nov 2019
    Release notes
    • New input::stop_reading_thread() function
      • Temporary workaround for the UNIX platform to stop the background reading thread and close the file descriptor
      • This function will be removed in the next version
    Open source →
  35. 0.13.1 04 Nov 2019
    Release notes
    • Async Reader fix, join background thread and avoid looping forever on windows.
    Open source →
  36. 0.13.0 02 Nov 2019
    Release notes

    Major API-change, removed old-api

    • Remove Crossterm type
    • Remove TerminalCursor, TerminalColor, Terminal
    • Remove cursor(), color() , terminal()
    • Remove re-exports at root, accessible via module::types (cursor::MoveTo)
    • input module
      • Derive 'Copy' for 'KeyEvent'
      • Add the EnableMouseCapture and EnableMouseCapture commands
    • cursor module
      • Introduce static function crossterm::cursor::position in place of TerminalCursor::pos
      • Rename Goto to MoveTo
      • Rename Up to MoveLeft
      • Rename Right to MoveRight
      • Rename Down to MoveDown
      • Rename BlinkOn to EnableBlinking
      • Rename BlinkOff to DisableBlinking
      • Rename ResetPos to ResetPosition
      • Rename SavePos to SavePosition
    • terminal
      • Introduce static function crossterm::terminal::size in place of Terminal::size
      • Introduce static function crossterm::terminal::exit in place of Terminal::exit
    • style module
      • Rename ObjectStyle to ContentStyle. Now full names are used for methods
      • Rename StyledObject to StyledContent and made members private
      • Rename PrintStyledFont to PrintStyledContent
      • Rename attr method to attribute.
      • Rename Attribute::NoInverse to NoReverse
      • Update documentation
      • Made Colored private, user should use commands instead
      • Rename SetFg -> SetForegroundColor
      • Rename SetBg -> SetBackgroundColor
      • Rename SetAttr -> SetAttribute
      • Rename ContentStyle::fg_color -> ContentStyle::foreground_color
      • Rename ContentStyle::bg_color -> ContentStyle::background_color
      • Rename ContentStyle::attrs -> ContentStyle::attributes
    • Improve documentation
    • Unix terminal size calculation with TPUT
    Open source →
  37. 0.12.1 22 Oct 2019
    Release notes
    • Move all the crossterm_ crates code was moved to the crossterm crate
      • crossterm_cursor is in the cursor module, etc.
      • All these modules are public
    • No public API breaking changes
    Open source →
  38. 0.12.0 21 Oct 2019
    Release notes
    • Following crates are deprecated and no longer maintained
      • crossterm_cursor
      • crossterm_input
      • crossterm_screen
      • crossterm_style
      • crossterm_terminal
      • crossterm_utils

    crossterm_cursor 0.4.0

    • Fix examples link (PR #6)
    • Sync documentation style (PR #7)
    • Remove all references to the crossterm book (PR #8)
    • Replace RAW_MODE_ENABLED with is_raw_mode_enabled (PR #9)
    • Use SyncReader & InputEvent::CursorPosition for pos_raw() (PR #10)

    crossterm_input 0.5.0

    • Sync documentation style (PR #4)
    • Sync SyncReader::next() Windows and UNIX behavior (PR #5)
    • Remove all references to the crossterm book (PR #6)
    • Mouse coordinates synchronized with the cursor (PR #7)
      • Upper/left reported as (0, 0)
    • Fix bug that read sync didn't block (Windows) (PR #8)
    • Refactor UNIX readers (PR #9)
      • AsyncReader produces mouse events
      • One reading thread per application, not per AsyncReader
      • Cursor position no longer consumed by another AsyncReader
      • Implement sync reader for read_char (requires raw mode)
      • Fix SIGTTIN when executed under the LLDB
      • Add mio for reading from FD and more efficient polling (UNIX only)
    • Sync UNIX and Windows vertical mouse position (PR #11)
      • Top is always reported as 0

    crossterm_screen 0.3.2

    • to_alternate switch back to main screen if it fails to switch into raw mode (PR #4)
    • Improve the documentation (PR #5)
      • Public API
      • Include the book content in the documentation
    • Remove all references to the crossterm book (PR #6)
    • New commands introduced (PR #7)
      • EnterAlternateScreen
      • LeaveAlternateScreen
    • Sync Windows and UNIX raw mode behavior (PR #8)

    crossterm_style 0.5.2

    • Refactor (PR #2)
      • Added unit tests
      • Improved documentation and added book page to lib.rs
      • Fixed bug with SetBg command, WinApi logic
      • Fixed bug with StyledObject, used stdout for resetting terminal color
      • Introduced ResetColor command
    • Sync documentation style (PR #3)
    • Remove all references to the crossterm book (PR #4)
    • Windows 7 grey/white foreground/intensity swapped (PR #5)

    crossterm_terminal 0.3.2

    • Removed crossterm_cursor::sys dependency (PR #2)
    • Internal refactoring & documentation (PR #3)
    • Removed all references to the crossterm book (PR #4)

    crossterm_utils 0.4.0

    • Add deprecation note (PR #3)
    • Remove all references to the crossterm book (PR #4)
    • Remove unsafe static mut (PR #5)
      • sys::unix::RAW_MODE_ENABLED replaced with sys::unix::is_raw_mode_enabled() (breaking)
      • New lazy_static dependency

    crossterm_winapi 0.3.0

    • Make read sync block for windows systems (PR #2)
    Open source →
  39. 0.11.1 25 Sep 2019
    Release notes
    • Maintenance release
    • All sub-crates were moved to their own repositories in the crossterm-rs organization
    Open source →
  40. 0.11.0 24 Sep 2019
    Release notes

    As a preparation for crossterm 0.1.0 we have moved crossterm to an organisation called 'crossterm-rs'.

    Code Quality

    Important Changes

    • Return written bytes: return-written-bytes
    • Added derives: Debug for ObjectStyle debug-derive, Serialize/Deserialize for key events serde
    • Improved error handling:
      • Return crossterm::Result from all api's: return_crossterm_result
        • TerminalCursor::pos() returns Result<(u16, u16)>
        • Terminal::size() returns Result<(u16, u16)>
        • TerminalCursor::move_* returns crossterm::Result
        • ExecutableCommand::queue returns crossterm::Result
        • QueueableCommand::queue returns crossterm::Result
        • get_available_color_count returns no result
        • RawScreen::into_raw_mode returns crossterm::Result instead of io::Result
        • RawScreen::disable_raw_mode returns crossterm::Result instead of io::Result
        • AlternateScreen::to_alternate returns crossterm::Result instead of io::Result
        • TerminalInput::read_line returns crossterm::Result instead of io::Result
        • TerminalInput::read_char returns crossterm::Result instead of io::Result
        • Maybe I forgot something, a lot of functions have changed
      • Removed all unwraps/expects from library
    • Add KeyEvent::Enter and KeyEvent::Tab: added-key-event-enter, added-key-event-tab
    • Sync set/get terminal size behaviour: fixed-get-set-terminal-size
    • Method renames:
      • AsyncReader::stop_reading() to stop()
      • RawScreen::disable_raw_mode_on_drop to keep_raw_mode_on_drop
      • TerminalCursor::reset_position() to restore_position()
      • Command::get_anis_code() to ansi_code()
      • available_color_count to available_color_count()
      • Terminal::terminal_size to Terminal::size
      • Console::get_handle to Console::handle
    • All i16 values for indexing: set size, set cursor pos, scrolling synced to u16 values
    • Command API takes mutable self instead of self
    Open source →
  41. 0.10.2 02 Aug 2019

    Nothing published for this version

  42. 0.10.1 26 Jul 2019

    Nothing published for this version

  43. 0.10.0 25 Jul 2019 withdrawn
    Release notes
    • Implement command API, to have better performance and more control over how and when commands are executed. PR, issue
    • Fix showing, hiding cursor windows implementation
    • Remove some of the parsing logic from windows keys to ansi codes to key events PR
    • Made terminal size 1-based PR
    • Add some derives
    Open source →
  44. 0.9.6 15 Jun 2019
    Release notes
    • Copy for KeyEvent
    • CTRL + Left, Down, Up, Right key support
    • SHIFT + Left, Down, Up, Right key support
    • Fixed UNIX cursor position bug issue, PR
    Open source →
  45. 0.9.5 20 May 2019
    Release notes
    • Prefetch buffer size for more efficient windows input reads. PR
    Open source →
  46. 0.9.4 15 May 2019
    Release notes
    • Reset foreground and background color individually. PR
    • Backtap input support. PR
    • Corrected white/grey and added dark grey.
    • Fixed getting cursor position with raw screen enabled. PR
    • Removed one redundant stdout lock
    Open source →
  47. 0.9.3 19 Apr 2019
    Release notes
    • Removed println from SyncReader

    Version 0.9.2

    • Terminal size linux was not 0-based
    • Windows mouse input event position was 0-based and should be 1-based
    • Result, ErrorKind are made re-exported
    • Fixed some special key combination detections for UNIX systems
    • Made FreeBSD compile

    Version 0.9.1

    • Fixed libc compile error

    Version 0.9.0 (yanked)

    This release is all about moving to a stabilized API for 1.0.

    • Major refactor and cleanup.
    • Improved performance;
      • No locking when writing to stdout.
      • UNIX doesn't have any dynamic dispatch anymore.
      • Windows has improved the way to check if ANSI modes are enabled.
      • Removed lot's of complex API calls: from_screen, from_output
      • Removed Arc<TerminalOutput> from all internal Api's.
    • Removed termios dependency for UNIX systems.
    • Upgraded deps.
    • Removed about 1000 lines of code
      • TerminalOutput
      • Screen
      • unsafe code
      • Some duplicated code introduced by a previous refactor.
    • Raw modes UNIX systems improved
    • Added NoItalic attribute

    Version 0.8.2

    • Bug fix for sync reader UNIX.

    Version 0.8.1

    • Added public re-exports for input.
    Open source →
  48. 0.9.2 17 Apr 2019

    Nothing published for this version

  49. 0.9.1 11 Apr 2019

    Nothing published for this version

  50. 0.9.0 10 Apr 2019 withdrawn

    Nothing published for this version

  51. 0.8.2 05 Apr 2019

    Nothing published for this version

  52. 0.8.1 04 Apr 2019

    Nothing published for this version

  53. 0.8.0 02 Apr 2019
    Release notes
    • Introduced KeyEvents
    • Introduced MouseEvents
    • Upgraded crossterm_winapi 0.2
    Open source →
  54. 0.7.0 21 Mar 2019
    Release notes
    • Introduced more Attributes
    • Introduced easier ways to style text issue 87.
    • Removed ColorType since it was unnecessary.
    Open source →
  55. 0.6.0 27 Jan 2019
    Release notes
    • Introduced feature flags; input, cursor, style, terminal, screen.
    • All modules are moved to their own crate.
    • Introduced crossterm workspace
    • Less dependencies.
    • Improved namespaces.

    PR 84

    Open source →
  56. 0.5.5 26 Jan 2019
    Release notes
    • Error module is made public PR 78.
    Open source →
  57. 0.5.4 08 Jan 2019
    Release notes
    • WinApi rewrite and correctly error handled PR 67
    • Windows attribute support PR 62
    • Readline bug fix windows systems PR 62
    • Error handling improvement.
    • General refactoring, all warnings removed.
    • Documentation improvement.
    Open source →
  58. 0.5.3 03 Jan 2019

    Nothing published for this version

  59. 0.5.2 03 Jan 2019 withdrawn

    Nothing published for this version

  60. 0.5.1 28 Nov 2018
    Release notes
    • Documentation refactor.
    • Fixed broken API documentation PR 53.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive