Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz authored Jun 16, 2024
1 parent 27d426d commit b6ea8ab
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Installation

By default the CLI will follow the [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) specification
and use `$XDG_CONFIG_HOME` for configuration files.

If the path does not yet exist you can start by creating a `prompt` directory in your configuration path.
For example:
```sh
mkdir -p ~/.config/prompt
cd ~/.config/prompt
```

You can then create a new `config.hs` file, which will be the entrypoint of your configuration.
```hs
import Prompt

main = do
run
[ currentDirectoryModule,
gitBranchModule
]
```

### Cloning from source
In your `prompt` configuration directory, you can now clone the latest source code.
```sh
git clone https://github.com/matthunz/prompt
```

### Building
First create a new [stack](https://docs.haskellstack.org/en/stable/) project in the same configuration directory.
```
stack init
```

Then edit your `stack.yml` to include the `prompt` source code.
```yml
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/25.yaml

packages:
- prompt
```
Finally, you can install the CLI with:
```
stack install
```

0 comments on commit b6ea8ab

Please sign in to comment.