<commit_before>[![Build Status](https://travis-ci.org/tzmfreedom/spm.svg?branch=master)](https://travis-ci.org/tzmfreedom/spm)

# SPM

Salesforce Package Manager

## Install

Download binary file from [release page](https://github.com/tzmfreedom/spm/releases) and copy it to executable path.

If you want to use latest version, execute following command.

```bash
$ go get github.com/tzmfreedom/spm
```

## Usage

```
$ spm [global options] command [command options] [arguments...]

COMMANDS:
     install, i  Install salesforce packages on public remote repository(i.g. github)
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
```

### Install Package
```
$ spm install [command options] [arguments...]

OPTIONS:
   --username value, -u value   [$SF_USERNAME]
   --password value, -p value   [$SF_PASSWORD]
   --endpoint value, -e value  (default: "login.salesforce.com") [$SF_ENDPOINT]
   --apiversion value          (default: "38.0") [$SF_APIVERSION]
   --pollSeconds value         (default: 5) [$SF_POLLSECONDS]
   --timeoutSeconds value      (default: 0) [$SF_TIMEOUTSECONDS]
   --packages value, -P value
```

* Install package from remote repository

```bash
$ spm install github.com/{USER}/{REPOSITORY} -u {USERNAME} -p {PASSWORD}
```

* Install packages from package.yml
```bash
$ spm install -u {USERNAME} -p {PASSWORD} -P package.yml
```

package.yml format

```yaml
packages:
  - github.com/tzmfreedom/apex-util1
  - github.com/tzmfreedom/apex-util2
  - github.com/tzmfreedom/apex-util3
```

Sandbox

```bash
$ spm install github.com/{USER}/{REPOSITORY} -u {USERNAME} -p {PASSWORD} -e test.salesforce.com
```

## Contribute

Just send pull request if needed or fill an issue!

## License

The MIT License See [LICENSE](https://github.com/tzmfreedom/spm/blob/master/LICENSE) file.<commit_msg>Add README<commit_after>[![Build Status](https://travis-ci.org/tzmfreedom/spm.svg?branch=master)](https://travis-ci.org/tzmfreedom/spm)

# SPM

Salesforce Package Manager

## Install

Download binary file from [release page](https://github.com/tzmfreedom/spm/releases) and copy it to executable path.

If you want to use latest version, execute following command.

```bash
$ go get github.com/tzmfreedom/spm
```

## Usage

```
$ spm [global options] command [command options] [arguments...]

COMMANDS:
     install, i  Install salesforce packages on public remote repository(i.g. github)
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
```

### Install Package
```
$ spm install [command options] [arguments...]

OPTIONS:
   --username value, -u value   [$SF_USERNAME]
   --password value, -p value   [$SF_PASSWORD]
   --endpoint value, -e value  (default: "login.salesforce.com") [$SF_ENDPOINT]
   --apiversion value          (default: "38.0") [$SF_APIVERSION]
   --pollSeconds value         (default: 5) [$SF_POLLSECONDS]
   --timeoutSeconds value      (default: 0) [$SF_TIMEOUTSECONDS]
   --packages value, -P value
```

* Install package from remote repository

```bash
$ spm install github.com/{USER}/{REPOSITORY} -u {USERNAME} -p {PASSWORD}
```

* Install packages from package.yml
```bash
$ spm install -u {USERNAME} -p {PASSWORD} -P package.yml
```

package.yml format

```yaml
packages:
  - github.com/tzmfreedom/apex-util1
  - github.com/tzmfreedom/apex-util2
  - github.com/tzmfreedom/apex-util3
```

Sandbox

```bash
$ spm install github.com/{USER}/{REPOSITORY} -u {USERNAME} -p {PASSWORD} -e test.salesforce.com
```

## Download metadata from salesforce

```bash
$ spm clone -u {USERNAME} -p {PASSWORD} -P {PACKAGE_FILE}
```

### Package File Format

The package file format for downloading from salesforce is toml.

* example
```toml
version = 37.0

[[types]]
name = "ApexClass"
members = ["Hoge", "Fuga"]

[[types]]
name = "CustomObject"
members = ["Account", "Contact"]

[[types]]
name = "ApexPage"
members = ["HogePage"]

[[types]]
name = "ApexTrigger"
members = ["HogeTrigger"]

[[types]]
name = "Layout"
members = ["Task-Task Layout"]

[[types]]
name = "Profile"
members = ["Admin"]
```

## Contribute

Just send pull request if needed or fill an issue!

## License

The MIT License See [LICENSE](https://github.com/tzmfreedom/spm/blob/master/LICENSE) file.
{'fraction_non_alphanumeric': 0.14853747714808044, 'fraction_numerical': 0.004341864716636197, 'mean_word_length': 3.742145178764897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2507553', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1479, 'n_words': 425}