The Lumberjacks' toolbelt is the Forest Admin CLI which makes easy to manage your back office application directly from the terminal.
$ npm install -g forest-cli
$ forest [command]
userdisplay the current logged in user.loginsign in to your Forest Admin account.logoutsign out of your Forest Admin account.help [cmd]display help for [cmd].
Manage Forest Admin projects.
projectslist your projects.projects:create <appName>generate a backend application with an ORM/ODM configured.projects:getget the configuration of a project.
Manage Forest Admin environments.
environmentslist your environments.environments:getget the configuration of an environment.environments:createcreate a new environment.environments:deletedelete an environment.
Without the Development Workflow experience.
environments:copy-layoutcopy the layout from one environment to another.
With the Development Workflow activated.
initset up your development environment in your current folder.branchcreate a new branch or list your existing branches.switchswitch to another branch in your local development environment.pushpush layout changes of your current branch to a remote environment.deploydeploy layout changes of an environment to the reference one.environments:resetreset a remote environment by removing all layout changes.
Manage Forest Admin schema.
schema:applyapply the current schema of your repository to the specified environment (using your.forestadmin-schema.jsonfile).schema:diffallow to compare two environment schemas.schema:updaterefresh your schema by generating files that do not currently exist.
DATABASE_SCHEMAthe schema used by the database. (not for all commands)DATABASE_URLthe connection string. (not fot all commands)FOREST_ENV_SECRETthe env secret token used to access your Forest Admin environment.SILENTused to not log commands results. (optional)TOKEN_PATHpath where store the session token. (need to be "/usr/src/cli" to work with the docker image)
If you have an .env file in you current folder docker should take it to run commands. So you can define the missing ENV variable inside.
Otherwise you should pass all env variable you need in the docker run command, eg: -e TOKEN_PATH="/usr/src/app".
TOKEN_PATH="/usr/src/cli"
docker run --rm --init -it -v `pwd`:/usr/src/app -v ~/.forest.d:/usr/src/cli/.forest.d -e TOKEN_PATH="/usr/src/cli" forestadmin/toolbelt:latest [command]π Join our Developers community for support and more