Sink is a web development project management tool for the command line. The main things it does are:
- Sync files between servers.
- Sync databases between servers.
- Diffs between a local file and a remote file.
- Central storage (sink.yaml) for all website data; passwords, usernames, urls, etc.
- An API to access stored data from other scripts.
- Run a check on each server; urls, db, ssh.
By default when a command is run such as sink file put
, it outputs
only the commands that would be run. The user can then examine or
copy and paste the commands to modify them. If they look correct use
the --real
flag to run the command “for real”.
The commands displayed are the actual bash commands that are used. They are run using Python’s subprocess module.
It has been developed on Ubuntu and is untested on any other platform. The remote server must be Linux.
A project is defined by putting a sink.yaml file in the projects root dir.
Running sink init
will output to the console a basic config file. If
any arguments are passed they will become the names of servers. The
output can be redirected to a file.
sink misc init > sink.yaml
sink misc init dev stag prod > sink.yaml
Nothing is required except for the project name.
project:
name: "projectname"
The standard yaml structure is a project section and a servers section. There are many fields that can be added. Also extra fields can be added that sink doesn’t use but can be accessed via the API.
project:
name: "projectname"
servers:
dev:
root: /var/www
prod:
root: /var/www
git clone [email protected]:8cylinder/sink.git
poetry build
pip install ./dist/sink-<VERSION-NUMBER>-py3-none-any.whl
git clone [email protected]:8cylinder/sink.git
poetry shell
pip install --editable .