Salesforce SOQL CLI like mysql, psql command
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
parser
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
evaluator.go
install.ps1
install.sh
main.go
main_test.go
statement_builder.go

README.md

Build Status

soql-cli

Salesforce SOQL cli tool

Installation

For Linux

$ curl -sL https://install.freedom-man.com/soql | bash

For Windows

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile ^
  -InputFormat None -ExecutionPolicy Bypass ^
  -Command "iex ((New-Object System.Net.WebClient).DownloadString('http://install.freedom-man.com/soql.ps1'))" ^
  && SET "PATH=%PATH%;%APPDATA%\land\bin"

For Powershell

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('http://install.freedom-man.com/soql.ps1'))

For Golang User

$ go get -u github.com/tzmfreedom/soql-cli

Usage

$ soql -u {USERNAME} -h {ENDPOINT} [-d] [-e {COMMMAND}] [-v]
option description alternative environment variable
-u specify salesforce username SALESFORCE_USERNAME
-d dryrun mode(no write, read only)
-h hostname (e.g. test.salesforce.com) SALESFORCE_ENDPOINT
-e specify command(batch mode, no interactive)
-v print version

Select Query

>> SELECT Id, Name FROM Account WHERE Name = 'foo'

Insert

>> INSERT INTO Account(Name, Website) VALUES ("foo", "https://github.com/tzmfreedom/soql-cli")

Update

>> UPDATE Account SET Name = 'foo', Website = 'https://github.com/tzmfreedom/soql-cli'

Delete

>> DELETE FROM Account WHERE Name = 'foo'

Exit console

>> exit # or quit

Batch mode

$ soql -e "SELECT * FROM Account"

DryRun mode

$ soql -d -e "INSERT INTO Account(Name) VALUES ("foo");
> no change database

Contribute

Just send pull request if needed or fill an issue!

License

The MIT License See LICENSE file.