Skip to content

Ninroot/nacre

Repository files navigation

Nacre

version-beta

Nacre is an intuitive shell designed for those who prefer to work with objects over text. Want to give it a try?

Builtins at your fingertips

Navigate smoothly with preview, completion and your favorits builtins: ls, cd, chmod, chown, stat, grep, and more.

builtins_black

Automatic module loading

The auto-require mechanism imports your modules when you need it. Explicit import can also be done with require().

import_back

Installation

Nacre relies on NodeJS version 18, so you must have it installed on your system. Follow their installation instructions. Once this is done, install it using:

npm install -g nacre

More details about the installation.

Example

An example is better than a long speech:

> ls()
[ 'foo' ]

> touch('bar')
'bar'

> ls()
[ 'bar', 'foo' ]
  
// inspect foo's permissions
> chmod('foo')
{
  user: { read: true, write: true, execute: false },
  group: { read: true, write: false, execute: false },
  others: { read: true, write: false, execute: false }
}

> chmod.add.execute.user('foo')
{
  user: { read: true, write: true, execute: true },
  group: { read: true, write: false, execute: false },
  others: { read: true, write: false, execute: false }
}

> const perm = chmod('foo')

// inspect the value of perm variable
> perm
{
  user: { read: true, write: true, execute: true },
  group: { read: true, write: false, execute: false },
  others: { read: true, write: false, execute: false }
}

// give bar the same permissions as foo 
> chmod.set('bar', perm)
{
  user: { read: true, write: true, execute: true },
  group: { read: true, write: false, execute: false },
  others: { read: true, write: true, execute: false }
}

Available commands

See the documentation.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.