toolshed v0.2.10 Toolshed

Making the IEx console friendlier one command at a time

To use the helpers, run:

iex> use Toolshed

Add this to your .iex.exs to load automatically.

The following is a list of helpers:

  • cat/1 - print out a file
  • cmd/1 - run a system command and print the output
  • dmesg/0 - print kernel messages (Nerves-only)
  • exit/0 - exit out of an IEx session
  • fw_validate/0 - marks the current image as valid (check Nerves system if supported)
  • grep/2 - print out lines that match a regular expression
  • hex/1 - print a number as hex
  • hostname/0 - print our hostname
  • ifconfig/0 - print info on network interfaces
  • load_term!/2 - load a term that was saved by save_term/2
  • lsof/0 - print out open file handles by OS process
  • lsmod/0 - print out what kernel modules have been loaded (Nerves-only)
  • lsusb/0 - print info on USB devices
  • nslookup/1 - query DNS to find an IP address
  • pastebin/1 - post text to a pastebin server (requires networking)
  • ping/2 - ping a remote host (but use TCP instead of ICMP)
  • qr_encode/1 - create a QR code (requires networking)
  • reboot/0 - reboots gracefully (Nerves-only)
  • reboot!/0 - reboots immediately (Nerves-only)
  • save_value/2 - save a value to a file as Elixir terms (uses inspect)
  • save_term!/2 - save a term as a binary
  • top/2 - list out the top processes
  • tping/2 - check if a host can be reached (like ping, but uses TCP)
  • tree/1 - pretty print a directory tree
  • uptime/0 - print out the current Erlang VM uptime
  • uname/0 - print information about the running system (Nerves-only)
  • weather/0 - get the local weather (requires networking)

Link to this section Summary

Functions

Run a command and return the exit code. This function is intended to be run interactively.

Inspect a value with all integers printed out in hex. This is useful for one-off hex conversions. If you're doing a lot of work that requires hexadecimal output, you should consider running

Link to this section Functions

Run a command and return the exit code. This function is intended to be run interactively.

Inspect a value with all integers printed out in hex. This is useful for one-off hex conversions. If you're doing a lot of work that requires hexadecimal output, you should consider running:

IEx.configure(inspect: [base: :hex])

The drawback of doing the above is that strings print out as hex binaries.