Skip to content

Add Mentat development automation scripts#183

Merged
moodysalem merged 4 commits intomainfrom
mentat-1/generate-dev-tools
Oct 17, 2025
Merged

Add Mentat development automation scripts#183
moodysalem merged 4 commits intomainfrom
mentat-1/generate-dev-tools

Conversation

@mentatbot
Copy link
Contributor

@mentatbot mentatbot bot commented Oct 17, 2025

This PR adds two scripts to enable automated development workflows:

.mentat/setup.sh

Installs all necessary dependencies for working with this repository:

  • Scarb 2.11.4: Cairo package manager and build tool
  • Cairo contracts: Builds the project with scarb build
  • Integration test dependencies: Installs libgmp3-dev, starknet-devnet, and npm packages
  • PATH persistence: Ensures Scarb is available in future shell sessions

.mentat/format.sh

Automatically formats Cairo code before commits using scarb fmt, ensuring consistent code style across the project.

These scripts enable AI coding agents (like Mentat) to work effectively with the repository by ensuring all dependencies are properly installed and code is automatically formatted according to project conventions.


🤖 This PR was created with Mentat. See my steps and cost here

  • Wake on any new activity.

mentatbot bot and others added 2 commits October 17, 2025 03:29
This commit adds two scripts to help with automated development:

1. `.mentat/setup.sh`: Installs all necessary dependencies
   - Installs Scarb 2.11.4 (Cairo package manager and build tool)
   - Builds the Cairo contracts
   - Installs libgmp3-dev and starknet-devnet for integration tests
   - Installs npm dependencies for TypeScript integration tests

2. `.mentat/format.sh`: Automatically formats code before commits
   - Runs `scarb fmt` to format Cairo code according to project style

These scripts enable AI agents to work effectively with the repository by ensuring all dependencies are installed and code is properly formatted.

Mentat format script failed. Log: https://mentat.ai/gh/EkuboProtocol/starknet-contracts/log/6e39a6fb-9476-4940-b027-9375b856c7d2

Co-authored-by: moodysalem <7897876+moodysalem@users.noreply.github.com>
- Add PATH export to format.sh so scarb command is found
- Persist Scarb PATH to ~/.bashrc for future shell sessions
- Use subshell for npm ci to avoid changing working directory
- Handle both root and non-root environments for apt-get
- Use python3 -m pip for better compatibility

Mentat format script passed. Log: https://mentat.ai/gh/EkuboProtocol/starknet-contracts/log/3049d318-f421-4947-a3a3-a0ddb4ecf4b6

Co-authored-by: moodysalem <7897876+moodysalem@users.noreply.github.com>
@mentatbot mentatbot bot requested a review from moodysalem October 17, 2025 03:33
@moodysalem
Copy link
Member

merge main which is bumped to scarb 2.12.2 and also dont run integration tests or install any related infra

mentatbot bot and others added 2 commits October 17, 2025 03:36
- Merge main branch with updated Scarb version (2.12.2)
- Remove integration test dependencies from setup script
- Remove scarb build from setup script
- Keep setup minimal: only install Scarb and configure PATH

Mentat format script passed. Log: https://mentat.ai/gh/EkuboProtocol/starknet-contracts/log/183d9dd0-3c5f-4013-8a22-6e7747756a58

Co-authored-by: moodysalem <7897876+moodysalem@users.noreply.github.com>
@mentatbot
Copy link
Contributor Author

mentatbot bot commented Oct 17, 2025

I've updated the scripts based on your feedback:

Changes Made

Merged main branch - Now using Scarb 2.12.2 (updated from 2.11.4)

Simplified setup.sh - Removed all integration test infrastructure:

  • Removed scarb build
  • Removed libgmp3-dev installation
  • Removed starknet-devnet installation
  • Removed npm dependencies installation

The setup script now only installs Scarb 2.12.2 and configures PATH, making it minimal and fast.

Script Status

Both scripts are passing successfully:

  • .mentat/setup.sh - Installs Scarb 2.12.2 and persists PATH
  • .mentat/format.sh - Runs scarb fmt to format Cairo code

The scripts are ready for use by AI coding agents working with this repository.

@moodysalem moodysalem merged commit 478d1c2 into main Oct 17, 2025
1 check passed
@moodysalem moodysalem deleted the mentat-1/generate-dev-tools branch October 17, 2025 04:47
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