$ npm install raven-shell -g
...
$ raven
RavenDB shell
> .store
Using datastore at: http://localhost:8080
> .store http://someravendb.myorg.com:8080
Using datastore at: http://someravendb.myorg.com:8080
> .count Albums
246
> .docs Users
[ { firstName: 'Johnny',
'@metadata':
{ 'Raven-Entity-Name': 'Users',
'@id': '1e0c2a96-2d3e-4fb9-89be-b138e8404e95',
'Temp-Index-Score': 4.951243877410889,
'Last-Modified': '2012-05-12T17:56:41.8740000',
'@etag': '00000000-0000-0800-0000-000000000008',
'Non-Authoritative-Information': false } },
{ id: 'users/frank',
firstName: 'Frank',
lastName: 'Jenkins',
'@metadata':
{ 'Raven-Entity-Name': 'Users',
'@id': 'users/frank',
'Temp-Index-Score': 4.951243877410889,
'Last-Modified': '2012-05-12T21:06:41.5600000',
'@etag': '00000000-0000-0800-0000-00000000000a',
'Non-Authoritative-Information': false } },
{ id: 'users/leeroy',
firstName: 'Leeroy',
'@metadata':
{ 'Raven-Entity-Name': 'Users',
'@id': 'users/leeroy',
'Temp-Index-Score': 4.951243877410889,
'Last-Modified': '2012-05-12T22:44:54.7630000',
'@etag': '00000000-0000-0800-0000-00000000000c',
'Non-Authoritative-Information': false } } ]
> .count Users
3
> .create Users { id: 'users/mamma', firstName: 'Mamma', lastName: 'Jenkins'}
{ Key: 'users/mamma',
ETag: '00000000-0000-0900-0000-000000000002' }
>_.Key
'users/mamma'
> .find {firstName: 'Leeroy'}
[ { id: 'users/leeroy',
firstName: 'Leeroy',
'@metadata':
{ 'Raven-Entity-Name': 'Users',
'@id': 'users/leeroy',
'Temp-Index-Score': 4.951243877410889,
'Last-Modified': '2012-05-12T22:44:54.7630000',
'@etag': '00000000-0000-0800-0000-00000000000c',
'Non-Authoritative-Information': false } } ]
> var leeroy = _[0]
undefined
> leeroy
{ id: 'users/leeroy',
firstName: 'Leeroy',
'@metadata':
{ 'Raven-Entity-Name': 'Users',
'@id': 'users/leeroy',
'Temp-Index-Score': 4.951243877410889,
'Last-Modified': '2012-05-12T22:44:54.7630000',
'@etag': '00000000-0000-0800-0000-00000000000c',
'Non-Authoritative-Information': false } }
> .read users/mamma
{ id: 'users/mamma',
firstName: 'Mamma',
lastName: 'Jenkins' }
> .delete users/mamma
> .read users/mamma
[Error: Error: 404 - ]
> .exit
$