Improvisation with live instruments presents unique challenges to the laptop performer. Modularity, Immediacy and Exchange in Laptop Improvisation is a practice-based research project that addresses the challenges of laptop improvisation by developing a new command-style live coding environment. This environment is tested through performance and improved based on the needs and findings of practical knowledge gained by the laptop performer. The improvisation environment aims to: a) encourage exchange with other instrumentalists and generate a reaction that is both spontaneous and expeditious and that at the same time is responsive and reflective of the other musicians' contributions; b) produce an adaptive response to the instrumentalist's initiatives and at the same time put forward and contribute new and inventive ideas; c) create a modular approach to laptop performance where the performer can access a wide variety of tools and materials and choose the adequate ones depending on the musical circumstances at a given moment. Live coding already provides the versatility needed for free improvisation. However, in practice it often involves typing relatively long pieces of code and this takes some time during the performance. This is not ideal if what is desired is an immediate and adaptive response and a fast exchange of musical ideas. This research project develops laptop improvisation strategies that combine the versatility and modularity provided by live coding with a command-line style requiring only minimal typing to achieve the immediacy required to interact with live instruments. Research outputs include the development of a laptop improvisation application, album releases, conference presentations workshops and performances.