A simple REPL based command line tool for accessing the Wish Core.
This package is dependent on the wish-core-api package, which currently is working with Linux x64/ia32, OSX x64, on nodejs v6.x only. To get it working you also need to run a Wish Core on the same host.
Linux x64 and OSX x64 are currently supported. Windows binaries are not yet available.
Download and install node.js v6.x: https://nodejs.org/dist/latest-v6.x/. You may use Node Version Manager nvm (https://github.com/creationix/nvm).
You will need to have an appropriate wish-core (the peer-to-peer identity based communication layer mist is based on). The source is available at: https://github.com/ControlThings/wish-c99.
npm install -g wish-cliwish-cliYou should be greeted with something like this:
Welcome to Wish CLI vX.Y.Z
Connected to Wish Core v0.8.0-beta-2
wish> There is a primitive directory implementation for publishing, finding and befriending identities.
directory.find(search: string): [DirectoryEntry]
directory.publish(uid: Buffer(32))
directory.friendRequest(uid: Buffer(32), entry: DirectoryEntry)
Wish Cli reads the available API from the core it connects to using the methods request. It is partially self documenting and can be enumerated using the help() command.
All commands have the form some.command(arg1, arg2, argn, callback?: (err, data) => {}), where callback is optional. If no callback is given the answer will be stored in the global variable result.
Example command sequence:
identity.create('John Doe')
uid = result.uid // store uid for later use
directory.publish(uid)
direcotry.find('My Friend') // will print result, if any
directory.friendRequest(result[7])Create an identity with wish-cli
identity.create('John Andersson')identity.list(): [Identity]identity.remove(uid: Buffer(32)): booleanUpdate identity alias or meta data
identity.update(uid, { alias: 'John Doe' });identity.update(uid, { telephone: '+358 80 123 1234', BCH: '1kdshfvnksdvjhnfsdkjfvnhsklf', dateOfBirth: '1982-05-05' });Delete meta data. With an exception with alias which cannot be deleted.
identity.update(uid, { dateOfBirth: null, telephone: null });CORE=9090 # connect to core on localhost at port 9090, default is 9094