Skip to content

Conversation

ellie
Copy link
Contributor

@ellie ellie commented Nov 10, 2024

I had some issues with my local python env, so built a homebrew formula.

In general, homebrew allows installation of packages from GitHub with the following format

brew install <username>/<repo>

However, this requires that we have a repo named github.com/agentops-ai/homebrew-agentstack, with the contents of this PR.

If we want to keep it all in the same repo, users can run the following instead

brew tap agentops-ai/agentstack https://github.com/agentops-ai/agentstack
brew install agentops-ai/agentstack/agentstack

In order for this to work, we need to ensure that every dep from the lockfile is codified in the formula, and that the url + shasum are kept up to date for each release.

In the formula, you'll see "url" and "shasum". Those will need updating per release. You'll also need to change the list of resources if anything changes with your deps.

This is pretty annoying, but luckily there's some tooling!

I used "poet" to generate a bunch of this, though it needed some manual tweaking - https://github.com/tdsmith/homebrew-pypi-poet

Also, note this line in the install function

ENV.append_to_cflags '-Wno-incompatible-function-pointer-types' if DevelopmentTools.clang_build_version >= 1500

There's currently an issue with the later versions of Xcode, while building the YAML package used here

Upstream ref: https://sourceforge.net/p/ruamel-yaml-clib/tickets/32/

I had some issues with my local python env, so built a homebrew formula.

In general, homebrew allows installation of packages from GitHub with
the following format

```
brew install <username>/<repo>
```

However, this requires that we have a repo named
github.com/agentops-ai/homebrew-agentstack.

If we want to keep it all in the same repo, users can run the following
instead

```
brew tap agentops-ai/agentstack https://github.com/agentops-ai/agentstack
brew install agentops-ai/agentstack/agentstack
```

In order for this to work, we need to ensure that every dep from the
lockfile is codified in the formula, and that the url + shasum are kept
up to date for each release.

In the formula, you'll see "url" and "shasum". Those will need updating
per release. You'll also need to change the list of resources if
anything changes with your deps.

This is pretty annoying, but luckily there's some tooling!

I used "poet" to generate a bunch of this, though it needed some manual
tweaking - https://github.com/tdsmith/homebrew-pypi-poet

Also, note this line in the install function

```
ENV.append_to_cflags '-Wno-incompatible-function-pointer-types' if DevelopmentTools.clang_build_version >= 1500

```

There's currently an issue with the later versions of Xcode, while
building the YAML package used here

Upstream ref: https://sourceforge.net/p/ruamel-yaml-clib/tickets/32/
@ellie ellie force-pushed the ellie/homebrew-formula branch from 674ca49 to d68872a Compare November 10, 2024 05:10
@bboynton97 bboynton97 merged commit d68872a into agentstack-ai:main Nov 12, 2024
1 check passed
@ellie
Copy link
Contributor Author

ellie commented Nov 12, 2024

brew tap agentops-ai/agentstack https://github.com/agentops-ai/agentstack
brew install agentops-ai/agentstack/agentstack
$ agentstack
usage: agentstack [-h] [-v] {docs,quickstart,init,i,generate,g,tools,t} ...

AgentStack CLI - The easiest way to build an agent application

positional arguments:
  {docs,quickstart,init,i,generate,g,tools,t}
                        Available commands
    docs                Open Agentstack docs
    quickstart          Open the quickstart guide
    init (i)            Initialize a directory for the project
    generate (g)        Generate agents or tasks
    tools (t)           Manage tools

options:
  -h, --help            show this help message and exit
  -v, --version         Show the version

it works 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants