New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ideman-cli

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ideman-cli

Node command line tool to automate database creation

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Identity Manager Command Line Interface Tool

Tool for creation of database schemas and others boring jobs usefull for ideman and ideman-acl node modules. It supports postgres, mysql, mariasql and sqlite3.

Summary

Installation

In your project root run from command line:

$ npm install -g ideman-cli

Usage

ideman-cli provides a set of interactive commands that can be used from command line:

$ ideman-cli <command> [arguments]

The availables commands are:

config

Initializes a configuration for database connection.

Example

$ ideman-cli config

tables

Initializes tables names.

Example

$ ideman-cli tables

reset

Resets all configurations to default.

Example

$ ideman-cli reset

list [env]

Shows a JSON object with current configurations.

Example

$ ideman-cli list [development|production]

env

Shows the current environment.

Example

$ ideman-cli env

switch

Switches environment.

Example

$ ideman-cli switch

init [application] [force]

Initializes database schemas for specified application. If force was specified, tables will be dropped. If application was not specified, it takes the application value set into configuration.

Example

$ ideman-cli init [ideman|ideman-acl] [force]

insert [entity]

Inserts a new entity into database.

Example

$ ideman-cli insert [user|client|token|code|role|userRole|permission|resource|policy]

delete [entity]

Removes an existing entity from database.

Example

$ ideman-cli delete [user|client|token|code|role|userRole|permission|resource|policy]

import [filename]

Import entities from a JSON file. File to import must be in this format:

{
  "data": [
    {
      "entity": "user",
      "columns": {
        "username": "admin",
        "password": "$2a$05$Sbvj/0fQB/H/GaQZJg88iOP/ppZXTEtwCEF1Iff0hCt1t/PcJIfDa",
        "email": "admin@node.com",
        "firstName": "super",
        "lastName": "administrator"
      },
      "returning": "id"
    },
    {
      "entity": "client",
      "columns": {
        "name": "dashboard",
        "secret": "a1l4PsbkgQHgZzaN1lFQSw==",
        "description": "the dashboard client application",
        "domain": "localhost"
      },
      "returning": "id"
    }
  ]
}

Example

$ ideman-cli import [path]

cipher

Ciphers a text.

Example

$ ideman-cli cipher

decipher

Deciphers a text.

Example

$ ideman-cli decipher

crypt

Crypts a text.

Example

$ ideman-cli crypt

Credits

  • knex by Tim Griesser

License

The MIT License

Copyright (c) 2016 Michele Andreoli http://thinkingmik.com

Keywords

FAQs

Package last updated on 15 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc