Skip to content
/ typit Public

Typit is your personal command-line assistant ๐Ÿค–!

Notifications You must be signed in to change notification settings

xd-Abi/typit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Typit

Cover

Typit is a powerful terminal extension built in Rust, offering a variety of utility tools and beautiful color formatting for enhanced command-line experiences. It allows you to seamlessly integrate common terminal operations like mathematical calculations, hashing, directory navigation, and more with a stylish interface!

๐Ÿš€ Installation & Setup

Follow these steps to build and run Typit on your machine:

git clone https://github.com/xd-Abi/typit.git
cd typit
cargo run --release

๐Ÿ”ง Available Commands

Typit offers the following built-in commands:

  • ๐Ÿงฎ calc: Evaluate mathematical expressions.
  • ๐Ÿ” hash: Generate cryptographic hashes for files and strings.
  • ๐ŸŒ mac: Display all MAC addresses of the systemโ€™s network interfaces.
  • ๐Ÿ”‘ pwd: Generate secure passwords and copy them to the clipboard.
  • ๐Ÿ“ cd: Change directories within the program.
  • ๐Ÿ‘‹ exit: Exit the Typit interface.
  • โš™๏ธ Native Commands: Typit will automatically run any native CLI tool if it does not match one of the custom commands (e.g., flutter doctor or git status).

๐Ÿ’ก How It Works

  1. Command Matching: Typit first checks for built-in commands (e.g., calc, hash) before falling back to executing native commands installed on your system.
  2. Dynamic Directory Navigation: Commands like cd will change the Rust processโ€™s working directory, similar to native shells.
  3. Enhanced Output: Typit uses rich colors and icons to make the command-line experience more enjoyable.

๐Ÿ› ๏ธ Utility Tool Overview

calc

Calculate mathematical expressions directly from the terminal. Supports basic arithmetic and more advanced operations like sqrt(16) or 5 * (2 + 3).

> calc 5 + 3 * 2
๐Ÿงฎ Calculated Result (copied to clipboard): 5 + 3 * 2 = 11

hash

Generate hashes for text strings or files using multiple algorithms like SHA-256 or MD5.

> hash str hello world
๐Ÿ” SHA-256 Hash (copied to clipboard): 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

mac

Display the primary MAC addresses on the system.

> mac
๐ŸŒ Your Mac address (copied to clipboard): 8C:B8:7E:A0:70:67

pwd

Generate strong, random passwords with ease.

> pwd gen 15
๐Ÿ”‘ Generated Password (copied to clipboard): 3Lg!1Z$AQ^AwJ1%

cd

Change the working directory within Typit.

> cd /Users/username/Documents
๐Ÿ“‚ Directory changed to: /Users/username/Documents

๐ŸŒ Native Command Integration

If Typit does not match any built-in command, it will attempt to run native commands installed on your system:

> git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

โœจ Color and Style Customization

Typit uses the colored library to create a visually appealing interface with vibrant colors for better readability and organization. Each command has its own unique icon and style for better visual distinction.

๐Ÿ“œ Command Guidelines

  1. Built-In Commands: Use Typit's internal commands like calc, pwd, or cd for quick operations.
  2. Native Commands: If a command is not recognized, Typit will pass it to the system shell (e.g., flutter, ls, or git).
  3. Error Handling: Typit provides meaningful error messages when a command is not found or executed incorrectly.

๐Ÿ”ง Technical Details

  • Rust: The core of Typit is built in Rust, ensuring high performance and safety.
  • Colored: Colorizes the terminal output to enhance readability.
  • Inquire: Handles dynamic prompts and input management.
  • std::process::Command: Executes native commands.
  • Clipboard Support: Automatically copies results to the clipboard for certain operations (e.g., calc results).

๐Ÿ“œ Future Features

  • Dynamic Plugins: Add and manage custom commands on-the-fly.
  • Shell Integration: Provide better support for running interactive shell commands.
  • Command Autocompletion: Include support for autocompleting common commands.
  • Cross-Platform Enhancements: Improve compatibility on Windows, macOS, and Linux.
  • Arrow Key Command Navigation: Implement support for navigating through command history using the โ†‘ and โ†“ arrow keys.

About

Typit is your personal command-line assistant ๐Ÿค–!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages