Skip to content

feat: migrate from dfx to icp CLI#3

Open
deucalioncodes wants to merge 2 commits into
mainfrom
migrate-dfx-to-icp
Open

feat: migrate from dfx to icp CLI#3
deucalioncodes wants to merge 2 commits into
mainfrom
migrate-dfx-to-icp

Conversation

@deucalioncodes
Copy link
Copy Markdown
Member

@deucalioncodes deucalioncodes commented Mar 31, 2026

Migrate all dfx references to the new icp CLI.

Changes

  • Dockerfile: Install icp CLI via npm instead of dfx, use icp network start/stop and icp deploy, use install-icp-extension
  • test/entrypoint.sh: Use icp CLI commands
  • test/dfx.json → test/icp.yaml: Convert to icp CLI manifest format (list-based canisters with build steps)
  • test/Dockerfile_test: Reference icp.yaml instead of dfx.json
  • README.md: Update all commands and references
  • .gitignore: .dfx/.icp/

Note

Medium Risk
Swaps the core local network/deploy tooling from dfx to icp, which can break container builds and CI if command/manifest semantics differ. Also bumps ic-basilisk and changes the bootstrap deployment flow, increasing the chance of environment/setup regressions.

Overview
Migrates the dev container and test harness from dfx to the icp CLI: the Docker image now installs @icp-sdk/icp-cli, uses icp network start/stop + icp deploy for the bootstrap deploy, and switches Basilisk to install-icp-extension (with ic-basilisk bumped to 0.11.2).

Replaces dfx.json-based configuration with an icp.yaml manifest (including scripted Basilisk build steps) and updates the README, test Dockerfile, entrypoint script, and .gitignore (.dfx/.icp/) accordingly.

Written by Cursor Bugbot for commit 0db9392. This will update automatically on new commits. Configure here.

- Dockerfile: install icp CLI via npm instead of dfx, use icp commands
- test/entrypoint.sh: use icp network start/stop and icp deploy
- test/dfx.json → test/icp.yaml: convert to icp CLI manifest format
- test/Dockerfile_test: reference icp.yaml instead of dfx.json
- README.md: update all commands and references to icp CLI
- .gitignore: .dfx/ → .icp/
- Use install-icp-extension instead of install-dfx-extension
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread Dockerfile
RUN DFX_VERSION=${DFX_VERSION} DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
ENV PATH="/root/.local/share/dfx/bin:$PATH"
# Install icp CLI and add to PATH
RUN npm install -g @icp-sdk/icp-cli
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLI version argument defined but never used

High Severity

ICP_CLI_VERSION=0.2 is declared as a build arg but never referenced in the npm install command. The install line npm install -g @icp-sdk/icp-cli always installs the latest version instead of the pinned version. The old code correctly passed DFX_VERSION to the install script. The install command needs to include the version, e.g. @icp-sdk/icp-cli@${ICP_CLI_VERSION}, to honor the pinned version.

Additional Locations (1)
Fix in Cursor Fix in Web

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