Alchemist helps you create, manage and work with your projects, easy to configure and fast to use anywhere, configuration is portable.
- i want reinstall and after that i want immediately again work on projects (see link below)
- i have repositories which i want install to someone (e.g. newbie in company)
- i want to have overview over my all projects (uncommited changes etc.)
- i want download all github projects associated with username (for private repositories is token required)
alchemist load-github-sources ldrahnik --token "XY" --save # save token to config.local.neon for next usage
Elementary OS Loki Ubuntu 16.04 - post installation script
Check composer.json for dependencies.
Install alchemist manually:
$ git clone git@github.com:alchemist-org/alchemist.git <alchemist/location>
$ cd <alchemist/location>
$ composer install
or using alchemist-setup.php
located in root of repository:
$ php alchemist-setup.php --install-dir=/usr/local/bin [--filename=[default='alchemist']] [--force]
Will be installed in path /usr/local/bin/alchemist/<repository>
so path for alias is in this case /usr/local/bin/alchemist/bin/alchemist.php
.
sudo ln -sf /home/ldrahnik/projects/alchemist/bin/alchemist.php /usr/local/bin/alchemist
Or make temporary or permanent global alias (on Linux put the row to the ~.bash_aliases or directly ~.bashrc file):
$ alias alchemist='php <alchemist/location>/bin/alchemist.php'
For <alchemist/location>
you can later use command $ alchemist which
.
Minimum set up is create config.local.neon
. Then for for example:
parameters:
projects-dir: default
hosts: /etc/hosts
tld: dev
localhost: 127.0.0.1
nginx-sites-enabled: /etc/nginx/sites-enabled
nginx-virtual-host-default: <alchemist-location>/data/virtual-hosts/nginx.default
apache-sites-enabled: /etc/apache2/sites-enabled
apache-virtual-host-default: <alchemist-location>/data/virtual-hosts/apache.default
port: 80
root: www
name: 'Lukáš Drahník'
email: ldrahnik@gmail.com
core:
sources:
github:
ldrahnik:
token: XY
source-types:
git:
- 'git clone --depth=50 <value> <project-dir>' # --depth=50 is not included by default
projects-dirs:
nginx:
path: /usr/share/nginx
template: nginx
apache:
path: /var/www
template: apache
default:
path: /home/ldrahnik/projects
template: default
You can set up your distant sources block from already existing projects with command alchemist load-projects-dirs
.
Create template, in default you can set up these blocks:
before_create:
after_create:
before_remove:
after_remove:
touch:
save:
suppress:
Display command list:
alchemist list
$ alchemist self-update
$ alchemist create <name> [-t|--template <name>] [-d|--projects-dir <dir>] [--type <type>] [--value <value>] [-f|--force] [-s|--save]
Name | Explanation |
---|---|
name | Project name |
--template | Template name or names |
--projects-dir | Projects dir |
--type | Type, e.g. git, composer.. |
--value | Value, e.g. url, package-name.. |
--force | Re-create already existing project |
--save | Save change to distant sources |
$ alchemist remove <name> [-s|--save] [-d|--projects-dir <dir>]
Name | Comment |
---|---|
name | Project name |
save | Save change to distant sources |
project-dir | Projects dir |
$ alchemist install [-f|--force] [--s|suppress]
Name | Comment |
---|---|
Name | Project name |
force | Re-create already existing projects |
suppress | Suppress re-create already existing projects |
$ alchemist touch [<name>]
Name | Comment |
---|---|
name | Project name |
Find path for given projects dirs name in project dirs
block or add new with name basename(given path)
if for that path not exists already. All projects reached on project-dirs
destinations are automatically saved to distant sources
.
$ alchemist load-projects-dirs [--name <projects-dir-name>] [--path <projets-dir-path>] [--template <name|names>]
$ alchemist load-github-sources <username> [--token] [-t|--template] [--d|--projects-dir] [-i|--install] [-f|--force] [--s|suppress] [--save]
Name | Comment |
---|---|
username | Github username |
--token | Github token (allow load private repositories |
--template | Template name or names |
--projects-dir | Projects dir |
--install | Not only save projects to config but even install |
--force | Re-create already existing projects |
--suppress | Suppress re-create already existing projects |
--save | Save given github username, token to config |
$ alchemist which