CLI Guide
Installation
To install the Baseshift CLI, run:
pip install baseshift
To upgrade the Baseshift CLI, run:
pip install --upgrade baseshift
Running Commands
Below are some common commands you can run with the Baseshift CLI:
1. Login
To use the Baseshift CLI, you must first authenticate. Run:
baseshift auth login
This command will open your browser so you can log in and approve access. If the browser does not open automatically, copy the URL printed in the terminal and open it manually.
Once the login is approved, you can continue working with the CLI normally.
2. Create a profile (optional)
Profiles store your default organization token and Dub UUID for easy access. To create a profile, run:
baseshift init
You'll be prompted to enter your org_id and dub_id.
3. Create a Snapshot
baseshift snapshot [--dubUuid <DUBUUID>]
Creates a new snapshot for the specified Dub.
Optional flags:
--dubUuid - Defaults to the value in your active profile if not provided.
--orgToken - Defaults to the value in your active profile if not provided.
4. Start a Clone
baseshift clone start [--dubUuid <DUBUUID>] [-i]
Launches a new server clone on the replication server and returns the connection details.
Optional flags:
--dubUuid - Defaults to the value in your active profile if not provided.
--orgToken - Defaults to the value in your active profile if not provided.
-i - Starts the clone in interactive mode.
5. Stop a Clone
baseshift clone stop [--cloneUuid <CLONEUUID>]
Stops a clone. By default, it stops the last running clone.
Optional flags:
--cloneUuid - The UUID of the clone to stop.
6. Getting Help
To see all available commands and options, run:
baseshift -h