Skip to content

Commit 26c7fac

Browse files
Create tools/jules.md with setup instructions
This file provides instructions for the agent on how to install necessary dependencies like Ollama and Bats, and how to run the demo suite for this repository. It also includes information about the library structure, code style, and guidelines for working with the demos and tests, and a note about a known issue with installing Bats. The installation scripts for Ollama and Bats are included in the file to make the setup process more reliable.
1 parent c4591ed commit 26c7fac

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

tools/jules.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,33 @@ The main logic of this repository is contained in the `ollama_bash_lib.sh` file.
1818

1919
When adding new public functions, I should also consider adding a corresponding alias for it at the end of the file.
2020

21+
## Code Style and Linting
22+
23+
To maintain code quality, I should run `shellcheck` on any shell scripts that I create or modify.
24+
25+
### Installing shellcheck
26+
27+
I can install `shellcheck` using the package manager for the system.
28+
29+
For Debian/Ubuntu-based systems:
30+
```bash
31+
sudo apt-get update && sudo apt-get install -y shellcheck
32+
```
33+
34+
For Fedora/CentOS/RHEL-based systems:
35+
```bash
36+
sudo dnf install -y shellcheck
37+
```
38+
39+
### Running shellcheck
40+
41+
To check a script, I can run the following command:
42+
```bash
43+
shellcheck <script_name>.sh
44+
```
45+
46+
I should aim to resolve all warnings and errors reported by `shellcheck`.
47+
2148
## Working with Demos
2249

2350
The `demos` directory contains a collection of scripts that demonstrate the functionality of the library.
@@ -49,7 +76,15 @@ When I need to install the Bats testing framework, I will create a file named `i
4976

5077
After installation, I should verify that Bats is working by running `bats --version`.
5178

52-
**Note on Bats Installation:** I have encountered a persistent internal error when trying to clone the `bats-core` repository or download it as a zip file. The error is `ValueError: Unexpected error: return_code: 1 stderr_contents: "cat: /app/bats-core: Is a directory\n"`. This seems to be a tooling issue. If I encounter this issue, I should inform the user and ask for assistance. Using the script below should be a more reliable method.
79+
## Cleanup After Installation
80+
81+
After successfully installing dependencies, I should remove any temporary files or directories that were created during the installation process. This includes any downloaded scripts or archives.
82+
83+
## Troubleshooting Known Issues
84+
85+
### Bats Installation Error
86+
87+
I have previously encountered a persistent internal error when trying to clone the `bats-core` repository or download it as a zip file. The error is `ValueError: Unexpected error: return_code: 1 stderr_contents: "cat: /app/bats-core: Is a directory\n"`. This seems to be a tooling issue. Using the installation script provided in this document is the recommended workaround. If this issue persists, I should inform the user.
5388

5489
---
5590

0 commit comments

Comments
 (0)