# init

*Args | text-editor: String

Synix needs to be initialized before it's used. It also uses a default text-editor for opening files and folders

# Text Editors supported:

  1. Visual Studio Code (code)[recomended]
  2. Sublime Text 3 (subl)
  3. Atom (atom)

# To initialize use init command:

$ sx init code
# or sx init subl
# or sx init atom

# ls

Lists the contents of the present working directory along with the hidden one, only . and .. are not printed cause it's obvious they exists.

$ sx ls # lists the contents

# pwd

Prints the present working directory path in the terminal/cmd.

$ sx ls # lists the contents

# cat

*Args | filename: String

This command helps to view the file in the terminal/cmd

$ sx cat app.js 
# prints the contents of app.js onto terminal

# cp

*Args | copy-from-filename: String | copy-to-filename: String

This command trnasfers the file contents from one file to another

$ sx cp cp-from.js cp-to.js
# copies contents from `cp-from.js` to `cp-to.js`

# mv

*Args | copy-from-filename: String | copy-to-filename: String

This command moves the file and if the other one dose'nt exits it will create it for you
This command can also be used to rename a file

$ sx mv mv-from.js mv-to.js
# `mv-from.js` would be converted to `mv-to.js`

# touch

*Args | name of the file: String

This commands creates the file with the specified name in the current working directory

$ sx touch awesome.js
# the file `awesome.js` would be created

# mkdir

*Args | name of the folder/directory: String

This commands creates a directory/folder with that specified name

$ sx mkdir desk
# creates `desk` folder

# mkpro

*Args | name of the folder/directory: String

This commands creates a directory/folder with that specified name and opens it in your text-editor as a project.
This text-editor is the same text-editor with which you initialized synix running init command

$ sx mkdir my-project
# creates `my-project` folder and opens in the text-editor as a project

# open

*Args | name of the folder/directory: String

This commands opens the specfied folder/directory in your text-editor as a project

$ sx open pro1
# opens `pro1` as a project in your text-editor

$ sx open pro1 pro2
# opens `pro2` folder which is inside `pro1` folder as a project in your text-editor

# rm

*Args | name of the folder/directory or filename: String

This commands removes the directory or the file specified

$ sx ls
.git
a
b
app,js
$ sx rm app.js
# app.js will be deleted
$ sx rm a
# folder a will be deleted

# clone

You need to have git installed to run this command

*Args | url to clone from fork: String | url to set the upstream: String
*Optional Args | name of the upstream: String

This command clones the repository and sets the upstream variable for you
If the name of the upstream is given then it replaces it with that specified name

$ sx clone https://fork/url.git https://upstream/url.git
# clones and sets the `origin` and `upstream` remote variables

$ git remote
origin # set to https://fork/url.git
upstream # set to https://upstream/url.git

$ sx clone https://fork/url.git https://upstream/url.git project 
# if optinal parameter is passed

$ git remote
origin # set to https://fork/url.git
project # set to https://upstream/url.git

# sync

You need to have git installed to run this command

*Args | upstream branch name: String | origin branch name: String

This command syncs the upstream repository with local and the local repository with origin and keeps all the three in sync

The upstream variable must be set as upstream to run this command

$ sx sync
# This will sync the master of upstream,local,origin repositories

$ sx sync develop
# This will sync the develop branch of upstream with the master of local and origin

$ sx sync up-branch or-branch
# This will sync the `up-branch` branch of upstream
# with the `or-branch` of origin and your local branch

# des,doc and dow

These are three handy commands which will help you in opening desktop,documents and downloads from your command-line

$ sx des
# opens desktop in file-manager

$ sx doc
# opens documents in file-manager

$ sx dow
# opens downloads in file-manager

# help

This command helps you 😄

$ sx help

# Other sections

Also check the customize to get a better understanding of the tool and how to add your own commands and for contributors we have a dedicated section here