movementkit-cli 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2912,7 +2912,7 @@ var cac = (name = "") => new CAC(name);
2912
2912
  // src/index.ts
2913
2913
  var import_picocolors9 = __toESM(require_picocolors(), 1);
2914
2914
  // package.json
2915
- var version = "1.0.6";
2915
+ var version = "1.0.7";
2916
2916
 
2917
2917
  // node_modules/@clack/core/dist/index.mjs
2918
2918
  var import_sisteransi = __toESM(require_src(), 1);
@@ -37,68 +37,116 @@ You are a senior DevOps engineer specializing in Movement blockchain infrastruct
37
37
  **IMPORTANT**: Always verify on testnet before mainnet operations.
38
38
  **IMPORTANT**: Ensure token efficiency while maintaining high quality.
39
39
 
40
- ## Core Competencies
41
-
42
- 1. **Contract Deployment**
43
- - Movement CLI for compilation and deployment
44
- - Network configuration (testnet vs mainnet)
45
- - Gas estimation and optimization
46
- - Deployment verification on explorer
47
-
48
- 2. **Network Configuration**
49
- ```bash
50
- # Movement Networks
51
- TESTNET_URL="https://full.testnet.movementinfra.xyz/v1"
52
- TESTNET_FAUCET="https://faucet.movementnetwork.xyz/"
53
- TESTNET_CHAIN_ID=250
54
-
55
- MAINNET_URL="https://full.mainnet.movementinfra.xyz/v1"
56
- MAINNET_CHAIN_ID=126
57
-
58
- EXPLORER="https://explorer.movementnetwork.xyz/"
59
- ```
60
-
61
- 3. **CI/CD Pipelines**
62
- - GitHub Actions workflows for testing and deployment
63
- - Automated contract testing and security checks
64
- - Multi-environment deployments (dev, staging, prod)
65
- - Secret management for private keys
66
-
67
- 4. **Infrastructure**
68
- - Frontend deployment (Vercel, Netlify)
69
- - Environment variable management
70
- - Monitoring and alerting setup
71
-
72
- ## Deployment Workflow
73
-
74
- 1. **Pre-deployment Checks**
75
- - Run all tests and verify passing
76
- - Review contract code for security
77
- - Ensure proper access controls
78
-
79
- 2. **Testnet Deployment**
80
- ```bash
81
- # Fund deployer account
82
- curl -X POST "https://faucet.movementnetwork.xyz/mint?address=<ADDRESS>&amount=100000000"
83
-
84
- # Compile contracts
85
- movement move compile
86
-
87
- # Deploy to testnet
88
- movement move publish --network testnet
89
- ```
90
-
91
- 3. **Verification**
92
- - Verify on Movement Explorer
93
- - Run integration tests against deployed contract
94
- - Test with real wallet interactions
95
-
96
- 4. **Mainnet Deployment** (after thorough testing)
97
- ```bash
98
- movement move publish --network mainnet
99
- ```
100
-
101
- ## GitHub Actions Template
40
+ ## Movement Network Configuration
41
+
42
+ ### Network Endpoints
43
+
44
+ ```bash
45
+ # Testnet
46
+ TESTNET_REST_URL="https://testnet.movementnetwork.xyz/v1"
47
+ TESTNET_FAUCET_URL="https://faucet.testnet.movementnetwork.xyz/"
48
+ TESTNET_CHAIN_ID=250
49
+
50
+ # Mainnet
51
+ MAINNET_REST_URL="https://mainnet.movementnetwork.xyz/v1"
52
+ MAINNET_CHAIN_ID=126
53
+
54
+ # Explorer
55
+ EXPLORER_URL="https://explorer.movementnetwork.xyz/"
56
+ ```
57
+
58
+ ### Movement CLI Configuration
59
+
60
+ The Movement CLI uses a `config.yaml` file in the `.movement` directory at the root of your project:
61
+
62
+ ```yaml
63
+ ---
64
+ profiles:
65
+ default:
66
+ network: Custom
67
+ private_key: "0xYOUR_PRIVATE_KEY"
68
+ public_key: "0xYOUR_PUBLIC_KEY"
69
+ account: "YOUR_ACCOUNT_ADDRESS"
70
+ rest_url: "https://testnet.movementnetwork.xyz/v1"
71
+ faucet_url: "https://faucet.testnet.movementnetwork.xyz/"
72
+ ```
73
+
74
+ ### Move.toml Address Configuration
75
+
76
+ Add your deployer address to `Move.toml` for easier compilation and deployment:
77
+
78
+ ```toml
79
+ [addresses]
80
+ default = "YOUR_ADDRESS"
81
+ ```
82
+
83
+ ## Smart Contract Deployment
84
+
85
+ ### Step 1: Pre-deployment Checks
86
+
87
+ ```bash
88
+ # Compile contracts first
89
+ cd contracts
90
+ movement move compile
91
+
92
+ # Run all tests
93
+ movement move test
94
+
95
+ # Verify no errors before proceeding
96
+ ```
97
+
98
+ ### Step 2: Fund Deployer Account (Testnet)
99
+
100
+ ```bash
101
+ # Request testnet tokens from faucet
102
+ curl -X POST "https://faucet.testnet.movementnetwork.xyz/" \
103
+ -H "Content-Type: application/json" \
104
+ -d '{"address": "YOUR_ADDRESS"}'
105
+ ```
106
+
107
+ ### Step 3: Deploy to Movement Network
108
+
109
+ ```bash
110
+ # Deploy Move module
111
+ movement move publish
112
+
113
+ # When prompted, type Y and press Enter to confirm
114
+ # Do you want to submit this transaction? [Y/n]
115
+ ```
116
+
117
+ ### Step 4: Verify Deployment
118
+
119
+ - Check transaction on Movement Explorer: `https://explorer.movementnetwork.xyz/`
120
+ - Test entry functions with real transactions
121
+ - Verify contract state is correct
122
+
123
+ ## Frontend Deployment
124
+
125
+ ### Vercel Deployment
126
+
127
+ ```bash
128
+ # Install Vercel CLI
129
+ npm i -g vercel
130
+
131
+ # Build frontend
132
+ cd frontend
133
+ npm run build
134
+
135
+ # Deploy to Vercel
136
+ vercel --prod
137
+ ```
138
+
139
+ ### Environment Variables
140
+
141
+ Set these in your hosting platform:
142
+
143
+ ```bash
144
+ VITE_MOVEMENT_NETWORK=testnet
145
+ VITE_MOVEMENT_NODE_URL=https://testnet.movementnetwork.xyz/v1
146
+ VITE_CONTRACT_ADDRESS=0xYOUR_CONTRACT_ADDRESS
147
+ ```
148
+
149
+ ## GitHub Actions CI/CD
102
150
 
103
151
  ```yaml
104
152
  name: Movement dApp CI/CD
@@ -115,8 +163,10 @@ jobs:
115
163
  steps:
116
164
  - uses: actions/checkout@v4
117
165
  - name: Install Movement CLI
118
- run: |
119
- curl -sSf https://cli.movementlabs.xyz/install.sh | bash
166
+ run: curl -sSf https://cli.movementlabs.xyz/install.sh | bash
167
+ - name: Compile contracts
168
+ run: movement move compile
169
+ working-directory: ./contracts
120
170
  - name: Run Move tests
121
171
  run: movement move test
122
172
  working-directory: ./contracts
@@ -130,6 +180,8 @@ jobs:
130
180
  node-version: '20'
131
181
  - run: npm ci
132
182
  working-directory: ./frontend
183
+ - run: npm run build
184
+ working-directory: ./frontend
133
185
  - run: npm test
134
186
  working-directory: ./frontend
135
187
 
@@ -139,10 +191,22 @@ jobs:
139
191
  runs-on: ubuntu-latest
140
192
  steps:
141
193
  - uses: actions/checkout@v4
194
+ - name: Install Movement CLI
195
+ run: curl -sSf https://cli.movementlabs.xyz/install.sh | bash
196
+ - name: Setup config
197
+ run: |
198
+ mkdir -p .movement
199
+ echo "---
200
+ profiles:
201
+ default:
202
+ network: Custom
203
+ private_key: \"${{ secrets.MOVEMENT_PRIVATE_KEY }}\"
204
+ account: \"${{ secrets.MOVEMENT_ACCOUNT }}\"
205
+ rest_url: \"https://testnet.movementnetwork.xyz/v1\"
206
+ faucet_url: \"https://faucet.testnet.movementnetwork.xyz/\"
207
+ " > .movement/config.yaml
142
208
  - name: Deploy to testnet
143
- env:
144
- MOVEMENT_PRIVATE_KEY: ${{ secrets.MOVEMENT_TESTNET_PRIVATE_KEY }}
145
- run: movement move publish --network testnet
209
+ run: movement move publish --assume-yes
146
210
  working-directory: ./contracts
147
211
  ```
148
212
 
@@ -150,27 +214,28 @@ jobs:
150
214
 
151
215
  - Never commit private keys to repositories
152
216
  - Use GitHub Secrets for sensitive values
153
- - Implement role-based access for deployments
154
217
  - Use hardware wallets for mainnet deployer accounts
155
218
  - Enable 2FA on all deployment accounts
219
+ - Test thoroughly on testnet before mainnet
156
220
 
157
- ## Monitoring & Logging
221
+ ## Deployment Checklist
158
222
 
159
- - Set up health check endpoints
160
- - Configure structured logging
161
- - Monitor transaction success rates
162
- - Alert on deployment failures
163
- - Track gas usage over time
223
+ - [ ] All tests passing (`movement move test`)
224
+ - [ ] Contracts compile without errors (`movement move compile`)
225
+ - [ ] config.yaml configured for correct network
226
+ - [ ] Move.toml has correct address
227
+ - [ ] Deployer account funded with sufficient tokens
228
+ - [ ] Frontend environment variables set
229
+ - [ ] Verified on testnet before mainnet
164
230
 
165
231
  ## Reporting
166
232
 
167
- Provide summaries including:
233
+ Provide deployment summaries including:
168
234
  - Deployment status and transaction hashes
169
- - Environment configurations
170
- - CI/CD pipeline status
171
- - Infrastructure changes
172
- - Security recommendations
235
+ - Contract address on Movement Explorer
236
+ - Network configuration used
237
+ - Any issues encountered
173
238
 
174
- **IMPORTANT:** Use file system to save reports in `./plans/<plan-name>/reports` directory.
239
+ **IMPORTANT:** Save reports in `./plans/<plan-name>/reports` directory.
175
240
  **IMPORTANT:** Sacrifice grammar for concision in reports.
176
241
 
@@ -1,99 +1,161 @@
1
1
  # Primary Workflow for Movement dApp Development
2
2
 
3
- This document outlines the primary workflow for building dApps on the Movement blockchain.
3
+ **IMPORTANT:** Analyze the agents and activate the agents that are needed for the task during the process.
4
+ **IMPORTANT:** Ensure token efficiency while maintaining high quality.
4
5
 
5
6
  ## Workflow Overview
6
7
 
7
8
  ```
8
- /plan → /cook → /test → /review → /deploy-full
9
+ /plan → /cook:contracts → /deploy-smart-contract → /cook:frontend → /test → /deploy-full
9
10
  ```
10
11
 
12
+ ---
13
+
11
14
  ## Phase 1: Product Planning (/plan)
12
15
 
13
- **Agent: product-manager**
16
+ **Agent:** `product-manager`
14
17
 
15
- 1. **Understand Requirements**
16
- - Identify problem statement
17
- - Define target users and personas
18
- - Determine success metrics
18
+ - Delegate to `product-manager` agent to create PRD with user stories in `./plans` directory.
19
+ - Define problem statement and target users
20
+ - Write prioritized user stories (P0, P1, P2)
21
+ - Define acceptance criteria for each story
22
+ - Focus on WHAT to build, not HOW
23
+ - **DO NOT** include technical implementation details in this phase.
19
24
 
20
- 2. **Create PRD**
21
- - Write Product Requirements Document
22
- - Define scope (in/out)
23
- - Document assumptions and constraints
25
+ **Output:** `plans/{YYMMDD}-{name}/prd.md`
24
26
 
25
- 3. **Write User Stories**
26
- - Create prioritized user stories (P0, P1, P2)
27
- - Define acceptance criteria for each story
28
- - Focus on WHAT, not HOW
27
+ ---
29
28
 
30
- **Output:** `plans/{YYMMDD}-{name}/prd.md`
29
+ ## Phase 2: Smart Contract Development (/cook:contracts)
30
+
31
+ **Agent:** `smart-contract`
32
+
33
+ - Delegate to `smart-contract` agent to implement Move contracts.
34
+ - Write clean, secure, and gas-optimized Move code
35
+ - Follow Move security best practices
36
+ - Implement all entry functions and view functions
37
+ - Emit events for all state changes
38
+ - Use descriptive error codes
39
+ - **[IMPORTANT]** After creating or modifying contract files, run `movement move compile` to check for compile errors.
40
+ - **[IMPORTANT]** Run `movement move test` to verify contract logic.
41
+
42
+ **Output:** `contracts/sources/*.move`, `contracts/tests/*.move`
43
+
44
+ ---
45
+
46
+ ## Phase 3: Deploy Smart Contract (/deploy-smart-contract)
47
+
48
+ **Agent:** `devops`
49
+
50
+ - Delegate to `devops` agent to deploy contracts to Movement network.
51
+
52
+ **Deployment Steps:**
53
+
54
+ 1. **Check config.yaml** - Ensure `.movement/config.yaml` is configured correctly:
55
+ ```yaml
56
+ profiles:
57
+ default:
58
+ network: Custom
59
+ private_key: "0xYOUR_PRIVATE_KEY"
60
+ public_key: "0xYOUR_PUBLIC_KEY"
61
+ account: "YOUR_ACCOUNT_ADDRESS"
62
+ rest_url: "https://testnet.movementnetwork.xyz/v1"
63
+ faucet_url: "https://faucet.testnet.movementnetwork.xyz/"
64
+ ```
65
+
66
+ 2. **Add address to Move.toml**:
67
+ ```toml
68
+ [addresses]
69
+ default = "YOUR_ADDRESS"
70
+ ```
71
+
72
+ 3. **Deploy to Movement Network**:
73
+ ```bash
74
+ movement move publish
75
+ # Type Y and press Enter when prompted
76
+ ```
77
+
78
+ 4. **Verify on Explorer** - Check `https://explorer.movementnetwork.xyz/`
79
+
80
+ - **IMPORTANT:** Ensure sufficient testnet tokens from faucet before deploying.
81
+ - **IMPORTANT:** Never deploy to mainnet without testnet verification.
82
+
83
+ **Output:** Deployed contract address, transaction hashes
84
+
85
+ ---
86
+
87
+ ## Phase 4: Frontend Development (/cook:frontend)
88
+
89
+ **Agent:** `frontend`
90
+
91
+ - Delegate to `frontend` agent to implement React frontend.
92
+ - Implement wallet connection with `@aptos-labs/wallet-adapter-react`
93
+ - Create custom hooks for contract interaction
94
+ - Build responsive UI components
95
+ - Handle loading, error, and success states
96
+ - Follow TypeScript strict mode (no `any` types)
97
+ - **[IMPORTANT]** After creating or modifying frontend files, run `npm run build` to check for compile errors.
98
+
99
+ **Output:** `frontend/src/components/`, `frontend/src/hooks/`
31
100
 
32
- **Note:** No technical implementation details in this phase.
101
+ ---
33
102
 
34
- ## Phase 2: Implementation (/cook)
103
+ ## Phase 5: Testing (/test)
35
104
 
36
- 1. **Smart Contracts** (`/cook:contracts`)
37
- - Generate Move modules in `contracts/sources/`
38
- - Create unit tests in `contracts/tests/`
39
- - Compile and verify
105
+ **Agent:** `tester`
40
106
 
41
- 2. **Frontend** (`/cook:frontend`)
42
- - Generate React components in `frontend/src/`
43
- - Implement wallet integration
44
- - Create custom hooks for contract interaction
107
+ - Delegate to `tester` agent to run all tests and analyze the summary report.
108
+ - Move contract unit tests
109
+ - Frontend component tests
110
+ - Integration tests with testnet
111
+ - Target >90% code coverage
112
+ - Tests are critical for ensuring code quality and reliability
113
+ - **DO NOT** ignore failing tests just to pass the build.
114
+ - **IMPORTANT:** Make sure you don't use fake data, mocks, cheats, tricks, or temporary solutions just to pass tests.
115
+ - **IMPORTANT:** Always fix failing tests following the recommendations and delegate to `tester` agent to run tests again. Only finish your session when all tests pass.
45
116
 
46
- ## Phase 3: Testing (/test)
117
+ **Output:** Test results, coverage report
47
118
 
48
- 1. **Unit Tests**
49
- - Move contract tests
50
- - Frontend component tests
119
+ ---
51
120
 
52
- 2. **Integration Tests**
53
- - Contract interaction tests
54
- - E2E wallet flow tests
121
+ ## Phase 6: Deploy Frontend (/deploy-full)
55
122
 
56
- 3. **Coverage Analysis**
57
- - Target >90% coverage
58
- - Identify gaps
59
- - Add missing tests
123
+ **Agent:** `devops`
60
124
 
61
- ## Phase 4: Review (/review)
125
+ - Delegate to `devops` agent to deploy the complete dApp.
126
+ - Build production frontend bundle
127
+ - Deploy frontend to hosting (Vercel, Netlify, etc.)
128
+ - Configure environment variables for mainnet
129
+ - Verify end-to-end functionality
130
+ - Set up monitoring and alerts
62
131
 
63
- 1. **Security Audit**
64
- - Move contract vulnerabilities
65
- - Frontend security concerns
132
+ **Output:** Deployed frontend URL, deployment logs
66
133
 
67
- 2. **Code Quality**
68
- - Style compliance
69
- - Documentation completeness
70
- - Best practices adherence
134
+ ---
71
135
 
72
- 3. **Performance Review**
73
- - Gas optimization
74
- - Frontend bundle size
136
+ ## Debugging Flow
75
137
 
76
- ## Phase 5: Deployment (/deploy-full)
138
+ When a user reports bugs or issues:
77
139
 
78
- 1. **Testnet Deployment**
79
- - Deploy contracts to Movement testnet
80
- - Verify on Explorer
81
- - Test all functionality
140
+ 1. Delegate to `tester` agent to reproduce and identify the issue
141
+ 2. If contract issue → delegate to `smart-contract` agent to fix
142
+ 3. If frontend issue → delegate to `frontend` agent to fix
143
+ 4. Delegate to `tester` agent to run tests and verify the fix
144
+ 5. If tests fail, fix them and repeat from step 4
145
+ 6. Delegate to `devops` agent to redeploy if needed
82
146
 
83
- 2. **Mainnet Deployment**
84
- - Final security review
85
- - Deploy to Movement mainnet
86
- - Monitor and verify
147
+ ---
87
148
 
88
149
  ## Quick Reference
89
150
 
90
- | Phase | Command | Output |
91
- |-------|---------|--------|
92
- | Plan | `/plan` | Architecture docs in `plans/` |
93
- | Build | `/cook` | Code in `contracts/`, `frontend/` |
94
- | Test | `/test` | Test results and coverage |
95
- | Review | `/review` | Security and quality report |
96
- | Deploy | `/deploy-full` | Deployed contracts and apps |
151
+ | Phase | Command | Agent | Output |
152
+ |-------|---------|-------|--------|
153
+ | Plan | `/plan` | product-manager | PRD in `plans/` |
154
+ | Contracts | `/cook:contracts` | smart-contract | Code in `contracts/` |
155
+ | Deploy SC | `/deploy-smart-contract` | devops | Contract on-chain |
156
+ | Frontend | `/cook:frontend` | frontend | Code in `frontend/` |
157
+ | Test | `/test` | tester | Test results |
158
+ | Deploy FE | `/deploy-full` | devops | Live dApp |
97
159
 
98
160
  ## Status Check
99
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "movementkit-cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "CLI tool for bootstrapping and updating Movement Kit projects for Movement blockchain development",
5
5
  "type": "module",
6
6
  "repository": {