interreality.org [VOS]
[Home][About]
[Screenshots][Download]
[News][Community]
[Documentation][Manual]
[Bugs & Requests][Wiki]

2.4. Mesh (Metaverse Shell)

2.4.1. Overview

Mesh is a command-line client for browsing and editing vobject structures. It is modeled after Unix command line shells and features line editing, command history and tab completion using the GNU readline library. It is intended to be useful for inspecting and interacting with Vobjects of any type. It is extensible through the use of plugin modules.

Mesh takes the following optional command line arguments:

Table 2-8. Command line options for Mesh

OptionConfig File SettingDescription
URL   A 'vop:' URL to start at (default is local site).
-c file--config file Load a config file file (may be repeated).
-m file--load-module fileLoadModule fileLoad a plugin module from file (may be repeated).
-a name--avatar nameAvatar nameUse an avatar, in order to send and recieve talk messages, named name
-s--servicedirServicedirLocate local services
-e "commands"--exec "commands"Exec "commands"Execute command and go into interactive mode.
-x--exitExit Exit after running commands specified by -e or --exec.
-L file--log-file fileLogFile fileSet log file.
-l level--log-level levelLogLevel levelSet log threshold level.
-q--quietQuiet Only output error messages.
-h--help  Print out command line options and exit. Use after a -m or --load-module option to see options understood by that module.

The first URL specified on the command line will be current object when the shell starts. If no URL is supplied, then Mesh will start at it's local site.

If support was compiled in, Mesh can use the "readline" library to interactively read command input. If you have customized your readline config, it should be fully supported in Mesh. For full readline documentation, including key bindings for cursor movement and history searching, consult your readline info page or manual. Some of the most useful keys are: Tab to attempt to automatically complete a Vobject URL in-line (aka tab completion); Control+A to go to the beginning of the line; Control+E to go to the end of the line; Control+L to clear the screen; Control+P or Up Arrow go to the previous line in the command history; Control+N or Down Arrow go to the next line in the command history; Control+R lets you search the command history.

2.4.2. Command list

Mesh understands the following commands. You may separate multiple commands on one line by separating them with a semicolon (;). Normally all text following percent sign (%) is considered a "comment" and is ignored. To include a literal hash mark in your input, you must quote it with a slash (\%). A command starting with a single or double quote mark (', ") is interpreted as a talk command (see msg) if the -a or --avatar command line options were used. A command starting with an "at" sign (@) is also special: the word following the @ is interpreted as a child object to use as the 'current object' while executing the rest of the text as a command.

Browsing commands: cd, ls, parents, popd, pushd, sites, types, urls, walk

Object manipulation commands: addtype, removetype, create, createlocal, insert, move, reorder, load, save

Access control and authentication commands: acls, acladd, aclrm, delacl, setdefaultpolicy, availpolicies, checkpolicy, defaultpolicy, passwordauth, setpassword, identities,

Property commands ("property" may be abbreviated "prop"): property help, property read, property replace, property write, property length, property type, property edit, property set, property add property settype,

Other features: daemonize, loadmodule, echo, exit, help, listen, logfile, meshscript, msg, save, load, listcod, set, setlog,

acladd policy [identity]

Add an identity or group object (where identity is the name or URL of that identity or group object) to the given ACL policy on the current object. If no identity or group is specified, then your current idenity on the current object's site is used. If the policy does not exist, then a new ACL is created.

See also: aclrm, acls, identities

aclrm policy [identity]

Remove an identity or group from the supplied ACL on the current object. (second parameter is optional, defaults to our identity on this site).

See also: acladd, acls, identities

acls

List the ACLs (Access Control Lists) for the current object

addtype type

Add the supplied type string to the current object. Note: this adds the type string but will not extend the functionality of the object.

See also: removetype

availpolicies domain

List available policies on the current object for some domain. (The domain is identified in a policy by it's colon-seperated prefix: e.g. "property" for the policy "property:read-only").

cd newobject

Change the current object

Aliases: go

See also: pushd, popd urls

checkpolicy domain [identity]

Check what access control policy(s) will be applied by the current object in some policy domain with the given identity or group object (second parameter is optional, defaults to our identity on this site)

create [-n] name [types...]

Create a new object on the current object's site with the given name and zero or more types, and insert it as a child of the current object. If -n is not given, then the current object will be changed to the new object.

See also: insert createlocal remove

createlocal [-n] name [types...]

Create a new object on mesh's local site with the given name and zero or more types, and insert it as a child of the current object. If -n is not given, then the current object will be changed to the new object.

See also: insert create remove

daemonize

Make mesh a non-interactive background process

Aliases: bg

See also: logfile, exit

defaultpolicy domain

Print out current default policy for some domain on current object

delacl acl

Delete an ACL (policy lisst) from the current object

echo text

Print text to standard output, followed by a newline.

exit

Exit the program

Aliases: quit, Control+D

See also: daemonize

help

Print a list of available commands.

Aliases: h, ?

identities

List current identity on each site.

insert name obj

Insert object as a new child of the current object with the given name.

See also: create

listcod file

list the contents of a COD file

listen [-r]

Causes mesh to become a listener of the parents and children of the current object, and of the property if it's a property object. If -r is given, then recurse into children (Warning: no check for loops in the object graph is made at this time!)

load file

Load COD file file and insert objects under the current object. file may be a plain COD file or compressed with gzip.

See also: save listcod

loadmodule pluginfile

Load Mesh plugin module from file pluginfile.

logfile filename

Redirect logging to specified output file

See also: setlog

ls

List children of current object

Aliases: dir, look

meshscript scriptfile

Run the supplied mesh script file

Aliases: ms

move child to

Move child elsewhere. The to parameter should include new name or end with '/' to keep current name.

Aliases: mv

msg user message

Send message to a user (or any "talkative" object). This command is only available when you run mesh with the "-a" command-line options.

Variations: you can send a public message to all users in the current object with a single quote (') at the beginning of the line, and a reply to the last message sent to you with a double quote (") at the beginning of the line.

parents

List all parents of the current object

passwordauth

Set identity for current site to current object using password authentication

popd

Go to object on top of the history stack

Aliases: back

See also: cd, pushd, urls

property help

Display property commands.

property read

If current object is a property, print value and type.

property replace value type

If current object is a property, set new value and type.

property write value

If current object is a property, overwrite it's value with new data, starting at byte 0.

property lengpth

If current object is a property, get the length (bytes) of its value.

property type

If current object is a property, get its datatype.

property edit

If current object is a property, edit its value. Use "set editor program" to set your text editing program.

property set name value type

Set the value and type of a property child (subproperty) on the current object (creating a new property object if neccesary).

property add name value type

If an object named name does not exist as a child of the current object, create a new property child and set its value and type.

property settype newtype

Change the datatype identifier of the current property object

pushd newobject

Change current object, pushing previous object to the history stack

See also: cd, popd, urls

remove child

Remove the given child link from the current object

removetype type

remove the supplied type string from the current object.

reorder oldpos newpos

Move a child to a different position

save file

Save the current object and children as a COD file named file.

See also: load

set setting value

Change internal mesh settings. Run "set help" for more information.

setlog channel level

Change log level of a particular channel

See also: logfile

setdefaultpolicy policy

Set default access control policy on the current object.

See also: defaultpolicy, acls

setpassword

Set password on current object (it must be an identity object)

See also: passwordauth

sites

List all the presently known sites

types

List the type strings of the current object

urls

List all the known valid paths to the current object

Aliases: pwd

walk

Print out every path descending from the current object

2.4.3. Writing a Mesh plugin

Mesh can load plugins in a similar way as OmniVOS, and also provides an extra API for your plugin to add new commands to Mesh. For details, see the Mesh source code for examples.