Giter VIP home page Giter VIP logo

ideman-cli's Introduction

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": "[email protected]",
        "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]

cypher

Cyphers a text.

Example

$ ideman-cli cypher

decypher

Decyphers a text.

Example

$ ideman-cli decypher

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

ideman-cli's People

Contributors

thinkingmik avatar

Watchers

Peter deHaan avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.