Programming languages

NGS: The Next Gen Shell

NGS: The Next Generation Shell for Operations Tasks

In the evolving landscape of software development and systems administration, the need for more efficient, streamlined tools has never been more pressing. Enter NGS, or the Next Generation Shell, a language and, in the future, a shell designed to revolutionize how operations tasks are carried out. Aimed at providing an alternative to traditional tools such as bash, Python, Ruby, Perl, Go, and even configuration management utilities, NGS seeks to unify a range of functions into a singular, robust framework that facilitates both scripting and operational workflows. This article will delve into the origins, features, capabilities, and potential of NGS, exploring its current use cases and its roadmap for the future.


The Genesis of NGS

NGS was created by Ilya Sher in 2013, driven by the need to simplify and enhance the operational experience for developers, sysadmins, and DevOps professionals. Traditionally, tasks such as automation, configuration management, resource provisioning, and orchestration have required the use of multiple tools. For instance, systems administrators often rely on bash scripts, while developers might turn to Python or Go for more complex operations. While these tools are powerful, they also come with limitations that can complicate workflows.

NGS was conceived as a solution to these challenges—a language and shell that can do it all. It is designed to be versatile and efficient, addressing common tasks in a unified manner. Whether it is managing AWS resources, running shell commands, or orchestrating complex workflows, NGS simplifies operations by providing a cohesive set of tools in one place.


Key Features of NGS

The core philosophy behind NGS is to make operations tasks more efficient, intuitive, and idempotent. Below are some of the standout features that differentiate NGS from other tools:

1. Unified Language for Operations

NGS was designed to fill a niche that has remained largely unaddressed by traditional programming and scripting languages. While tools like bash, Python, and Ruby excel in specific areas, NGS aims to combine the best of all worlds. It offers a syntax that supports common operations such as string manipulation, file handling, and command execution, all with a focus on ease of use and speed.

The language itself is simple, yet powerful, and designed with operations professionals in mind. Instead of jumping between different tools and languages to complete different tasks, NGS allows users to perform a variety of actions from a single environment.

2. Idempotent Resource Manipulation

One of the unique aspects of NGS is its ability to manipulate resources in an idempotent manner. Idempotency, a key principle in configuration management, ensures that repeated execution of a task does not have unintended side effects. NGS, through its AWS libraries and other built-in functionality, allows for resource manipulation that can be safely repeated without concern for inconsistencies or errors.

In practical terms, this means that a user can provision, update, or manage infrastructure (like EC2 instances, S3 buckets, or IAM roles) and trust that subsequent runs of the same task will not result in duplicate actions or errors.

3. Built-In Exit Code Handling

Another standout feature is NGS’s built-in handling of exit codes. In traditional shell environments, managing exit codes can be a tedious and error-prone task. NGS streamlines this process, offering automatic handling and reporting of exit codes, thus simplifying error management and troubleshooting.

This ensures that developers and administrators can focus more on the logic of their tasks and less on manual checks for successful or failed command executions.

4. Run-A-Command-and-Parse-Output Syntax

NGS introduces a unique syntax for running commands and parsing their output in a streamlined, efficient manner. Often in traditional scripting, you need to run a command and then manually parse its output, which can involve complex regular expressions or additional processing steps. NGS eliminates this overhead by integrating command execution and output parsing into one step, making it simpler and faster to work with command-line utilities.

This feature can be particularly useful for tasks like API interactions, system diagnostics, and automation, where a shell command is frequently used to retrieve data that needs to be processed further.

5. Extensibility and Community Contributions

As an open-source project, NGS is highly extensible. Its core functionalities can be enhanced by third-party contributors, and the growing NGS community has already contributed a variety of libraries and tools. The project’s GitHub repository, with 268 open issues (as of the latest update), serves as a hub for active development, discussions, and improvements.

The project’s open nature encourages developers to collaborate, share insights, and contribute to NGS’s evolution. The central repository has yet to house a large number of packages, but as the community grows, it is expected that the ecosystem will expand, bringing in new libraries and support for additional platforms beyond AWS.


NGS and AWS: A Case Study in Cloud Automation

One of the most prominent features of NGS is its current focus on Amazon Web Services (AWS) resources. With the rapid growth of cloud infrastructure, AWS has become the go-to platform for many organizations. NGS’s built-in libraries for AWS offer idempotent manipulation of AWS resources, which makes it an invaluable tool for those managing cloud infrastructure.

In traditional scripting, managing cloud resources often involves interacting with APIs or SDKs, writing complex scripts to create or manage resources, and ensuring that operations are idempotent. With NGS, much of this complexity is handled automatically, offering a simplified syntax and abstraction layer that allows users to focus on high-level operations rather than the minutiae of interacting with AWS APIs directly.

For example, provisioning an EC2 instance, configuring security groups, or managing S3 buckets in AWS can all be accomplished with a few simple commands. This makes NGS an excellent choice for DevOps engineers and system administrators looking to automate cloud infrastructure in a seamless, repeatable way.


The Road Ahead: NGS as a Shell

While NGS is already a powerful language for operations tasks, its creators have a bold vision for the future: to transform NGS into a full-fledged shell environment. Currently, NGS functions primarily as a language designed to execute tasks and automate workflows. However, there is a roadmap to expand it into a shell that can replace traditional Unix shells like bash.

In the future, NGS aims to provide not only a powerful language but also a complete shell environment that can handle interactive command-line sessions, complex shell scripting, and seamless automation. This transformation would allow NGS to become a one-stop solution for operations professionals, developers, and sysadmins alike. It would combine the best features of traditional shells with modern tools for automation, orchestration, and cloud resource management.


Challenges and Limitations

Despite its many advantages, NGS is still in its early stages of adoption, and as with any open-source project, it faces challenges. One of the biggest challenges is attracting a broader user base and establishing a robust ecosystem of libraries, plugins, and community contributions. While the existing support for AWS is useful, expanding support for other cloud platforms, third-party services, and local infrastructure management tools will be crucial for NGS’s growth.

Additionally, as the project evolves into a full-fledged shell, it will need to ensure compatibility with existing shell environments and Unix tools, which are deeply entrenched in the industry.

Another challenge is the steep learning curve that might come with transitioning from traditional tools like bash to NGS. For users accustomed to a particular workflow or toolchain, adopting a new language or shell can take time and effort. Ensuring that NGS is accessible to a broad range of users, from beginners to advanced professionals, will be critical for its success.


Conclusion

NGS represents a significant step forward in the world of systems administration, cloud automation, and DevOps. With its unified syntax, idempotent resource manipulation, and unique command handling features, NGS offers a compelling alternative to traditional scripting and configuration management tools. While still in development, its potential to become a next-generation shell for a wide range of operational tasks is clear.

As the project evolves and its community grows, NGS could redefine how operations tasks are performed in modern infrastructure environments, bridging the gap between developers, sysadmins, and cloud professionals. Whether you are managing AWS resources or preparing for future cloud automation challenges, NGS is a tool to watch as it continues to innovate and expand its capabilities.

For more information on NGS and to get involved with the project, visit the official NGS website or explore the NGS GitHub repository.


References

Back to top button