Natural Language Unix
Written in Python 3, this program allows users to automate seemingly tedious and multi-step processes through the application of Unix commands using natural language. In the future, we may also incorporate speech recognition, blurring the limitations of precise syntax programming.
Platform
NLU builds on flexible unix scripts and is coded in Python, which can be extended as part of implementations of native macOS and Linux applications.
Inspiration
Our inspiration was our own expectation and vision to be able to program computers easily and flexibly. We think NLU is a great foundation to build on.
Supported Commands
The program supports the following commands:
- Find - to find a file on disk (using unix find)
- Move - to move one file or directory to another (using unix mv)
- Rename - to rename file (using unix mv)
- Copy - to copy one file to destination (using unix rsync)
- Open - to open a file (using unix open)
- Organize - given a directory and a document type (or every found type), cluster them into folders per type
Applications
NLU has the following advantages for non-programmers:
- Extremely easy-to-use natural language syntax
- Ability to perform complex tasks with a single command
- Easily adopt more capabilities into the system, making NLU a more personal application
The most interesting aspect about NLU is its flexibility, being easy to expand and extremely scalable:
- Can add more scripts to the
scripts/folder to leverage more powerful unix capabilities - Builds on python as a foundation that adds more flexibility, programming paradigms, and applications of rich libraries
- Provides seamless integration between unix and python to create unique solutions to problems
- Allows for a robust user interface platform (still pre-alpha) for unix
NLU is currently pre-alpha - we think it has great potential to enable powerful capabilities with little to no syntax knowledge overhead.
Examples
Some requests could be as follows:
organize everything in Documents
This will organize every file type into a separate folder for that type.
open HelloWorld.java
This will open the the file with the OS-default application for that type.
Logging
The application also includes a convenient logging system that maintains a systematic list of commands and results in a subdirectory called logs. Logs are ordered by date and captured per session.
Testing
To test the working of the project, first run testing.sh, and then attempt to run the following commands:
- Organize -
organize everything in TestOrganizeororganize pdf in TestOrganizeororganize txt in TestOrganizeororganize dmg in TestOrganizeororganize png in TestOrganize - Rename -
rename hack.txt to umass.txt - Move -
move drag.txt to TestMove - Copy -
copy back.txt to TestCopy - Open -
open openthis.txtoropen openthat.txt
Scope
We believe that our current implementation (pre-alpha) has no boundaries and tremendous potential. You can integrate new scripts freely and employ large python libraries for virtually any possible operation in the operating system. Some of the possible enhancements could be:
- Using natural language processing and neural networks, to identify unix commands from speech
- The holy grail of the command line - NLU could provide an undo mechanism for most applicable features
- The ability to perform complex tasks remotely using natural language only
Overall, we think that with NLU, we can nearly eliminate the requirement of having precise syntax for programming, and potentially foster a new approach to programming computers in general.
What We Learnt
Developing a complex and flexible framework requires tremendous time investment to decide a practical design. We realized the importance of making good design decisions early. We also learnt that developing UI in python is exceedingly difficult without prior forays into the same.
License
This project is available under the MIT license. See the license file for more information.

Log in or sign up for Devpost to join the conversation.