A collection of CLI commands to simplify workflow at Team Opti, working with Optimizely.
- Optimized Commands: Predefined commands tailored for Team Optimizely workflows.
- Test Environment: A
testenvfolder (ignored by version control) where you can replicate an Optimizely environment to test the tool safely. - Extensible: Built with Commander.js, making it easy to add and customize commands.
Some scripts require dotnet to run:
Clone the repository and install dependencies:
git clone [email protected]:bouvet/opti-cli.git
cd opti-cli
npm install
npm run cli:installIn terminal, run opti followed by command.
| Command | Description | Options |
|---|---|---|
opti db |
Configure project's connection string, create docker-compose.yml, and import .bacpac files. |
-p, --port <port>: Specify the port for the database (default 1433:1433). |
-n, --name <name>: Specify the name of the database container (default sqledge-<port>). |
||
-k, --kill: Kill the entire container stack and related database. |
||
opti db up |
Start the database container stack in detached mode using docker compose up. |
N/A |
opti db down |
Stop the database container stack using docker compose down. |
N/A |
opti db import |
Import a .bacpac file, destroying the existing database and re-importing it. |
N/A |
opti sqlpackage |
Install sqlpackage with dotnet cli and add it to path | --uninstall: Uninstalls sqlpackage |
opti watch |
Starts dotnet watch with the ability to choose which launch profile to run. |
N/A |
To exit excecution early, use the global quit() function. This is the same as using process.exit.
Adding a command can be done with this snippet which generates a new one from a template.
npm run commands:add <name of command>