murex

command module
v0.0.0-...-e081c89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: GPL-2.0 Imports: 25 Imported by: 0

README

Murex: A Smarter Shell

Version Murex Tests Deploy Docs

Murex is a shell, like bash / zsh / fish / etc however Murex supports improved features and an enhanced UX.

A non-exhaustive list features would include:

  • Support for additional type information in pipelines, which can be used for complex data formats like JSON or tables. Meaning all of your existing UNIX tools to work more intelligently and without any additional configuration.

  • Usability improvements such as in-line spell checking, context sensitive hint text that details a commands behavior before you hit return, and auto-parsing man pages for auto-completions on commands that don't have auto- completions already defined.

  • Smarter handling of errors and debugging tools. For example try/catch blocks, line numbers included in error messages, STDOUT highlighted in red and script testing and debugging frameworks baked into the language itself.

Language Guides

  • Read the language tour to get started.

  • The Rosetta Stone is a great cheatsheet for those wishing to skip the tutorials and jump straight in. This guide includes comparisons with Bash.

  • The Interactive Shell guide walks you through using Murex as a command line as opposed to a scripting language.

Examples

Smart data:

Inline spellchecking:

Autocomplete:

Preview screen:

Useful error messages:

Plus More!

Check out the Language Tour and Interactive Shell guides!

Install instructions

See INSTALL for details.

Discuss Murex

Discussions presently happen in Github discussions.

Compatibility Commitment

Murex is committed to backwards compatibility. While we do want to continue to grow and improve the shell, this will not come at the expense of long term usability. Read more

Known bugs / TODO

Murex is considered stable, however if you do run into problems then please raise them on the project's issue tracker: https://github.com/lmorg/murex/issues


This document was generated from gen/root/README_doc.yaml.

Documentation

Overview

Murex is a cross-platform shell like Bash but with greater emphasis on writing safe shell scripts and powerful one-liners while maintaining readability.

A quick breakdown of the project structure:

  • app is for hardcoded strings like copyright dates
  • builtins contains all the plugins exposed via the languages runtime
  • config is APIs for the runtime config
  • debug is debugging APIs
  • docs is the murex online documentation. Contents in here are autogenerated and some of this will be compiled into the murex executable.
  • examples (does not contain Go code) is murex shell script examples
  • gen is the templates for docgen
  • lang contains the language parsers and runtime environment
  • shell is the code for the interactive shell
  • test is the testing framework
  • utils directory is tools used exclusively within this Go source code

Directories

Path Synopsis
app
Package builtins is the gatekeeper to the various modules, additional data types and builtin functions within murex
Package builtins is the gatekeeper to the various modules, additional data types and builtin functions within murex
core/arraytools
Package arraytools provides functions for working with arrays and maps
Package arraytools provides functions for working with arrays and maps
core/datatools
Package datatools provides utilities for manipulating data structures
Package datatools provides utilities for manipulating data structures
core/escape
Package escape provides some handy string escaping utilities
Package escape provides some handy string escaping utilities
core/httpclient
Package httpclient provides useful HTTP functions
Package httpclient provides useful HTTP functions
core/management
Package management provides misc functions for managing your murex runtime environment
Package management provides misc functions for managing your murex runtime environment
core/mkarray
Package mkarray provides functions for rapidly building arrays
Package mkarray provides functions for rapidly building arrays
core/openimage
Package openimage renders bitmap image data on your terminal
Package openimage renders bitmap image data on your terminal
core/pretty
Package pretty provides data formatting tools
Package pretty provides data formatting tools
core/processes
Package processes provides core functions for managing processes
Package processes provides core functions for managing processes
core/runtime
Package cmdruntime provides data on murex's runtime state
Package cmdruntime provides data on murex's runtime state
core/structs
Package structs provides code syntax structures for murex
Package structs provides code syntax structures for murex
core/time
Package time provides some core time based builtins
Package time provides some core time based builtins
core/typemgmt
Package typemgmt provides core functions for managing murex types and variables
Package typemgmt provides core functions for managing murex types and variables
events
Package events provides a basic event framework for murex
Package events provides a basic event framework for murex
optional/encoders
Package encoders provides some handy builtins for encoding and decoding streams in various different formats
Package encoders provides some handy builtins for encoding and decoding streams in various different formats
optional/qr
Package qrimage generates a QR code image
Package qrimage generates a QR code image
optional/select
Package sqlselect provides the SELECT builtin for working with tables in sqlite3
Package sqlselect provides the SELECT builtin for working with tables in sqlite3
optional/time
Package time provides some optional time based builtins
Package time provides some optional time based builtins
pipes/mail
Package mail provides basic email sending capabilities
Package mail provides basic email sending capabilities
pipes/null
Package null provides the null interface (akin to /dev/null).
Package null provides the null interface (akin to /dev/null).
pipes/streams
Package streams provides the standard streams used by murex and thus is REQUIRED by murex.
Package streams provides the standard streams used by murex and thus is REQUIRED by murex.
pipes/term
Package term provides the TTY STDOUT and STDERR interfaces.
Package term provides the TTY STDOUT and STDERR interfaces.
types/apachelogs
Package apachelogs provides definitions for the `commonlog` and `errorlog` data types
Package apachelogs provides definitions for the `commonlog` and `errorlog` data types
types/boolean
Package boolean provides definitions for the boolean data types
Package boolean provides definitions for the boolean data types
types/columns
Package columns provides definitions for the column, `column`, data type
Package columns provides definitions for the column, `column`, data type
types/csv
Package csv provides definitions for the `csv` data type
Package csv provides definitions for the `csv` data type
types/csv-bad
Package csvbad provides definitions for the `csv-bad` data type
Package csvbad provides definitions for the `csv-bad` data type
types/generic
Package generic provides definitions for the generic, `*`, data type
Package generic provides definitions for the generic, `*`, data type
types/hcl
Package hcl provides definitions for the `hcl` data type
Package hcl provides definitions for the `hcl` data type
types/json
Package json provides definitions for the `json` data type
Package json provides definitions for the `json` data type
types/jsonconcat
Package jsonconcat provides definitions for the `jsonc` data type
Package jsonconcat provides definitions for the `jsonc` data type
types/jsonlines
Package jsonlines provides definitions for the `jsonlines` data type
Package jsonlines provides definitions for the `jsonlines` data type
types/numeric
Package numeric provides definitions for numeric data types (int, float, num)
Package numeric provides definitions for numeric data types (int, float, num)
types/paths
Package paths provides definitions for the `path` and `paths` data types
Package paths provides definitions for the `path` and `paths` data types
types/querystring
Package string provides definitions for the `str` data type
Package string provides definitions for the `str` data type
types/sexp
Package sexp provides definitions for the S-Expression data types: `sexpr` and `csexp`
Package sexp provides definitions for the S-Expression data types: `sexpr` and `csexp`
types/string
Package string provides definitions for the `str` data type
Package string provides definitions for the `str` data type
types/toml
Package toml provides definitions for the `toml` data type
Package toml provides definitions for the `toml` data type
types/yaml
Package yaml provides definitions for the `yaml` data type
Package yaml provides definitions for the `yaml` data type
Package config provides APIs for managing the shell's runtime config
Package config provides APIs for managing the shell's runtime config
defaults
Package defaults defines the default state for many run time config
Package defaults defines the default state for many run time config
profile
Package profile is used to read the various non-default murex user profiles and modules
Package profile is used to read the various non-default murex user profiles and modules
Package debug provides debugging APIs
Package debug provides debugging APIs
Package integrations is a repository of autocompletes and other Murex tooling for 3rd party executables
Package integrations is a repository of autocompletes and other Murex tooling for 3rd party executables
Package lang provides the parser for the murex shell scripting language
Package lang provides the parser for the murex shell scripting language
parameters
Package parameters provides parsing for language command line parameters within murex
Package parameters provides parsing for language command line parameters within murex
pipes
Package pipes provides runtime information about murex named pipes
Package pipes provides runtime information about murex named pipes
ref
Package ref provides some reference structures required by multiple packages
Package ref provides some reference structures required by multiple packages
runmode
Package runmode provides constants used to describe the run mode of the murex interpreter
Package runmode provides constants used to describe the run mode of the murex interpreter
state
Package state provides constants used to describe the runtime state of murex functions
Package state provides constants used to describe the runtime state of murex functions
Package shell provides sources for the interactive shell
Package shell provides sources for the interactive shell
count
Package count is used to count the number of test cases run
Package count is used to count the number of test cases run
ansi
Package ansi provides APIs for writing common ANSI escape sequences to the terminal
Package ansi provides APIs for writing common ANSI escape sequences to the terminal
ansi/codes
Package codes provides common ANSI escape sequences as constants
Package codes provides common ANSI escape sequences as constants
ansititle
Package ansititle is a little function for writing to terminal emulators title bar
Package ansititle is a little function for writing to terminal emulators title bar
cd
Package cd changes the current working directory and updates the global working
Package cd changes the current working directory and updates the global working
cd/cache
Package cache preemptively walks the file system to provide faster autocompletion suggestions
Package cache preemptively walks the file system to provide faster autocompletion suggestions
consts
Package consts consolidates common values used throughout the source code
Package consts consolidates common values used throughout the source code
counter
Package counter provides a thread safe counter using mutexes
Package counter provides a thread safe counter using mutexes
dedup
Package dedup provides de-duplication routines
Package dedup provides de-duplication routines
docgen/api
Package docgen contains all the executing code of the docgen CLI but in API form
Package docgen contains all the executing code of the docgen CLI but in API form
envvars
Package envvars provides a more pleasant framework around Go's stdlibs for working with environmental variables
Package envvars provides a more pleasant framework around Go's stdlibs for working with environmental variables
escape
Package escape provides tools for escaping command line snippets of code
Package escape provides tools for escaping command line snippets of code
home
Package home is used to return the users home directory
Package home is used to return the users home directory
humannumbers
Package humannumbers is used to return human readable representations of numbers
Package humannumbers is used to return human readable representations of numbers
inject
Package inject is used to insert one string inside another
Package inject is used to insert one string inside another
json
Package json is a custom json parser with an aim to provide more descriptive errors when reading malformed json
Package json is a custom json parser with an aim to provide more descriptive errors when reading malformed json
lists
Package lists provides standard APIs for handling lists
Package lists provides standard APIs for handling lists
man
Package man is murex's man page parser to provide flag auto-complete suggestions
Package man is murex's man page parser to provide flag auto-complete suggestions
mxjson
Package mxjson is a custom json superset format used by some routines in murex
Package mxjson is a custom json superset format used by some routines in murex
parser
Package parser is a faster murex parser for real time context hints
Package parser is a faster murex parser for real time context hints
pathsplit
Package pathsplit is a standard API for splitting a path by the first character in the path
Package pathsplit is a standard API for splitting a path by the first character in the path
posix
Package posix is a quick helper function to determine if the running platform is POSIX or not
Package posix is a quick helper function to determine if the running platform is POSIX or not
readall
Package readall provides an alterative to ioutil.Readall but with support for context.Context
Package readall provides an alterative to ioutil.Readall but with support for context.Context
readline
Package readline is a pure-Go re-imagining of the UNIX readline API
Package readline is a pure-Go re-imagining of the UNIX readline API
spellcheck
Package spellcheck provides functions for spellchecking
Package spellcheck provides functions for spellchecking
spellcheck/userdictionary
Package userdictionary provides `config` hooks for the spellchecker user dictionary
Package userdictionary provides `config` hooks for the spellchecker user dictionary
virtualterm
Package virtualterm provides a virtual terminal and some terminal emulation functions
Package virtualterm provides a virtual terminal and some terminal emulation functions
wasmserver
Package main provides a web server for user acceptance testing of js/wasm builds
Package main provides a web server for user acceptance testing of js/wasm builds
which
Package which provides similar functionality to the UNIX command of the same name
Package which provides similar functionality to the UNIX command of the same name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL