Crates.io | farmbot |
lib.rs | farmbot |
version | 0.1.15 |
source | src |
created_at | 2024-10-11 23:18:15.507711 |
updated_at | 2024-10-12 00:29:33.616741 |
description | Farm manager manager bot |
homepage | https://github.com/jasha10/farmbot |
repository | |
max_upload_size | |
id | 1405961 |
size | 16,761 |
If GNU stow is a "symlink farm manager," this tool will be a multi-purpose farming robot. A symlink farmer bot and as well as a package manager manager bot (a robot that manages package managers).
See INSTALL.md and USAGE.md to get started.
As a developer, I spend lots of time manually doing things that could theoretically be automated -- updating versions of dependencies (both locally installed tools and dependency pins on software projects), maintaining my symlink farm (a la GNU stow), and keeping my dotfiles in sync across various shells and platforms (I want the same aliases defined in bash, zsh, and nushell, with variations for linux/mac/windows).
Automating these tasks requires either a really smart AI (we're not there yet) or a pretty-smart knowledge graph (which has been theoretically possible for decades).
I want to create a monolithic automation framework that will run on my local machine. It will be data driven (probably backed by postgres or sqlite), written primarily in rust, and will run in the background to detect when actions should be taken. I hope to create command line tools and a GUI for viewing and modifiying the bot's behavior.
Below are some use-cases, though I hope to make the framework extensible enough to handle other use cases too:
stow my-package
followed by cd target-dir && stow -t .git stow-t.git
to stow a .git/info/exclude
file.
Do this well by manipulating in-memory tree structures representing files, simulating what the tree "should look like" (to detect if the farm is out of sync), and simulating what the tree will look like after an action such as stow
is taken.Open question: Is this vision trying to solve some of the same things as those infra-as-code / config management / automation projects like OpenTofu / Ansible / Puppet / Saltstack / ...? I've never used them.
cargo
, brew
, apt
, pipx
, etc. to install and manage software locallycargo
, apt
, etc) to see what software is currently installed, the version and source, etc.cargo install --path . vs
cargo install Like how conda
writes a "managed by conda" section to your bashrc, I envision a "managed by farmbot"
section in my bashrc / zshrc / nushell config. Unlike the conda snippet, this will not be a read-only section
of those config files :)
Rather, if you make a change to that part of your bashrc, farmbot (which is watching for file changes) should see what you've done and offer to make similar changes to your nushell / zsh configs. Perhaps some simple transformation rules could be used for part of the translation, and perhaps LLMs could be used to attempt some other parts. Farmbot may even offer to open a shell for you to test out the new shell config that it's written (e.g. to verify that an alias has been translated correctly). Some judgement calls could be made by LLMs, e.g. should we translate this shell function between different shells or encapsulate it as a shebanged script that could be portable between different shells?
When I'm iteratively working on dotfiles (e.g. writing to and saving a nushell config repeatedly), farmbot should keep track of the changes I've made and use that sequence of changes to update its suggested translations intelligently.
We should start with a minimum