- Notifications
You must be signed in to change notification settings - Fork8.7k
The new Windows Terminal and the original Windows console host, all in the same place!
License
microsoft/terminal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Table of Contents
This repository contains the source code for:
- Windows Terminal
- Windows Terminal Preview
- The Windows console host (
conhost.exe
) - Components shared between the two projects
- ColorTool
- Sample projectsthat show how to consume the Windows Console APIs
Related repositories include:
- Windows Terminal Documentation(Repo: Contribute to the docs)
- Console API Documentation
- Cascadia Code Font
Note
Windows Terminal requires Windows 10 2004 (build 19041) or later
Install theWindows Terminal from the Microsoft Store.This allows you to always be on the latest version when we release new buildswith automatic upgrades.
This is our preferred method.
For users who are unable to install Windows Terminal from the Microsoft Store,released builds can be manually downloaded from this repository'sReleasespage.
Download theMicrosoft.WindowsTerminal_<versionNumber>.msixbundle
file fromtheAssets section. To install the app, you can simply double-click on the.msixbundle
file, and the app installer should automatically run. If thatfails for any reason, you can try the following command at a PowerShell prompt:
# NOTE: If you are using PowerShell 7+, please run# Import-Module Appx -UseWindowsPowerShell# before using Add-AppxPackage.Add-AppxPackage Microsoft.WindowsTerminal_<versionNumber>.msixbundle
Note
If you install Terminal manually:
- You may need to install theVC++ v14 Desktop Framework Package.This should only be necessary on older builds of Windows 10 and only if you get an error about missing framework packages.
- Terminal will not auto-update when new builds are released so you will needto regularly install the latest Terminal release to receive all the latestfixes and improvements!
winget users can download and installthe latest Terminal release by installing theMicrosoft.WindowsTerminal
package:
winget install--id Microsoft.WindowsTerminal-e
Note
Dependency support is available in WinGet version1.6.2631 or later. To install the Terminal stable release 1.18 or later, please make sure you have the updated version of the WinGet client.
Chocolatey users can download and install the latestTerminal release by installing themicrosoft-windows-terminal
package:
choco install microsoft-windows-terminal
To upgrade Windows Terminal using Chocolatey, run the following:
choco upgrade microsoft-windows-terminal
If you have any issues when installing/upgrading the package please go to theWindows Terminal packagepage and follow theChocolatey triage process
Scoop users can download and install the latest Terminalrelease by installing thewindows-terminal
package:
scoop bucket add extrasscoop install windows-terminal
To update Windows Terminal using Scoop, run the following:
scoop update windows-terminal
If you have any issues when installing/updating the package, please search foror report the same on theissuespage of Scoop Extras bucketrepository.
Windows Terminal Canary is a nightly build of Windows Terminal. This build has the latest code from ourmain
branch, giving you an opportunity to try features before they make it to Windows Terminal Preview.
Windows Terminal Canary is our least stable offering, so you may discover bugs before we have had a chance to find them.
Windows Terminal Canary is available as an App Installer distribution and a Portable ZIP distribution.
The App Installer distribution supports automatic updates. Due to platform limitations, this installer only works on Windows 11.
The Portable ZIP distribution is a portable application. It will not automatically update and will not automatically check for updates. This portable ZIP distribution works on Windows 10 (19041+) and Windows 11.
Distribution | Architecture | Link |
---|---|---|
App Installer | x64, arm64, x86 | download |
Portable ZIP | x64 | download |
Portable ZIP | ARM64 | download |
Portable ZIP | x86 | download |
Learn more about thetypes of Windows Terminal distributions.
The plan for the Windows Terminalis described here andwill be updated as the project proceeds.
Please take a few minutes to review the overview below before diving into thecode:
Windows Terminal is a new, modern, feature-rich, productive terminal applicationfor command-line users. It includes many of the features most frequentlyrequested by the Windows command-line community including support for tabs, richtext, globalization, configurability, theming & styling, and more.
The Terminal will also need to meet our goals and measures to ensure it remainsfast and efficient, and doesn't consume vast amounts of memory or power.
The Windows Console host,conhost.exe
, is Windows' original command-line userexperience. It also hosts Windows' command-line infrastructure and the WindowsConsole API server, input engine, rendering engine, user preferences, etc. Theconsole host code in this repository is the actual source from which theconhost.exe
in Windows itself is built.
Since taking ownership of the Windows command-line in 2014, the team addedseveral new features to the Console, including background transparency,line-based selection, support forANSI / Virtual Terminalsequences,24-bitcolor,aPseudoconsole("ConPTY"),and more.
However, because Windows Console's primary goal is to maintain backwardcompatibility, we have been unable to add many of the features the community(and the team) have been wanting for the last several years including tabs,unicode text, and emoji.
These limitations led us to create the new Windows Terminal.
You can read more about the evolution of the command-line in general, and theWindows command-line specifically inthis accompanying series of blogpostson the Command-Line team's blog.
While overhauling Windows Console, we modernized its codebase considerably,cleanly separating logical entities into modules and classes, introduced somekey extensibility points, replaced several old, home-grown collections andcontainers with safer, more efficientSTLcontainers,and made the code simpler and safer by using Microsoft'sWindows ImplementationLibraries - WIL.
This overhaul resulted in several of Console's key components being availablefor re-use in any terminal implementation on Windows. These components include anew DirectWrite-based text layout and rendering engine, a text buffer capable ofstoring both UTF-16 and UTF-8, a VT parser/emitter, and more.
When we started planning the new Windows Terminal application, we explored andevaluated several approaches and technology stacks. We ultimately decided thatour goals would be best met by continuing our investment in our C++ codebase,which would allow us to reuse several of the aforementioned modernizedcomponents in both the existing Console and the new Terminal. Further, werealized that this would allow us to build much of the Terminal's core itself asa reusable UI control that others can incorporate into their own applications.
The result of this work is contained within this repo and delivered as theWindows Terminal application you can download from the Microsoft Store, ordirectly from this repo'sreleases.
For more information about Windows Terminal, you may find some of theseresources useful and interesting:
- Command-Line Blog
- Command-Line Backgrounder BlogSeries
- Windows Terminal Launch:Terminal "SizzleVideo"
- Windows Terminal Launch:Build 2019Session
- Run As Radio:Show 645 - Windows Terminal with RichardTurner
- Azure Devops Podcast:Episode 54 - Kayla Cinnamon and Rich Turner on DevOpson the WindowsTerminal
- Microsoft Ignite 2019 Session:The Modern Windows Command Line: WindowsTerminal -BRK3321
Cause: You're launching the incorrect solution in Visual Studio.
Solution: Make sure you're building & deploying theCascadiaPackage
project inVisual Studio.
Note
OpenConsole.exe
is just a locally-builtconhost.exe
, the classicWindows Console that hosts Windows' command-line infrastructure. OpenConsoleis used by Windows Terminal to connect to and communicate with command-lineapplications (viaConPty).
All project documentation is located ataka.ms/terminal-docs. If you would liketo contribute to the documentation, please submit a pull request on theWindowsTerminal Documentation repo.
We are excited to work alongside you, our amazing community, to build andenhance Windows Terminal!
BEFORE you start work on a feature/fix, please read & follow ourContributor'sGuide tohelp avoid any wasted or duplicate effort.
The easiest way to communicate with the team is via GitHub issues.
Please file new issues, feature requests and suggestions, butDO search forsimilar open/closed preexisting issues before creating a new issue.
If you would like to ask a question that you feel doesn't warrant an issue(yet), please reach out to us via Twitter:
- Christopher Nguyen, Product Manager:@nguyen_dows
- Dustin Howett, Engineering Lead:@dhowett
- Mike Griese, Senior Developer:@zadjii@mastodon.social
- Carlos Zamora, Developer:@cazamor_msft
- Pankaj Bhojwani, Developer
- Leonard Hecker, Developer:@LeonardHecker
You can configure your environment to build Terminal in one of two ways:
After cloning the repository, you can use aWinGet configuration fileto set up your environment. Thedefault configuration file installs Visual Studio 2022 Community & rest of the required tools. There are two other variants of the configuration file available in the.config directory for Enterprise & Professional editions of Visual Studio 2022. To run the default configuration file, you can either double-click the file from explorer or run the following command:
winget configure .config\configuration.winget
- You must be running Windows 10 2004 (build >= 10.0.19041.0) or later to runWindows Terminal
- You mustenable Developer Mode in the Windows Settingsappto locally install and run Windows Terminal
- You must havePowerShell 7 or later installed
- You must have theWindows 11 (10.0.22621.0)SDKinstalled
- You must have at leastVS2022 installed
- You must install the following Workloads via the VS Installer. Note: Openingthe solution in VS 2022 willprompt you to install missing componentsautomatically:
- Desktop Development with C++
- Universal Windows Platform Development
- The following Individual Components
- C++ (v143) Universal Windows Platform Tools
- You must install the.NET Framework Targeting Pack to build test projects
OpenConsole.sln may be built from within Visual Studio or from the command-lineusing a set of convenience scripts & tools in the/tools directory:
Import-Module .\tools\OpenConsole.psm1Set-MsBuildDevEnvironmentInvoke-OpenConsoleBuild
.\tools\razzle.cmdbcz
To debug the Windows Terminal in VS, right click onCascadiaPackage
(in theSolution Explorer) and go to properties. In the Debug menu, change "Applicationprocess" and "Background task process" to "Native Only".
You should then be able to build & debug the Terminal project by hittingF5. Make sure to select either the "x64" or the "x86" platform - theTerminal doesn't build for "Any Cpu" (because the Terminal is a C++ application,not a C# one).
👉 You willnot be able to launch the Terminal directly by running theWindowsTerminal.exe. For more details on why, see#926,#4043
Please review these brief docs below about our coding practices.
👉 If you find something missing from these docs, feel free to contribute toany of our documentation files anywhere in the repository (or write some newones!)
This is a work in progress as we learn what we'll need to provide people inorder to be effective contributors to our project.
- Coding Style
- Code Organization
- Exceptions in our legacy codebase
- Helpful smart pointers and macros for interfacing with Windows in WIL
This project has adopted theMicrosoft Open Source Code ofConduct. For more information see theCode of ConductFAQ or contactopencode@microsoft.com with anyadditional questions or comments.
About
The new Windows Terminal and the original Windows console host, all in the same place!
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.