Skip to content

hari7261/INDUS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

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

Repository files navigation

INDUS Terminal ๐Ÿ‡ฎ๐Ÿ‡ณ

INDUS Terminal

Production-grade interactive terminal for API orchestration, developer tooling, and concurrent workloads.
Built with zero external dependencies โ€” pure Go standard library.

Latest Release Go Platform License

Install โ€ข Features โ€ข Usage โ€ข Pipelines โ€ข Colors โ€ข Build from Source


๐Ÿš€ Installation

One-click installer (like Git)

  1. Go to Releases โ†’ Latest
  2. Download indus-setup-vX.Y.Z-windows-amd64.exe
  3. Run it โ€” wizard installs INDUS and adds it to your PATH
  4. Open any new terminal and type indus

The download link above always points to the latest version โ€” no manual URL updates needed.

What the installer does

Files %LOCALAPPDATA%\INDUS\indus.exe
PATH Added at user level (no admin needed)
Desktop shortcut INDUS Terminal
Start Menu INDUS Terminal
Right-click "Open INDUS Terminal here" on any folder
Uninstall Registered in Apps & Features

Portable (no installer)

Download indus.exe from Releases and double-click. Done.


โœจ Features

๐Ÿ–ฅ๏ธ Interactive Shell

INDUS Terminal Interface

  • Indian flag ASCII banner (Saffron โ†’ White โ†’ Green)
  • Smart prompt: INDUS ~/Documents >
  • Full Windows shell fallback โ€” every system command works
  • ANSI color support auto-enabled on startup

๐ŸŽจ Prompt Colors (10 themes)

Change the prompt accent color any time:

color r   โ†’  Red        color m   โ†’  Magenta
color g   โ†’  Green      color w   โ†’  White
color b   โ†’  Blue       color o   โ†’  Orange
color y   โ†’  Yellow     color p   โ†’  Pink
color c   โ†’  Cyan       color d   โ†’  Default (Cyan)

Run color with no argument to see all swatches with a live preview.

๐Ÿ”— Internal Streaming Pipelines

Pipe INDUS commands together with | โ€” no OS shell, no subprocesses.
Each command's stdout streams byte-by-byte into the next command's stdin via io.Pipe.
All stages share the same context; one failure cancels the entire chain.

# Pipe run results as HTTP POST body
run --tasks 10 | http post https://httpbin.org/post

# Pipe version info to a logging endpoint
version | http post https://my-log-server.com/log

# Pipe init output anywhere
init --name demo | http post https://httpbin.org/post

๐ŸŒ HTTP Client

Full HTTP client with automatic retry + exponential back-off (idempotent methods only):

http get  https://api.github.com/users/hari7261
http post https://api.example.com/users '{"name":"John"}'
http put  https://api.example.com/users/1 '{"name":"Jane"}'
http delete https://api.example.com/users/1

# Custom headers
http get https://api.example.com --headers 'Authorization:Bearer token,X-App:indus'

Retry policy:

  • GET, HEAD, PUT, OPTIONS โ†’ up to 3 retries with back-off
  • POST, DELETE โ†’ single attempt (no duplicate side effects)
  • 5xx responses are surfaced as errors, not silently swallowed

๐Ÿ“ Project Initializer

init --name my-api --dir ~/projects

Creates: cmd/, internal/, pkg/, config/, README.md

โšก Concurrent Workload Runner

run --workers 8 --tasks 100

Fan-out / fan-in worker pool. Progress to stderr, machine-readable results to stdout (so it pipes cleanly).

๐Ÿ”ข Version Info

version
# version=1.3.0
# commit=77cccb8
# build_time=2026-02-28T...

๐Ÿ’ป Built-in Shell Commands

Command Description
cd <path> Change directory (~ supported)
pwd Print working directory
clear / cls Clear screen + redraw banner
color <letter> Change prompt accent color
help Show all commands + color grid
exit / quit Exit terminal

All unrecognised commands fall through to the Windows host shell โ€” git, docker, npm, python, ipconfig, ping, etc. all work normally.


๐Ÿ’ก Usage

Quick examples

# API testing
http get https://api.github.com/users/hari7261

# Pipeline: fetch + forward
http get https://jsonplaceholder.typicode.com/todos/1 | http post https://httpbin.org/post

# Change prompt to orange
color o

# Init a project
init --name my-service --dir C:\projects

# Concurrent workload โ†’ forward results
run --workers 4 --tasks 20 | http post https://httpbin.org/post

# Any Windows command
git log --oneline -5
docker ps
ipconfig /all

Configuration

INDUS reads ~/.config/indus/config.yaml (or %USERPROFILE%\.config\indus\config.yaml on Windows).

api_timeout = 30    # HTTP timeout in seconds
max_retries = 3     # Retry count for idempotent HTTP methods

Override path:

set INDUS_CONFIG=C:\path\to\config.yaml

๐Ÿ”— Internal Pipelines

How they work

user input:  run --tasks 10 | http post https://example.com
                    โ”‚
             splitPipeline()   โ† quotes-aware | splitter
                    โ”‚
             app.RunPipeline() โ† internal/cli/pipeline.go
                    โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚                         โ”‚
 [run.RunStream]          [http.RunStream]
   in = os.Stdin            in = pipe reader
   out = pipe writer         out = os.Stdout
       โ”‚   goroutine 1            โ”‚   goroutine 2
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ io.Pipe() โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                (zero OS processes)

Rules

  • Every command in a pipeline must implement StreamCommand (RunStream(ctx, args, in, out))
  • Diagnostic/progress lines always go to stderr โ€” they never pollute the pipe
  • Cancelling (Ctrl+C) stops all stages immediately
  • POST/PUT read the pipe as the request body when no inline data arg is given

Command support matrix

Command Single Pipeline Can read in
version โœ… โœ… โ€”
run โœ… โœ… โ€”
init โœ… โœ… โ€”
http get โœ… โœ… โ€”
http post โœ… โœ… โœ… body from pipe
http put โœ… โœ… โœ… body from pipe
http delete โœ… โœ… โ€”

๐ŸŽจ Prompt Colors

color r      # Red prompt
color g      # Green prompt
color b      # Blue prompt
color y      # Yellow prompt
color c      # Cyan prompt (default)
color m      # Magenta prompt
color w      # White prompt
color o      # Orange prompt
color p      # Pink prompt
color d      # Reset to default
color        # Show all options with swatches

Color persists for the session. Not yet saved across restarts (planned).


๐Ÿ—๏ธ Project Structure

indus/
โ”œโ”€โ”€ cmd/
โ”‚   โ””โ”€โ”€ indus-terminal/       # Binary entrypoint, terminal REPL
โ”œโ”€โ”€ internal/
โ”‚   โ”œโ”€โ”€ cli/
โ”‚   โ”‚   โ”œโ”€โ”€ app.go            # Command registry + help
โ”‚   โ”‚   โ”œโ”€โ”€ command.go        # Command + StreamCommand interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ pipeline.go       # RunPipeline โ€” io.Pipe engine
โ”‚   โ”‚   โ”œโ”€โ”€ context.go        # Context helpers
โ”‚   โ”‚   โ””โ”€โ”€ errors.go         # Error types + exit codes
โ”‚   โ”œโ”€โ”€ commands/
โ”‚   โ”‚   โ”œโ”€โ”€ http.go           # HTTP client command
โ”‚   โ”‚   โ”œโ”€โ”€ init.go           # Project initializer
โ”‚   โ”‚   โ”œโ”€โ”€ run.go            # Concurrent workload runner
โ”‚   โ”‚   โ””โ”€โ”€ version.go        # Version printer
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ””โ”€โ”€ loader.go         # Config file parser
โ”‚   โ””โ”€โ”€ httpclient/
โ”‚       โ””โ”€โ”€ client.go         # Retry + back-off HTTP client
โ”œโ”€โ”€ installer/
โ”‚   โ””โ”€โ”€ indus-setup.iss       # Inno Setup installer script
โ”œโ”€โ”€ .github/workflows/
โ”‚   โ””โ”€โ”€ release.yml           # Auto-build + GitHub Release on tag push
โ””โ”€โ”€ build.bat                 # Local build + installer builder

๐Ÿ”จ Build from Source

# 1. Clone
git clone https://github.com/hari7261/INDUS.git
cd INDUS

# 2. Build binary only
go build -o indus.exe ./cmd/indus-terminal

# 3. Build binary + installer (requires Inno Setup 6)
build.bat
# โ†’ dist\indus.exe
# โ†’ dist\indus-setup.exe

Publish a release

git tag v1.4.0
git push --tags
# GitHub Actions builds indus-setup-v1.4.0-windows-amd64.exe and publishes automatically

๐Ÿ†š Comparison

Feature INDUS PowerShell Git Bash CMD
Built-in HTTP client โœ… โŒ โŒ โŒ
Internal pipelines (no shell) โœ… โŒ โŒ โŒ
Project scaffolding โœ… โŒ โŒ โŒ
Concurrent workload runner โœ… โŒ โŒ โŒ
Prompt color themes โœ… 10 โš ๏ธ โš ๏ธ โŒ
System command fallback โœ… โœ… โœ… โœ…
Zero external dependencies โœ… โŒ โŒ โœ…
One-click installer โœ… โœ… โœ… โœ…
Right-click "Open here" โœ… โŒ โœ… โŒ

๐Ÿ“‹ Roadmap

  • HTTP client (GET / POST / PUT / DELETE)
  • Retry + exponential back-off (idempotent only)
  • Internal streaming pipelines (|)
  • 10 prompt color themes
  • One-click Inno Setup installer
  • Auto GitHub Releases via CI
  • Command history (โ†‘ / โ†“)
  • Tab completion
  • grep built-in for pipeline filtering
  • Script file execution (.indus files)
  • Plugin system
  • Cross-platform support (Linux / macOS)

๐Ÿค Contributing

  1. Fork โ†’ branch โ†’ code โ†’ PR
  2. go build ./... must pass with zero errors
  3. Diagnostic output โ†’ stderr, machine output โ†’ stdout
  4. New commands should implement both Command and StreamCommand

๐Ÿ› Troubleshooting

Problem Fix
indus not found Open a new terminal after install (PATH loads on start)
Colors broken Run inside Windows Terminal for full ANSI support
Installer blocked by Windows Click More info โ†’ Run anyway (SmartScreen on unsigned exe)

๐Ÿ“„ License

MIT โ€” see LICENSE


Made with โ™ฅ by hari7261

Namaste! ๐Ÿ™ ย |ย  Made in India ๐Ÿ‡ฎ๐Ÿ‡ณ โฌ† Back to top