Skip to content

Commit

Permalink
feat: add release workflow & update README
Browse files Browse the repository at this point in the history
  • Loading branch information
japelsin committed Feb 25, 2024
1 parent 2b96353 commit 905f3c7
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 15 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# https://goreleaser.com/ci/actions/?h=github+ac#workflow
name: goreleaser

on:
pull_request:
push:
tags:
- "*"

permissions:
contents: write
packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/dist
dist/
45 changes: 45 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 1

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

brews:
-
name: pplx
homepage: "https://github.com/japelsin/pplx"
repository:
owner: japelsin
name: homebrew-tap
commit_author:
name: japelsin

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Perplexity CLI
#

CLI for interfacing with [Perplexity](https://www.perplexity.ai/)'s API. Can also be used as a chatbot.

Expand All @@ -9,15 +8,23 @@ CLI for interfacing with [Perplexity](https://www.perplexity.ai/)'s API. Can als

## Installation

### With Homebrew

If you're using [Homebrew](https://brew.sh/):

```bash
brew install japelsin/tap/pplx
```

### From source

If you have [go](https://go.dev/) installed run:
If you have [go](https://go.dev/) installed:

```bash
go install github.com/japelsin/pplx@latest
```

Otherwise grab the appropriate executable from releases.
Otherwise you could grab the appropriate executable from releases.

## Usage

Expand All @@ -38,22 +45,24 @@ Flags:
-P, --top_p int Nucleus sampling. Probability cutoff for token selection, lower values result in higher probability tokens being used. Between 0 and 1.
```

### Set config
### Config

Configure `pplx`.

```
Usage:
pplx config set [command]
pplx config [command]
Available Commands:
additional_instructions Set additional instructions to include at the end of each query
api_key Set API key
model Set model
path Get configuration file path
reset Reset config
set Set config value
```

#### Additional instructions
#### Config values

Additional instructions appended to search queries. If you intend to use `pplx` as a search engine it's recommended to instruct it to always provide its sources.
- **Additional instructions**: Instructions appended to queries. If you intend to use `pplx` as a search engine it's recommended to instruct it to always provide its sources.

#### Model
- **Model**: Available models are: `pplx-7b-chat`, `pplx-70b-chat`, `pplx-7b-online`, `pplx-70b-online`, `llama-2-70b-chat`, `codellama-34b-instruct`, `codellama-70b-instruct`, `mistral-7b-instruct`, and `mixtral-8x7b-instruct`.

Available models are: `pplx-7b-chat`, `pplx-70b-chat`, `pplx-7b-online`, `pplx-70b-online`, `llama-2-70b-chat`, `codellama-34b-instruct`, `codellama-70b-instruct`, `mistral-7b-instruct`, and `mixtral-8x7b-instruct`.
- **API Key**: Self explanatory
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ require (
)

retract (
v0.1.1
v0.1.0
v0.1.1 // Old repo
v0.1.0 // Old repo
)

0 comments on commit 905f3c7

Please sign in to comment.