C-Promptz is a simple step by step custom terminal prompt builder designed for beginners to have a small creative terminal win and sparker curiosity of what else is possible.
It can take your boring standard prompt to something that is of both your own flavour as well as more functional depending on what you're working on.
For Example.
Change: Andrews-MacBook-Air andrewwhalley ~/apps/ruby/terminal_app
To: $andrewwhalley 🙈 $terminal_app ~
- The terminal prompt builder was built with programming beginners in mind
- The first "functionally beautiful" thing a beginner can personalise in the terminal
- The app was built to accomplish 3 goals:
- Build functional and beautiful prompts for the terminal
- Incite the curiosity of beginners to question how terminal prompts are built and make even more creative prompts that the app could not do
- Help beginners understand the functional side and creative side of "creating"
-
Priority #1: Functionality
- The app was designed to help users build functional and beautiful terminal prompts
-
Priority #2: User Experience
- The app was designed to be as efficient as possible by using the least steps to achieve the final objective
- The app was designed to have a simple interphase and is dummy-proof
- The app was also built to add a little fun while accomplishing an objective goal
- Open terminal or shell
- CD to app directory
- Type into terminal
>> bundle install
- Run main.rb file
>> ruby main.rb
- Follow the in built guide to change your prompt
-
Planning Phase
- Setting the scope of multiple stages of the development:
- Developing the minimum viable product
- Modifications based on design and marketing considerations
- Internal beta testing and debugging
- Developing L1 add-on features
- Developing L2 add-on features (if time permits)
- Finalise development documentations
- Identify development activities
- Develop timeline for development activities
- Setting the scope of multiple stages of the development:
-
Development Phase
- App development was broken down into 2 parts:
- App Introduction/Guide
- App Functionalities
- App functionalities were built using simple Ruby codes. Most Ruby concepts taught were very useful in coding the functionalities. For example:
- Arrays to store data
basic_element = ["Username", "Hostname", "Shell", "Shell Version", "Path to Current Directory", "Current Directory", "Exit"]
- Hashes to store data
username = { number: 1, name: "Username", code: '\u ', output: "user" }
- Loops to create process loop
until selection_1 == 6 do ... end
- Control flow to create process rules and flow
basic_element_2.each do |key| if selection_2 == key[:number] output.push(key[:output]) terminal_code.push(key[:code]) end end
- Calling useful gems to access existing pre-built features
require 'colorize' require 'terminal-table'
- Executing terminal codes using Ruby
`echo 'PS1="#{terminal_code.join}"' >>~/.bash_profile`
- The app were internal tested multiple times by running each possible scenarios followed by debugging
- App interphase design was synchronised to offer a consistent experience across all "pages"
- App development was broken down into 2 parts:
-
Closing Phase
- Finalise product documentations such as the README file and code files
- Compile all code files into zip and ensure all files are named logically
- Setting scope of project by stages is very important. By setting scope by stages, you can systematically strive for perfection yet not sacrificing "completing the task"
As someone once said, "Completed is better than perfect."
- Simplify problems and create simple solutions
As someone once said," Simple is better."
- Teamwork is key - working in a team independently, identifying strengths and weaknesses within the team and amplify strengths
In finance, there are times when 1 + 1 > 2. When you find this, invest!
- Additional features for the prompt builder:
- Functionality to store pre-built app where users can select from without having to build from scratch
- Machine learning capability where user designed prompts can be stored and added to library for other users to refer to or use
- Pre-designed prompts ranking by user "download"