UNPKG

@fewer/cli

Version:

The CLI to scaffold and perform operations for Fewer.

1 lines 3.8 kB
{"version":"0.1.7","commands":{"init":{"id":"init","description":"Initializes fewer into an existing project.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"db":{"id":"db","description":"Used to perform database operations, and generate the schema.","usage":"db --help","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"examples":["$ fewer db:migrate --help","$ fewer db:schema --help"],"flags":{},"args":[]},"db:migrate":{"id":"db:migrate","description":"Performs migrations.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"examples":["$ fewer db:migrate","$ fewer db:migrate --version 20190121190432","$ fewer db:migrate --direction down --version 20190121190432","$ fewer db:migrate --rollback","$ fewer db:migrate --rollback --steps 3","$ fewer db:migrate --redo --steps 3"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"Runs a specific migration that matches the version."},"rollback":{"name":"rollback","type":"boolean","description":"Rolls back the previous migration.","allowNo":false},"redo":{"name":"redo","type":"boolean","description":"Roll back a number of migrations, then perform them again.","allowNo":false},"steps":{"name":"steps","type":"option","description":"Sets the number of migrations to rollback, or redo."},"direction":{"name":"direction","type":"option","description":"Runs a specific migration in the provided direction.","options":["up","down"]}},"args":[]},"db:schema":{"id":"db:schema","description":"Re-generates the schema file based on the current state of the database.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"offline":{"name":"offline","type":"boolean","description":"","allowNo":false}},"args":[]},"generate:database":{"id":"generate:database","description":"Generates a new database file.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"examples":["$ fewer generate:database myDatabase","$ fewer generate:database myDatabase --adapter=mysql"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"adapter":{"name":"adapter","type":"option","char":"v","description":"The Database adapter to generate use with the database. The CLI will attempt to install the adapter before creating the file.","required":true,"options":["postgres"],"default":"postgres"}},"args":[{"name":"name","description":"The name of the file for the database that will be created.","required":true}]},"generate":{"id":"generate","description":"Used to scaffold new databases, migrations, and repositories into existing Fewer projects.","usage":"generate --help","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"examples":["$ fewer generate:database --help","$ fewer generate:repository --help","$ fewer generate:migration --help"],"flags":{},"args":[]},"generate:migration":{"id":"generate:migration","description":"Generates a migration that can be run.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"name","description":"The name of the migration that will be generated.","required":true}]},"generate:repository":{"id":"generate:repository","description":"Generates a new repository.","pluginName":"@fewer/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]}}}