Skip to content

feat(devtools): add devenv/direnv, default linting and formatting & scripts for build/scan vuln#160

Open
Banh-Canh wants to merge 1 commit intomainfrom
dfgdfgdf
Open

feat(devtools): add devenv/direnv, default linting and formatting & scripts for build/scan vuln#160
Banh-Canh wants to merge 1 commit intomainfrom
dfgdfgdf

Conversation

@Banh-Canh
Copy link
Copy Markdown
Member

No description provided.

@Banh-Canh Banh-Canh self-assigned this May 7, 2026
@Banh-Canh
Copy link
Copy Markdown
Member Author

Banh-Canh commented May 7, 2026

Small proposal, using direnv/devenv, which allows us to centralize (or not) our tooling and linting. It uses nix in the background but is an abstraction that make it easy to work with.

https://devenv.sh/

Requirements:

  • devenv
  • direnv
  • running direnv allow once in the cloned project

Upon entering the root directory of the project it automatically installs the packages we list (from the nixpkgs or building them locally if configured to do so), run an entrypoint script which effectively display the following (for example):

azimuth-llm dev environment

Commands (component = chat | image-analysis | flux-image-gen | omit for all):

  prek  -a                                       Format/lint all files
  build [component] [--tag TAG]                  Build container image(s)
  scan  [component] [--tag TAG] [--fail-on SEV]  Build if needed + Grype scan

In this example, I configured some git-hooks and default linter according to what was already configured in the project (black formatter).

It also install it as a precommit which will run this command (making use of treefmt with black plugin for formatting the project's python files):

╰─❯ prek -a                                                                                                                                                                                                                 devenv-shell-env
treefmt..................................................................Passed

Using devenv or similar solution would help onboarding people into contributing to the project as we can improve and configure the devX further. Also help pushing commit already compliant to the chosen linter before it even reach the testing pipeline.

It is possible to call a devenv configuration from a distant repositories to centralize the configuration. Each child projects would then just call the same configuration.

CICD and github action should be able to use devenv scripts as well (for formatting, testing etc..) making both testing locally and in the CI effectively 1:1.

It is possible to pin the packages used in this dev shell as well.

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.

1 participant